diff --git a/tests/submodels/test_dfba.py b/tests/submodels/test_dfba.py index 431ca91a..69978f4b 100644 --- a/tests/submodels/test_dfba.py +++ b/tests/submodels/test_dfba.py @@ -705,7 +705,6 @@ def test_run_fba_solver(self): 'm2[c]': -12, 'm3[c]': 10} self.check_expected_solution(dfba_submodel_2, 10, expected_adjustments_IV) - dfba_submodel_2.time_step = 1 TEST_NAME = "V: Modify II by scaling the coefficients of objective function's terms by 10" self.dfba_submodel_options['dfba_coef_scale_factor'] = 10. diff --git a/wc_sim/submodels/dfba.py b/wc_sim/submodels/dfba.py index 1dac4072..ea8deb59 100644 --- a/wc_sim/submodels/dfba.py +++ b/wc_sim/submodels/dfba.py @@ -671,9 +671,9 @@ def unscale_conv_opt_solution(self, dfba_bound_scale_factor=None, dfba_coef_scal if dfba_coef_scale_factor is None: dfba_coef_scale_factor = self.dfba_solver_options['dfba_coef_scale_factor'] - self._optimal_obj_func_value /= (dfba_coef_scale_factor * dfba_bound_scale_factor) for rxn_variable in self._conv_model.variables: self.reaction_fluxes[rxn_variable.name] /= dfba_bound_scale_factor + self._optimal_obj_func_value /= (dfba_coef_scale_factor * dfba_bound_scale_factor) def save_fba_solution(self, conv_opt_model, conv_opt_solution): """ Assign a FBA solution to local variables