Commit 2b3f01a7 authored by HEMERY Mathieu's avatar HEMERY Mathieu
Browse files

add the function of the absent species in the out_dynamic file

parent 19b4453b
......@@ -1186,7 +1186,14 @@ hybrid_dynamic_simulation(InputFile,OutFilename,Volume,Time,PropTresh,PartTresh)
all_items([kind:initial_state],InitState),
get_option(stochastic_conversion, Rate),
findall(Hybrid_species,(
((member(present(Present_pre),InitState),Init_value_pre = 1);member(present(Present_pre,Init_value_pre),InitState)),
(
(member(present(Present_pre),InitState),Init_value_pre = 1)
;
member(present(Present_pre,Init_value_pre),InitState)
;
member(absent(Present_pre), InitState),
Init_value_pre = 0
),
(
member(Present_pre, SortedSpecies)
->
......@@ -1194,18 +1201,8 @@ hybrid_dynamic_simulation(InputFile,OutFilename,Volume,Time,PropTresh,PartTresh)
species_to_stoch(Present_pre, Present),
Init_value = 0,
species_to_total(Present_pre, Hybrid_species),
write(Stream, 'function('),
write(Stream, Hybrid_species),
write(Stream,' = floor('),
write(Stream,Rate),
write(Stream,'*'),
write(Stream, Volume),
write(Stream, '*'),
write(Stream, Present_pre),
write(Stream, ' + '),
write(Stream, Present),
write(Stream, ')).'),
nl(Stream)
format(Stream, "function(~w = floor(~g*~g*~w + ~w)).~n",
[Hybrid_species, Rate, Volume, Present_pre, Present])
)
;
(
......@@ -1213,9 +1210,7 @@ hybrid_dynamic_simulation(InputFile,OutFilename,Volume,Time,PropTresh,PartTresh)
Init_value = Init_value_pre
)
),
write(Stream, 'parameter('), write(Stream, Present),
write(Stream, ' = '), write(Stream, Init_value),
write(Stream, ').'), nl(Stream)
format(Stream, "parameter(~w = ~g).~n",[Present, Init_value])
),_Hybrid_species),
nl(Stream),
write_hybrid_ode(Stream,SortedSpecies),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment