Opened 18 years ago

Last modified 18 years ago

#103 closed defect (fixed)

initial() does not seem to work

Reported by: gunnar.andersson Owned by: gunnar.andersson
Priority: critical Milestone:
Component: Version:
Keywords: Cc: gunnar.andersson, haklu

Description


Change History (2)

comment:1 Changed 18 years ago by gunnar.andersson

Consider the following model:

class InitialBug

Real x(start = 1.5);
discrete Real y;

equation

when {initial(), sample(0.2, 0.5)} then

y = x;

end when;
der(x) = -x;

end InitialBug;

When simulated and plotted using

simulate(InitialBug)
plot({x, y})

one sees that y(t) is 0 for t in [0, 0.2), not the expected value 1.5.

Possible cause: Builtin.initialEnv initializes an operator called "inital".
This looks like a typo.

comment:2 Changed 18 years ago by petar

Håkan, this probably belongs to you. Maybee you have already fixed it in our
"branch".

Note: See TracTickets for help on using tickets.