Hi,
package motion
model ramp
type State = enumeration (A,B,C);
discrete State state(start = State.A);
discrete Integer i(start = 10);
algorithm
when sample(0,1) then
i := i + 1;
// state := State.A; // error when uncommented
end when;
end ramp;
end motion;
I want to separate the motion equations into 3 states: accelerating,driving,decelerating
each state will provide its own equations for x and v.
Unfortunately the above code gives an error. Is there something wrong with usage of
enumeration variables or are enumerations not supported for the purpose I would like them to use?
Thanks in advance,
Daniel
