Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

When not respected in cycle for

When not respected in cycle for

Hi,
I started to use openModelica because I must simulate a simple project with it.
My project consists to simulate the trajectories of 15 balls on a table (billiards).

I have a problem: when I simulate the condition "when" in the cycle for isn't respected.

for j in 1:n loop
    when x[j] <= 0.05 then
      reinit(dx[j], pre(dx[j]));
    end when;

How I can fix it?


Tesina.mo

Edited by: Ilthebest - Jun-17-15 15:51:53
Attachments:
There are 0 guests and 0 other users also viewing this topic
You are here: