Hi, I have a very simple question about Modelica

I have a simple hello world class: class Mode   parameter Real a=-1;   Real x(start=1); equation   der(x)=a*x; end Mode;

I want to run this model for a certain period, for example 1 hour, but every 5 minute I want to change the parameter a (for example from -1 to 1). Of course for each step the initial values of the variables must be the final values of the previous step.

Is there a simple solution? For instance can I use the block like "ramp" as an input of my model ?

Thank you

More Giuseppe Marco Tina's questions See All
Similar questions and discussions