Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modelica: access nominal value from equation

Is it possible in Modelica to calculate the value of a Boolean based on the nominal attribute (or min or max) of another variable? Something like:

paramter Real a(min=0, max=1, nominal=0.5);
paramter Real b(min=0, max=1, nominal=0.4);
Boolean bBigger;
equation
bBigger = b > a.nominal;

I would like to use the Boolean (or directly the expression) in a graphical annotation only.

like image 403
Priyanka Avatar asked Feb 13 '26 16:02

Priyanka


1 Answers

Just declare extra parameters if you want to use them in equations such as:

parameter Real aNominal = 0.5;
parameter Real a(min=0, max=1, nominal=aNominal);
parameter Real b(min=0, max=1, nominal=0.4);
Boolean bBigger;
equation
bBigger = b > aNominal;
like image 61
kabdelhak Avatar answered Feb 16 '26 20:02

kabdelhak