- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Choice of state variables
Choice of state variables
Choice of state variables
I use OpenModelica in a class making comparison with block diagram based modelling.
I'd like to show which variables are chosen as state variables and therefore which variables need an initial value.
I wonder if a file is produce when compiling the model.
Re: Choice of state variables
Well, you could look in the result file: If there is a der(x), x is a state variable.
You could also look in the _init.xml file:
Code:
<ScalarVariable
name = "x"
valueReference = "1000"
variability = "continuous" isDiscrete = "false"
causality = "internal" isValueChangeable = "true"
alias = "noAlias"
classIndex = "0" classType = "rSta"
isProtected = "false" hideResult = "false"
fileName = "/home/marsj/tmp/a.mo" startLine = "2" startColumn = "3" endLine = "2" endColumn = "9" fileWritable = "true">
<Real fixed="false" useNominal="false" />
</ScalarVariable>
classType = "rSta" is a state variable.
- sjoelund.se
- 1700 Posts
Re: Choice of state variables
Hi,
thanks for the help! Surely, I can look at which variables have derivatives computed.
As I said, I'd like to have a file to show the students but I cannot find the _init.xml file. Shall I set some options in order to produce the file?
I cannot find any file produced under compilation.
Anna
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Choice of state variables