Use of Connectors II – Naming Policy ‘integrate’ with All Connected Equation Systems using a Different Notation

This example is the most general (but also rarest) case: all connected sub elements use notations different from the super notation.

Model description

In this example, we want to solve the following equation system:

   z_{k=1} + A \cdot z_{k=2} = B \\[2ex] C \cdot (z_{k=2})^{2} = -D + z_{k=1}.

This is the same equation system as in example I on connectors, but with a third notation.

Workflow

We now present the workflow for formulating an equation system with a new super notation in the case in which all sub-elements have their own notation.

Super notation

Set up the new super notation with the following base names and indices:

Base names
  • A, parameter 1
  • B, parameter 2
  • C, parameter 3
  • D, parameter 4
  • z, variable
Indices
  • k, index 1…NK

The resulting notation has ID 182746.

Equations

Use the same equations as in example I for connectors. These equations have the IDs 182732 and 182733.

Connectors

Now it is necessary to create two connectors. Go to the Connector tab and proceed as follows:

  1. Add a helpful description for the connector
  2. Activate the tab Edit Matching. You see two sections: one for the Sub Notation and one for the Super Notation. Both sections contain a field to import the notation
  3. In the section for the Sub Notation, press the Import button and select the notation of the colleague, then confirm. Alternatively, you can select Import Notation from Connected Element and select the equation of the colleague. This automatically adds all variables used in this equation
  4. Add the new super notation as Super Notation. As there is no analogous equation available, you need to select Import Notation directly
  5. Generate the missing variables for the Sub Notation and the Super Notation, i.e.,
    • Sub Notation: x_i, a, b
    • Super Notation: z_{k}, A, B
  6. Select the analogous variables and click on Match to achieve the following matching:
    • x_i \rightarrow z_{k}
    • a \rightarrow A
    • b \rightarrow B
  7. Make sure by clicking on the pair x_i; z_k to check whether the Index Matching was successful. The Sub index i should have been matched with the Super index k
  8. Save the connector
  9. Repeat these steps for a new connector that connects the user notation and the new super notation. The variables in this case are:
    • Sub Notation: y_j, \gamma, \delta
    • Super Notation: z_{k}, C, D
  10. The resultung match must be:
    • y_j \rightarrow z_{k}
    • \gamma \rightarrow C
    • \delta \rightarrow D
  11. Verify the correct setup of the connector and save it

The connectors are available with IDs 182744 and 182745. Figure 1 illustrates how both equations are combined to one equation system.

figure 3

Figure 1: Graph of the variable interpretation.

Equation system

To construct the equation system, go to the Equation System tab and take the following steps.

  1. Load the user equation from example I with the connector user notation \rightarrow super notation
  2. Load the colleague’s equation from example I with the connector colleague notation \rightarrow super notation
  3. Save the equation system; should a warning appear because the notation of the equation is different from the equation system’s notation, acknowledge it. If you did everything as described, there will be no problem as you used a connector

The equation system has ID 182746.

Evaluation / Simulation

Go to the “Simulation” section and do the following:

  1. Load your equation system in the tab Equation System
  2. Set the maximum Value NK to 2 in the tab Indexing
  3. Go to the tab Specifications
  4. Assign the variables A, B, C, and D as design values
  5. Assign the variables z_{k=1} and z_{k=2} as iteration values

Initialization and results

To initialize and specify the model, take the following steps:

  1. Initialize this example with the design values and initial guesses given in Table 1
  2. Save the variable specification 
  3. Save the simulation
  4. Go to the Evaluation tab and generate the code for your preferred environment
  5. Solve the system using the generated code

This simulation is available with ID 182748 with variable specification 182749. The solution for all iteration variables is also given in Table 1.

NameDescriptionValue / Initial guessSolution
AParameter 13
BParameter 23
CParameter 32
DParameter 42
z_{k=1}Variable 112.158
z_{k=2}Variable 210.281
Table 1: Overview of parameter values, initial guesses, and the solution.