RuleWorld / bionetgen

Rule-based modeling framework
https://bionetgen.org/
MIT License
56 stars 25 forks source link

Fixed species flag is violated in SSA simulations #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Add fixed species to model, e.g.  $0()
2.Add synthesis rule:  0 -> A()  k
3.Simulate with SSA option

What is the expected output? What do you see instead?
The synthesis rule should create an A molecule and leave 0 unchanged since it 
has the fixed flag. Run_network (v3.0) reports that 0() is a fixed (boundary 
condition) species. However, the fixed flag is not respected and the population 
of 0() decrements when the rule fires.

Original issue reported on code.google.com by justinshogg on 2 May 2012 at 2:54

GoogleCodeExporter commented 9 years ago
# This model will reproduce the fixed species bug in SSA
begin model
begin parameters
    ksynth 1.0
    kdeg   0.1
end parameters
begin molecule types
    A()
    0()
end molecule types
begin seed species
    A()   0
    $0()  1
end seed species
begin observables
    Molecules  A_tot  A()
    Molecules  Null   0()
end observables
begin reaction rules
    0   -> A()   ksynth
    A() -> 0     kdeg
end reaction rules
end model

generate_network({overwrite=>1})
simulate_ssa({t_start=>0,t_end=>50,n_steps=>50})

Original comment by justinshogg on 2 May 2012 at 2:56

GoogleCodeExporter commented 9 years ago

Original comment by justinshogg on 2 May 2012 at 3:00

GoogleCodeExporter commented 9 years ago
Fixed bug in network::update_concentrations()

Original comment by lh64@cornell.edu on 2 May 2012 at 6:02