2.16. The map_variables elementΒΆ

A map_variables element information item (referred to in this specification as a map_variables element) is an element in the CellML namespace with a local name equal to map_variables, which appears as a child of a connection element.

  1. Each map_variables element MUST contain a variable_1 attribute.

    1. The value of the variable_1 attribute MUST be a valid variable reference, as defined in 3.5 Variable references.

  1. Each map_variables element MUST contain a variable_2 attribute.

    1. The value of the variable_2 attribute MUST be a valid variable reference, as defined in 3.5 Variable references.

See more

The points above are both saying the same thing for their variable_1 and variable_2 attributes respectively:

<model>
    <component name="house_of_capulet">
        <variable name="juliet" interface_type="public">
    </component>
    <component name="house_of_montague">
        <variable name="romeo" interface_type="public">
    </component>

    <!-- Valid: -->
    <connection component_1="montague" component_2="capulet">
        <map_variables variable_1="romeo" variable_2="juliet">
    </connection>

    <!-- Invalid: the variable_1 value is not a valid CellML identifier (special characters and spaces). -->
    <connection component_1="montague" component_2="capulet">
        <map_variables variable_1="Romeo, Romeo ..." variable_2="juliet">
    </connection>

    <!-- Invalid: the variable_2 value does not exist in component_2. -->
    <connection component_1="montague" component_2="capulet">
        <map_variables variable_1="romeo" variable_2="juliet_is_the_sun">
    </connection>
</model>
  1. A connection element MUST NOT contain more than one map_variables element with a given variable_1 attribute value and variable_2 attribute value pair.

See more

Just as you can have only one connection between any two components, within that connection you can have only one map_variables item between any two variables:

<model>
    <component name="house_of_capulet">
        <variable name="juliet" interface_type="public">
    </component>
    <component name="house_of_montague">
        <variable name="romeo" interface_type="public">
    </component>

    <connection component_1="montague" component_2="capulet">

        <!-- Invalid: Duplicate map_variables are not allowed. -->
        <map_variables variable_1="romeo" variable_2="juliet">
        <map_variables variable_1="romeo" variable_2="juliet">
    </connection>
</model>