Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Nov 9, 2024
1 parent 293e546 commit 4888cfd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
7 changes: 6 additions & 1 deletion python/tests/test_preequilibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
def preeq_fixture(pysb_example_presimulation_module):
model = pysb_example_presimulation_module.getModel()
model.setReinitializeFixedParameterInitialStates(True)

model.setSteadyStateComputationMode(
amici.SteadyStateComputationMode.integrateIfNewtonFails
)
model.setSteadyStateSensitivityMode(
amici.SteadyStateSensitivityMode.integrateIfNewtonFails
)
solver = model.getSolver()
solver.setSensitivityOrder(amici.SensitivityOrder.first)
solver.setSensitivityMethod(amici.SensitivityMethod.forward)
Expand Down
7 changes: 7 additions & 0 deletions python/tests/test_pregenerated_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ def test_pregenerated_model(sub_test, case):
amici.readModelDataFromHDF5(
options_file, model.get(), f"/{sub_test}/{case}/options"
)
if model_name == "model_steadystate":
model.setSteadyStateComputationMode(
amici.SteadyStateComputationMode.integrateIfNewtonFails
)
model.setSteadyStateSensitivityMode(
amici.SteadyStateSensitivityMode.integrateIfNewtonFails
)
amici.readSolverSettingsFromHDF5(
options_file, solver.get(), f"/{sub_test}/{case}/options"
)
Expand Down
8 changes: 4 additions & 4 deletions python/tests/test_swig_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ def test_copy_constructors(pysb_example_presimulation_module):
# `pysb_example_presimulation_module.getModel()`.
"StateIsNonNegative": None,
"SteadyStateComputationMode": [
2,
1,
amici.SteadyStateComputationMode.integrationOnly,
amici.SteadyStateComputationMode.integrateIfNewtonFails,
],
"SteadyStateSensitivityMode": [
2,
1,
amici.SteadyStateSensitivityMode.integrationOnly,
amici.SteadyStateSensitivityMode.integrateIfNewtonFails,
],
("t0", "setT0"): [
0.0,
Expand Down

0 comments on commit 4888cfd

Please sign in to comment.