Skip to content

Commit

Permalink
Forgot to add model_56
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriciocravo committed Jul 15, 2024
1 parent 670e80b commit c88dbbb
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
23 changes: 22 additions & 1 deletion for_local_use.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,28 @@

if __name__ == '__main__':

pass
def test_parameter_fit_with_units():
A = BaseSpecies()
A >> Zero[3 / u.hour]
A(100)
S1 = Simulation(A)
S1.duration = 3 * u.hour
S1.unit_x = u.seconds
S1.run(plot_data=False, level=-1)

A = BaseSpecies()
p = ModelParameters(1 / u.hour)
A >> Zero[p]
A(100)
S2 = Simulation(A)
S2.run(plot_data=False, level=-1)
S2.load_experiment_data(S1.results)
basiCO_parameter_estimation(S2, [p], verbose=False)

print(p.value)

assert 2.5 / u.hour <= p.value <= 3.5 / u.hour
test_parameter_fit_with_units()



21 changes: 21 additions & 0 deletions test_tools/model_56.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

Species
S0,0
S1,0
S2,0

Mappings
S0 :
S0
S1 :
S1
S2 :
S2

Parameters
volume,1

Reactions
reaction_0,{'re': [(1, 'S0')], 'pr': [], 'kin': 'S0 * 1'}
reaction_1,{'re': [(1, 'S1')], 'pr': [], 'kin': 'S1 * 1'}
reaction_2,{'re': [(1, 'S2')], 'pr': [], 'kin': 'S2 * 1'}

0 comments on commit c88dbbb

Please sign in to comment.