Drawing random numbers is a task occasionally encountered. However, there is no standard way to do that in SBML. Of course that is precisely what the SBML Level 3 package for Distributions and Ranges is for. But what to do in the meantime, or what to do when you want it working for SBML Level 2? This is precisely what I encountered a couple of weeks back, and that is why below you will find a specification for a very short custom annotation, that allows to tag an SBML function definition as distribution function. Here an example:

<functionDefinition id="normal" name="Normal distribution">

<annotation>

<distribution xmlns="http://sbml.org/annotations/distribution" definition="http://en.wikipedia.org/wiki/Normal_distribution" />

</annotation>

<math xmlns="http://www.w3.org/1998/Math/MathML">

<lambda>

<bvar>

<ci> m </ci>

</bvar>

<bvar>

<ci> s </ci>

</bvar>

<ci> m </ci>

</lambda>

</math>

</functionDefinition>

The annotation (in the namespace http://sbml.org/annotations/distribution) contains one attribute definition, whose value tells us precisely which distribution we would like to draw numbers from. All software that supports it will know that we are dealing with a distribution and know what to do with it. Other software at least get the mean whenever they invoke the function.

Here the full specification of the Custom Distribution Annotation. (and here the SBML model). The annotation is so far supported by JarnacLite and RoadRunner (Windows Installer). As the same functionality is available in other software packages it would be great if they could be tagged with the annotation as well.