Species class
# File lib/modelling/species.rb, line 12 def initialize(name, initial = nil, matlab_no = nil) @name = name || "species_#{@@insts}" @initial = initial || 0.0 if matlab_no.nil? @matlab_no = @@insts else @matlab_no = matlab_no end @@insts+= 1 end
# File lib/modelling/species.rb, line 32 def to_s "#{@name} (init: #{@initial})" end
write SBML
# File lib/modelling/species.rb, line 24 def to_sbml e = REXML::Element::new 'species' e.add_attribute('name', @name) e.add_attribute('initialAmount', @initial) e.add_attribute('compartment', 'default') e end