This is an old revision of the document!
Parametric Modeling and Simulations with Modelica
Keywords
Constraints have certain reserved keywords. They are
diff - ? e.g. diff(x)
der - Derivative, e.g. der(x)
minimum - minimum(1,2,3,4) = 1
maximum - maximum(1,2,3,4) = 4
sum - sum(1,2) = 3
Common Built-in Variables can be modified in the 'Edit Constraint Block'. Click the 'Edit Built-in Variable' button. If you have more than one then separate them with a ','. Recommend to add:
time
Organizing Parametric Modeling
Create a package labelled 'model of x'
Create a block diagram for this package
Inside BDD insert <block> labelled 'modeling_x'. It can not contain any special characters including a space
Add relevant Constraint Blocks. Add aggregation relationships between constraint blocks (source) to the Modeling X block (target).
Add equations to your Constrain Blocks. If you will use an equation more than once add another aggregation relationship between the Constrain Block and the Modeling X block. In such case be sure to assign a name to the source of each relationship to avoid confusion later
You can't just have equations, you need inputs and outputs. Add to the BDD relevant Blocks that holds these inputs and outputs. Add a reference link between these blocks and the Modeling X block
NOTE if you are linking blocks that reside in a different namespace then you will need to add a Package Import relationship between the Model of X package to the package that contains your blocks
Troubleshooting
Are your blocks in a different namespace to the package that contains your simulation artifact? If so then add a package import relationship to the namespace that contains these blocks
Always use Binding Connector to connect parameters
Models, parameters, constraints and blocks name can not have any special characters, including space