| MathSBML Home Page | MathSBML Site Map |
eventToSBML[options] returns an SBML <event.../> definition
eventToSBML[{{options},{options},...}] returns a <listOfEvents.../> where each option list corresponds to the options for single event definition.
eventToSymbolicSBML[arguments] returns Symbolic SBML for a single <event.../> definition
New in version 2.1.5. Revised in 2.6.0.
|
eventToSBML[
id->"foo",
name->"A basic event",
timeUnits->"hours",
trigger->(x>5),
eventAssignment->{x->y+x, y->0}]
returns the string
<event id"foo" name="A basic event" timeUnits="hours">
<trigger>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<gt/>
<ci>x</ci>
<cn>5</cn>
</apply>
</math>
</trigger>
<listOfEventAssignments>
<eventAssignment variable="x">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<plus/>
<ci>x</ci>
<ci>y</ci>
</apply>
</math>
</eventAssignment>
<eventAssignment variable="y">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<cn>0</cn>
</math>
</eventAssignment>
</listOfEventAssignments>
</event>
eventToSBML[{
{id-> "yon",
name-> "y turned on",
trigger-> x>17,
eventAssignment->{y-> 0,z-> 100}
},
{id-> "yoff",
name-> "y turned off",
trigger-> x>20,
eventAssignment->{y-> 100, z-> 0}}
}]
returns
<listOfEvents>
<event id="yon" name="y turned on">
<trigger>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<gt/>
<ci>x</ci>
<cn>17</cn>
</apply>
</math>
</trigger>
<listOfEventAssignments>
<eventAssignment variable="y">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<cn>0</cn>
</math>
</eventAssignment>
<eventAssignment variable="z">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<cn>100</cn>
</math>
</eventAssignment>
</listOfEventAssignments>
</event>
<event id="yoff" name="y turned off">
<trigger>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<gt/>
<ci>x</ci>
<cn>20</cn>
</apply>
</math>
</trigger>
<listOfEventAssignments>
<eventAssignment variable="y">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<cn>100</cn>
</math>
</eventAssignment>
<eventAssignment variable="z">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<cn>0</cn>
</math>
</eventAssignment>
</listOfEventAssignments>
</event>
</listOfEvents>
Go to the top of this page