- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Can someone explain when exactly can...
Can someone explain when exactly can pre() be used?
Can someone explain when exactly can pre() be used?
I have a load attached to a battery model. I am trying to count the number of charging/discharging cycles the battery is going through. PNet is the power flowing through the battery (positive for discharging and negative for charging).
I write the following and I always get the following errors.
1. It is not allowed to use pre for a continuous time variable outside a when clause
2. The when-condition must be a discrete expression:
I am completely new to programming and Modelica. So, can someone explain when pre() can be used?
For example if PNet is changing continuously with time, can I ever get a value of pre(PNet)?
And if I can somehow get this, can I use this to build "if" or "when" expressions?
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Can someone explain when exactly can...