This tutorial section covers the basic use of equations or equation systems that use different notations. It is assumed that you have worked through the basic tutorial parts.

**Rules**

The basic contract of the naming policy **‘integrate’** is as follows:

- Basic rule: If an equation or equation system (sub element) is added to a super equation system (super element), the sub element’s variables will get the namespace of the super element
- Additional rule using different notations: If a sub element is connected to a super element, and both elements use different notations, then
*all*variable names of the sub element have to be translated (by a connector) into the super notation. - Attention: In any time the meaning of each variable has to be uniquely defined by the notation of its namespace. If different notations are used in sub and super element, each variable has to be translated. Otherwise the meaning of some variables coming from the sub element would be undefined in the notation (and therefore in the namespace ) of the super element.
- Result: After parsing, all variables have a
*top level naming*according to the super notation in the top level namespace.

**‘Integrate’ case a: All elements use the same notation.**

This is the standard case where no translation is necessary. It is only listed here for the sake of completeness.

Figure 1: Graph of the variable interpretation

Equation System itgr a

Notation x

Base Names:

Name | Description |
---|---|

value x | |

parameter a | |

parameter b | |

parameter c | |

parameter d |

Indices:

Name | max val | Description |
---|---|---|

Ni | value index |

Problem description

Design variables and their corresponding values:

Iteration variables and their corresponding guess values:

Expected solution:

**Repeating the basics** If you do not know how to enter the above equation system and solve the derived problem in MOSAICmodeling, then you should work through (or revisit) the tutorial parts in the basics.

**‘Integrate’ case b: A connected equation uses another notation.**

In this case (only) one sub equation has a different notation. This is similar to the scenario where you establish your equations in your notation and use some equations from a collaborating developer who uses his own notation.

Equation System itgr b

Notation y

Base Names:

Name | Description |
---|---|

values | |

parameter 1 | |

parameter 2 | |

parameter 3 | |

parameter 4 |

Indices:

Name | Max Val | Description |
---|---|---|

Nj | value index |

Collaboration

Equation (\ref{eq:itgr:b:incl}) exists in a collaborating project. To avoid reimplementation the existing equation (\ref{eq:itgr:b:used}) is used here. In the other project another notation is used. To be able to use equations of the other project, a connector must be created, that translates into the notation used in this project.

Equation one

Notation x

Base Names:

Name | Description |
---|---|

values | |

parameter 1 | |

parameter 2 | |

parameter3 | |

parameter 4 |

Indices:

Name | Max val | Description |
---|---|---|

Ni | value index |

Connector one

- Subnotation: Notation x
- Supernotation: Notation y
- Value list:

Figure 2: Graph of the variable interpretation

Problem description

Design variables with their values:

Iteration variables with guess values:

Expected solution:

**Creating the equations and the notations** As a preparation of this tutorial the basic model elements must be created:

- Create ‘Notation y’ and ‘Equation two’ as it is used in your own project (see eq. \ref{eq:itgr:b:eq:two:new}).
- Create ‘Notation x’ and ‘Equation one’ as it is present in the collaborating project (see eq. \ref{eq:itgr:b:used}).

**Creating the connector**

Now it is necessary to create a connector, which is basically a list of synonymous variable names. The connector to be created is given in the specifications above but repeated here for convenience:

Connector one

- Subnotation: Notation x
- Supernotation: Notation y
- Value list:

Every connector consists of three pieces of information: The sub notation, the super notation and a variable matching list. However, there are several ways to *create* a connector. The standard way is to specify the sub and super notation directly and create the variable namings that need to be matched by hand. If you already have connectible elements (equations or equation systems) that you want to match, you can also load them into the ** Connector Editor**. In this case the notations and the variable namings are extracted from the loaded connected elements, which usually saves much work. The stored information, however, is still only the sub notation, the super notation and the variable matching list. In this introductory example the latter case is shown. To create the connector based on existing connectible elements do the following:

- Select the
tab in the Editor Bar.**Connector** - Activate the tab
. You see two sections, one for the**Set Notations**and one for the**Sub Notation**. Both sections contain a field to import the notation.**Super Notation** - In the section for the
press the**Sub Notation**button of the associated file selection area.**[Import]** - Select the file for ‘Equation one’.
- Let’s take a look at the results of the last action:
- The
file panel shows the notation used by ‘Equation one’.**Notation** - If you look at
section you will find the notation has been loaded into a detailed view panel similar to the**View**with the title**Notation Editor**`Sub Notation`

- The

- Go back to the tab
.**Set Notations** - Within the specification of the
press the**Super Element**button on the right hand side of this area.**[Import]** - Now select the file for ‘Equation two’. (Strictly, ‘itgr b’ is the super element. But ‘Equation two’ uses the same notation and contains all necessary variables names).
- The variable names of ‘Equation two’ and information about the corresponding notation, ‘Notation y’ should be present in the editor now, just as it was shown for the sub element.
- Now the matching of the variables must be specified. Change to the tab
.**Edit Matching** - For the correct translation of the variables of ‘Equation one’ it is sufficient to specify a matching for
*b*,*c*, and . - We will start with
*b*. presschoose Sub variable Naming and type**[New],***b*into the field. Press`Tex Expression`and then**[Update MathML]**. To specify the corresponding name, , press`[OK]`choose Super variable Naming and type**[New],**into the field`\beta`. Press`Tex Expression`and then**[Update MathML]**.`[OK]` - Select both
*b*in thelist and in the**Sub Notation**list and press**Super Notation**.**[Match]** - It is useful to test the translation results of the new connector. To do so, select the tab
and load the sub equation or equation system for which the translation should be tested. For this tutorial load ‘Equation one’ and look at the results.**Test Connector** - Add another synonym information for
*c*, creatingand matching the names as described in the previous step.**\gamma** - Now you could match and separately to and . However, this would not be very efficient. Instead you should match the indiced variable in a generic way:
- Create a
and a`New Sub`and match them.`New Super` - At all times you may look at the contents of the connector by selecting the tab
. Further you may always look at the matching results in the tab**View Connector**.**Test Connector** - Save the connector as ‘Connector one’.
- Up to now the connector is sufficient for the above example case. To obtain a connector that is able to translate all symbols of ‘Notation x’ into symbols of ‘Notation y’ you need to create the sub variable namings
*a*and*d*and match them with the super variable namings and .

**Using the connector (during creation of the equation system)**

- Choose Equation System in the Editor Bar.
- First load ‘Notation y’ into the
section of this editor.**Notation** - To connect ‘Equation one’ press
.**[Add]** - Select ‘Equation one’ as usual in the
to Element but do not press**Edit Connection**.**[Submit]** - Choose the Naming Policy
.**integrate** - Still in the dialog check the box for
.**Use connector** - Press
next to the now activated text field and choose the file for ‘Connector one’ that you created above.**[Change]** - Press
.**[Submit]** - The connector name is shown in the table row for ‘Equation one’.
- Add ‘Equation two’ in the usual way without specifying any connector.

**Differences when evaluating the equation system**

- In the Evaluate bar activate the tab
and load the equation system as usual.**Equation System** - You will see that the equations are presented in their original notation.
- Specify the maximum index value
in the**NC=2**tab.**Indexing** - Now have a look at the presentation in the
tab. Here, both equations are presented in the symbols corresponding to the super notation (‘Notation y’).**Instance** - Change to tab
.**Variable Specification** - Select the variable . Remember that this variable has the variable name
*b*in the original notation. - Look at the lower end of the editor at the
Panel. At the left hand side you see the symbol and next to it an activated arrow button pointing down. Press this button [latex]\downarrow[/latex]. You will see that the symbol changes from to`Notation Information`*b*and the notation information at the right hand side shows the description for*b*provided by ‘Notation x’. - Using the buttons [ ] and [ ] you can change between the two namings. Pressing
displays the**[T]***Top Level Naming*, which is the naming that is actually used to distinguish the variables from each other. - Enter the variable specification given in the model and problem description and solve the problem.

