Elements are shown with their attributes in brackets. Required elements/attributes are indicated in italics.
- model(name)
- units(name)
- unit(units, prefix, multiplier, exponent)
- component(name)
- variable(name, units, interface, initial_value)
- reset(variable, test_variable, order)
- test_value
- mathml:math
- reset_value
- mathml:math
- test_value
- mathml:math
- All mathml:cn elements must have a cellml:units attribute
- encapsulation
- component_ref(component)
- component_ref(component)
- ...
- component_ref(component)
- component_ref(component)
- connection(component_1, component_2)
- map_variables(variable_1, variable_2)
- import(xlink:href)
- units(name, units_ref)
- component(name, component_ref)
- units(name)
All CellML 2.0 elements can also contain an unnamespaced id
attribute.
Encapsulation means parent/child relationships, which affect how connections are made.
There are three rules:
- Only components that have sibling or parent-child relationships can be connected.
- Connections between siblings are governed by the public interface.
- In parent-child relationships, the parent uses the private interface and the child uses the public interface.
Identifiers must start with at least one letter, and only contain letters, numbers, and underscores.
- component
- component_ref
- connection
- encapsulation
- import
- model
- reset
- reset_value
- test_value
- unit
- units
- variable
- variable_1
- variable_2
- component
- component_1
- component_2
- component_ref
- exponent
- initial_value
- interface
- map_variables
- multiplier
- name
- order
- prefix
- test_variable
- units
- units_ref
- variable
cellml="http://www.cellml.org/cellml/2.0#"
mathml="http://www.w3.org/1998/Math/MathML"
- ampere
- becquerel
- candela
- coulomb
- dimensionless
- farad
- gram
- gray
- henry
- hertz
- joule
- katal
- kelvin
- kilogram
- litre
- lumen
- lux
- metre
- mole
- newton
- ohm
- pascal
- radian
- second
- siemens
- sievert
- steradian
- tesla
- volt
- watt
- weber
- yotta
- zetta
- exa
- peta
- tera
- giga
- mega
- kilo
- hecta
- deca
- deci
- centi
- milli
- micro
- nano
- pico
- femto
- atto
- zepto
- yocto
public
private
public_and_private
none
(default)
CellML 2.0 documents can use MathML, but must only elements from the Supported MathML Elements set.
<cn>
,<ci>
,<apply>
,<eq>
,<sep />
- Every
<cn>
must have acellml:units
attribute - The
type
of a<cn>
must be eitherreal
ore-notation
- Every
<ci>
must refer to a variable from the same component
- Basic 1:
<plus>
,<minus>
,<times>
,<divide>
- Basic 2:
<power>
,<root>
,<exp>
,<ln>
,<log>
,<logbase>
- Non-smooth:
<abs>
,<floor>
,<ceiling>
,<rem>
- N-ary comparison:
<max>
,<min>
- First order:
<diff>
,<bvar>
- Higher order:
<degree>
- Basic:
<sin>
,<cos>
,<tan>
,<arcsin>
,<arccos>
,<arctan>
- Hyperbolic:
<sinh>
,<cosh>
,<tanh>
,<arcsinh>
,<arccosh>
,<arctanh>
- Redundant
<sec>
,<csc>
,<cot>
,<arcsec>
,<arccsc>
,<arccot>
- Hyperbolic redundant:
<sech>
,<csch>
,<coth>
,<arcsech>
,<arccsch>
,<arccoth>
- Piecewise:
<piecewise>
,<piece>
,<otherwise>
- Relations:
<eq>
,<neq>
,<gt>
,<lt>
,<geq>
,<leq>
- Logical operators:
<and>
,<or>
,<xor>
,<not>
- Logical constants:
<true>
,<false>
Note 1: <eq>
is a relation in CellML, so the statement x = 5
is treated as fact about x
, not an assignment.
Note 2: The <otherwise>
element is not required.
This means that you can write a statement like x = (y > 0) ? 1 : undefined
.
The CellML spec doesn't define what implementations should do for these cases.
Note 3: The initial 2.0 spec doesn't rule out that variables can have the value true
or false
.
<pi>
<exponentiale>
<notanumber>
<infinity>