- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » variables and constants
variables and constants
Re: variables and constants
Code:
model goo
parameter Real x;
constant Integer c = 3;
Real y
equation
y = c * x;
end goo;
y is a variable that will be calulated in the simulation, x is a variable that you can change before a simulation (but will held cosntant from t=0 until t=end) and c is a constant that you define in the model and can not be change directly.
hope it helps.One good read about modeling in modelica could be found in http://book.xogeny.com/ if you are interested.
cheers
- Arinomo23
- 120 Posts
Re: variables and constants
Hello,
thank you @Arinomo23, your answer it was helpful
now I have another question if you want, it is about blocks in OpenModelica, so can you tell me how I can create a block MIMO in OpenModelica and how I can specify the inputs and the outputs in the programme that I will write in this block,
thank you in advance for your answer.
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » variables and constants