Opened 10 years ago

#3024 new defect

Support for if equations inside when equations

Reported by: Adrian Pop Owned by: somebody
Priority: high Milestone: Future
Component: Backend Version: trunk
Keywords: Cc: Lars.Mikelsons@…, Willi Braun, Lennart Ochel

Description

Currently the back-end cannot fully handle if equations inside when equations.
It can only handle if equations that can be transformed to if expressions.
So this kind of equations do fail in the back-end

when wE43_direct.switchingDynamics.ReachMiddle then
  if abs(wE43_direct.switchingDynamics.x_d) > wE43_direct.switchingDynamics.transVel 
  then
    reinit(wE43_direct.switchingDynamics.x_d,wE43_direct.switchingDynamics.coefficientOfDamping * pre(wE43_direct.switchingDynamics.x_d));
    wE43_direct.switchingDynamics.targetReached = false;
  else
    wE43_direct.switchingDynamics.targetReached = true;
    reinit(wE43_direct.switchingDynamics.x_d,0.0);
    reinit(wE43_direct.switchingDynamics.x,0.0);
  end if;
end when;

Change History (0)

Note: See TracTickets for help on using tickets.