I know I can change the definitions File_init.txt, but I was wondering if there is a way to do this in the class file (.mo) or in the compiler directive (omc).
In an attempt to alleviate the lack of a has-a relationship in Modelica , I write a Perl shell that records the highest level of my Modelica Modeling (with mine has-aturned into ifand operators when) and compilation ( omc +sthen make) and it simulates. It would be great if I could specify parameters such as stop, step, outputFormatin some other way, instead of having to open the initialization file and attempt to replace the regexp to them that really awkward.
In short, is there any directive like the one below (pseudo-code)?
class MainSim
extends BaseSim;
...
simulation.stop = 1E-9;
simulation.step = 1E-12;
simulation.outputFormat = "csv";
...
equation
...
end MainSim;
source
share