Free Equations
Free equations let you create relationships among different objects in your IPSE projects. They work much like model equations but are not tied to a single object. Instead, each free equation is associated with a specific dataset in your IPSE project.
These equations use the same Model Description Language (MDL) syntax as standard model equations. For more details, refer to the section on the Syntax of the Models. Note that the syntax of free equations is checked only at runtime—if there is an error, the calculation stops and the equation cannot be evaluated.
You can enter free equations in the Free Equations editor window (Figure 1).
- To show / hide the Free Equations editor:
-
-
Choose
. -
The editor window as shown in Figure 1 appears.
-
To hide the editor, close the editor window.
-

- To edit Free Equations:
-
-
Select the Free Equations editor window.
-
In the text field, type the equations. You can also use the Insert Item button (
) to select the items with the mouse. To select an item click on any object on the flowsheet and select the item of interest in the presented list. Alternatively it is also possible to click on an object in the object manager. Free equations are automatically processed during system solution.
-
If you change object names in your IPSE project, the free equations are not automatically changed. Check the free equations and eventually change them manually, otherwise you will encounter errors when you run a calculation. |
Special Functions
sum_of
sum_of()
is a function available in the free equations.
It adds up all variables or parameters that match the description provided as arguments to the function.
The full syntax is
sum_of("<parameter or variable name>"[, model="<pattern>"] [object="<pattern>"])
<parameter or variable name>
is a place holder for a parameter or variable name.
The model and object modifiers serve as filters for the sum_of function. <pattern> is a place holder for a pattern definition that is used against the respective model or object name. If the pattern is found in the model or the object name, the item is added, otherwise it is ignored. If the model or object modifiers don’t exist or are equal to an empty string, they match any name.
- Example
-
sum_of(“power”, model=”motor”) adds up the power variable of all motors, but ignores the power variable in all the other models.
For a description on how the regular expressions are used and a summary of their standardized definitions, see Regular Expressions. The sum_of function can be used like any other function.