You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following del.sampleTrigger triggers at t=0, 0.1, 0.2, ... and
sample(booleanPulse.startTime, booleanPulse.period) triggers at t=0,0.25, 0.5, ... .
when {del.sampleTrigger, initial()} then
del.y := del.ySample;
del.ySample := del.u;
end when;
equation
del.sampleTrigger = sample(del.startTime, del.samplePeriod);
when del.sampleTrigger then
del.firstTrigger = time <= del.startTime + del.samplePeriod / 2;
end when;
when sample(booleanPulse.startTime, booleanPulse.period) then
booleanPulse.pulsStart = time;
end when;
booleanPulse.y = time >= booleanPulse.pulsStart and time < booleanPulse.pulsStart + booleanPulse.Twidth;
booleanPulse.y = del.u;
This means that at time t=0.5 both triggers at the same time.
According to the Modelica specification 8.5 the order of time events should be explicitly defined in the models:
There is no guarantee that two different events occur at the same time instant.
[As a consequence, synchronization of events has to be explicitly programmed in the model, e.g. via count
In this case the execution order differs between JModelica and Dymola and we do not get the same trajectory for del.y (due to del.u not updated in same order).
Could you update the model so that the execution order will be explicitly defined?
The text was updated successfully, but these errors were encountered:
@agnesramle : I corrected the model. @tsnouidui : Can you please update Annex60_Controls_Discrete_Examples_BooleanDelay.txt on the verification branch.
In the following del.sampleTrigger triggers at t=0, 0.1, 0.2, ... and
sample(booleanPulse.startTime, booleanPulse.period) triggers at t=0,0.25, 0.5, ... .
This means that at time t=0.5 both triggers at the same time.
According to the Modelica specification 8.5 the order of time events should be explicitly defined in the models:
In this case the execution order differs between JModelica and Dymola and we do not get the same trajectory for del.y (due to del.u not updated in same order).
Could you update the model so that the execution order will be explicitly defined?
The text was updated successfully, but these errors were encountered: