diff --git a/dingo/fba.py b/dingo/fba.py index 8a6cbf7f..cba061f0 100644 --- a/dingo/fba.py +++ b/dingo/fba.py @@ -13,7 +13,7 @@ def slow_fba(lb, ub, S, c): """A Python function to perform fba using scipy.optimize LP solver `linprog` Returns an optimal solution and its value for the following linear program: - min c*v, subject to, + max c*v, subject to, Sv = 0, lb <= v <= ub Keyword arguments: diff --git a/dingo/gurobi_based_implementations.py b/dingo/gurobi_based_implementations.py index 787b7e2a..42300128 100644 --- a/dingo/gurobi_based_implementations.py +++ b/dingo/gurobi_based_implementations.py @@ -107,9 +107,7 @@ def fast_fba(lb, ub, S, c): if status == GRB.OPTIMAL: optimum_value = -model.getObjective().getValue() v = model.getVars() - - for i in range(n): - optimum_sol.append(v[i].x) + optimum_sol = model.getAttr("X", v) optimum_sol = np.asarray(optimum_sol)