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

Too many state events

Too many state events

The setup in the attached file "correctNumberOfStateEvents" is:
A sine source feeds a zeroCrossing block with a booleanExpression defining its "enable" port; the output from the zeroCrossing block is connected to the "set" port of an rSFlipFlop block. This configuration is repeated, the first has the "enable" booleanExpression as "time>0.2 and time<0.3", the repeated configuration has "time>1.2 and time<1.3". The model is simulated for 2 seconds and produces the expected number of state events in the output log file (about 8). All's good.

The setup in the attached file "tooManyStateEvents" is:
Exactly the same as above except the 2 configurations share the same sine source block. This leads to a state event being triggered at every zero crossing event throughout the simulation (about 40+) with the "enable" port signals apparently being ignored.

Any thoughts as to whether this is expected behaviour or a bug?

Thanks, Bob

correctNumberOfStateEvents.mo

tooManyStateEvents.mo

There are 0 guests and 0 other users also viewing this topic