- Index
- » Programming
- » Modelica Language
- » implementing a
Page Start Prev 1 Next End
implementing a
implementing a
Feb-04-13 18:08:30
I would like to do something like this: In this model X should be increased by "1" with each timestep of the simulation. But I always get this error:
Code:
assert | assert | ERROR: Too many event iterations. System is inconsistent. Simulation terminate.
Code:
class stepfunction
parameter Real seed = 1234;
parameter Real range = 10;
Integer X(start = 0);
algorithm
X := X+1;
end stepfunction;
Any Idea, or hint what I could change to make it work?
Edited by: yeus - Feb-04-13 18:09:03
Re: implementing a
Feb-04-13 18:28:29
You want to use x := pre(x) + 1;
But that wll only increase the value by one at each discrete time step. I believe there is no way to increase x by one at each continuous step.
- sjoelund.se
- 1700 Posts
Page Start Prev 1 Next End
- Index
- » Programming
- » Modelica Language
- » implementing a
There are 0 guests and 0 other users also viewing this topic