Use-cases for libCellML

  1. Create: create a model from scratch and serialise it to XML (in each case the test is that the serialised model matches manually validated XML documents)

    1. an empty model

    2. a model with a valid name

    3. a model with an invalid name

    4. a model with a single component

      1. a component with a valid name

      2. a component with an invalid name

    5. a model with two or more components

    6. a model with three components and an encapsulation hierarchy

      1. one component encapsulating two children

      2. one component encapsulating a single child which in turn encapsulates a single child

      3. an invalid cyclical encapsulation hierarchy

    7. manipulation of a model with multi-level component encapsulation hierarchy

      1. remove a top-level component

      2. remove an encapsulated child component

      3. change the name of a top-level component

      4. change the name of an encapsulated child component

      5. replace one component with a new component

      6. take a component (remove the component and return it to the user)

      7. determine if a component with a given name exists in a model or component

      8. determine the number of components encapsulated by a model or component

    8. a model with imported components

      1. import a component from a model

      2. import two components from the same model as separate components

      3. import a component into a hierarchy

      4. import a component from a non-existent URL

    9. a model with units

      1. a single base units with valid name

      2. a single base units with an invalid name

      3. a units which defines micro-Ampere * Kelvin / milli-siemens

      4. the units from 1.ix.a and 1.ix.c and multiplies them

      5. create a new base units e.g. ‘pH’

    10. a model with imported units

      1. import a units from a model

        1. with a valid name

        2. with an invalid name

      2. import a units from a non-existent URL

      3. import a units from a model and scale it, prefix it, offset it, exponentise it

    11. a model with variables

      1. model from 1.iv.a and define a variable with a valid name and units dimensionless

        1. with a valid variable initial value of 0.0

        2. with a private interface

      2. model from 1.iv.a and define a variable with an invalid name and units dimensionless

      3. model from 1.iv.a and define a variable with a valid name and invalid units name.

      4. a model with a single component containing two variables.

        1. with valid variable initial values of 1.0 and -1.0, respectively.

        2. one with an initial value of 1.0 and the other with an initial value of the first variable.

        3. with one public and one public_and_private interface, respectively.

    12. a model with connections

      1. model from 1.vi.a, each child containing a single variable

        1. with a private interface in the parent and public interface in the child components and connect the variable in both children to the parent.

        2. with a public interface in all components and connect the variables in the children to the parent

    13. a model with maths and variables

      1. model from 1.xi.d.1 and define valid maths

    14. a model with maths, variables and connections

      1. model with two components, each containing two variables, maths, and one connection

  2. Modify: modify models from 1.

    1. add {components, units, maths, variables, connections}

    2. remove {components, units, maths, variables, connections}

    3. update {components, units, maths, model attributes, variables, connections}

  3. Load: load each of the models from 1 and 2 (new models can be added for this part if required).

    1. a model with imported components

      1. a single component

      2. a component with a hierarchy

      3. a component from a non-existent URL

  4. Validate: create, load, and modify models and then validate them (the test is that the models are correctly identified as valid or invalid, and for the case when they are invalid the correct reason is given, covering each rule in the specification).

  5. Import CellML 1.0/1.1 models.

  6. Export CellML 1.1 (and by extension CellML 1.0).