**‘Integrate’ case c: All connected equation systems use a different notation from the desired one**.

This is the most general (but most rare) case. All connected sub elements use different notations from the super notation.

Equation System itgr c

Notation z

Base Names:

Name | Description |
---|---|

values | |

parameter 1 | |

parameter 2 | |

parameter 3 | |

parameter 4 |

Indices:

Name | Max val | Description |
---|---|---|

Nk | value index |

Collaboration

Equations (\ref{eq:itgr:c:incl:one}) and (\ref{eq:itgr:c:incl:two}) exist in other projects. To avoid reimplementation of the existing equations (\ref{eq:itgr:b:used}) and (\ref{eq:itgr:b:eq:two:new}) are used here. Applicable connectors are used to translate between the notations.

Equation one

Notation x

Base Names:

Name | Description |
---|---|

values | |

parameter 1 | |

parameter 2 | |

parameter 3 | |

parameter 4 |

Indices:

Name | Max val | Description |
---|---|---|

i | Ni | value index |

Connector two

- Subnotation: Notation x
- Supernotation: Notation z
- Value list:

Equation two

Notation y

Base Names:

Name | Description |
---|---|

values | |

parameter 1 | |

parameter 2 | |

parameter 3 | |

parameter 4 |

Indices:

Name | Max val | Description |
---|---|---|

Nj | value index |

Connector three

- Subnotation: Notation y
- Supernotation: Notation z
- Value list:

Figure3: Graph of the variable interpretation

Problem description

Design variables with values:

Iteration variables with guess values:

Expected result:

**Equations and the notations** As a preparation of this tutorial the basic model elements must be present:

- You may use ‘Equation one’ and ‘Equation two’ as well as ‘Notation x’ and ‘Notation y’ from section (
**‘Integrate’ case b: A connected equation uses another notation.**). - Create ‘Notation z’ as specified above.

**Creating the connectors** In the previous section it was explained how a connector can be created based on existing equations or equation systems. Now it will be explained how to create a connector based directly on the notations.

- Select the
in the**Connector**.**Editor Bar** - Activate the tab
.**Set Notations** - In the section for the
press the**Sub Notation**button of the associated file selection area.**[Import]** - Select the file for ‘Notation y’.
- In the section for the
press the**Super Notation**button.**[Import]** - Select the file for ‘Notation z’.
- Switch to tab
.**Edit Matching** - Create the new sub variable namings , , , and . (For each variable naming press
and in the appearing dialog enter the latex expression, press**[New Sub]**and**[Update MathML]**).**[OK]** - Create the new super variable namings
*A*,*B*,*C*,*D*and . - Match the variables according to the list given in the above model description for ‘Connector two’.
- Test the connector for ‘Equation two’ in the
.**Test Connector** - Save the connector (Connector two).
- Press
in the file panel of the**[New]**.`Connector Editor` - Create ‘Connector three’ according to the above model description.

**Using the connectors when creating the equation system**

- Activate the
and load ‘Notation z’.**Equation System Editor** - Press
. In the`[Add]`dialog load ‘Equaton one’, use the Naming Policy**Edit Connection to Element**and click on**integrate**and specify ‘Connector two’ in the corresponding file area. Press**Use connector**to close the dialog.**[Submit]** - Add ‘Equation two’ specifying ‘Connector three’ for its connection.
- Save the equation system.

**Differences in the evaluation**

- In the
load the equation system, specify the maximum index value as**Evaluation Editor**for instantiation.`2` - In the tab
select the variable .**Variable Specification** - In the
at the bottom scroll through the different namings of this variable by using the [ ] and [ ] buttons. You should find and as further namings.**Notation Information Panel**brings you back to the top level naming ().**[T]** - Solve the simulation problem according to the data given above.