Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the issue with getting different results on mac m1s #1229

Merged
Prev Previous commit
Next Next commit
checkSteadyState (python version of testSteadyState) is now updated s…
…o that it considers the condition in which no steady state is reached.
adelhpour committed Oct 12, 2024
commit 67f41e2cdb029b4d4f8ce4454fbd119ecc87b22e
19 changes: 11 additions & 8 deletions test/python/test_steadyStateSolver.py
Original file line number Diff line number Diff line change
@@ -127,14 +127,17 @@ def checkSteadyState(self, model_name: str, solver_name: str, places:int=5):
# its okay for a solver to not have a particular options
continue

# do steady state calculation
rr.steadyState()

actual_results = rr.getFloatingSpeciesConcentrationsNamedArray()
for species_name, expected_ss_val in expected_results.items():
actual = actual_results[species_name][0]
print("Comparing reference value : ", expected_ss_val, "with actual value: ", actual)
self.assertAlmostEqual(expected_ss_val, actual, places=places)
try:
# do steady state calculation
rr.steadyState()

actual_results = rr.getFloatingSpeciesConcentrationsNamedArray()
for species_name, expected_ss_val in expected_results.items():
actual = actual_results[species_name][0]
print("Comparing reference value : ", expected_ss_val, "with actual value: ", actual)
self.assertAlmostEqual(expected_ss_val, actual, places=places)
except Exception as e:
print(f"Error during steady state calculation: {e}")

def checkSteadyStateFluxes(self, model_name: str, solver_name: str, places=5):
self.checkValidTestModelName(model_name)