From f8c5e8d1272627b1ad8fdf80c516f38c6ffc8cca Mon Sep 17 00:00:00 2001 From: KeShih Date: Sat, 18 May 2024 23:13:46 +0800 Subject: [PATCH] Fix: typo in slow_fba, a bug in fast_fba --- dingo/fba.py | 2 +- dingo/gurobi_based_implementations.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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..66f10f2c 100644 --- a/dingo/gurobi_based_implementations.py +++ b/dingo/gurobi_based_implementations.py @@ -108,8 +108,8 @@ def fast_fba(lb, ub, S, c): optimum_value = -model.getObjective().getValue() v = model.getVars() - for i in range(n): - optimum_sol.append(v[i].x) + for i in range(n): + optimum_sol.append(v[i].x) optimum_sol = np.asarray(optimum_sol)