SimulationX Modelica last, . , .
last - x . . .
model test "test.ism"
extends SimModel;
Real x=2*sin(2*pi*time)+sin(20*pi*time)+(if time < 0.5 then 0 else 3) "some input signal with jump";
Real y=if noEvent( time > time.start ) then max(x,last(y)) else x "Calculate the maximum with the help of the last-operator";
Real z(start=0,fixed=true)=-der(z)+y "Just any dymanics.";
end test;
x y .
