Skip to content

Commit

Permalink
clean up a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
artgoldberg committed Dec 30, 2020
1 parent 6b6a7aa commit f2ad020
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion tests/submodels/test_dfba.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion wc_sim/submodels/dfba.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f2ad020

Please sign in to comment.