Opened 13 years ago

Closed 12 years ago

#1690 closed defect (fixed)

initial algorithm aren't considered while the initialization

Reported by: Willi Braun Owned by: Lennart Ochel
Priority: high Milestone: 1.9.0
Component: Backend Version: trunk
Keywords: initial algorithm Cc: Willi Braun, Lennart Ochel, Jens Frenkel

Description (last modified by Willi Braun)

The following model isn't initial correctly.

loadString("model m1
  Real a;
  Real b(fixed = false);
initial algorithm
  b:=a ^ 2;
equation
  sin(time)+1 = a;
  der(b) = b;
end m1;");
simulate(m1);
val(b,0.0);
val(b,0.5);
val(b,1.0);

Change History (6)

comment:1 by Lennart Ochel, 13 years ago

currently, initial algorithms are not supported at all

comment:2 by Willi Braun, 12 years ago

Component: Backend
Owner: changed from Willi Braun to Lennart Ochel
Status: acceptedassigned

comment:3 by Lennart Ochel, 12 years ago

Resolution: fixed
Status: assignedclosed

val(b, 0.0) = 9.0

comment:4 by Willi Braun, 12 years ago

Description: modified (diff)
Resolution: fixed
Status: closedreopened

comment:5 by Jens Frenkel, 12 years ago

Cc: Jens Frenkel added
Keywords: initial algorithm added
Milestone: 1.9.0
Version: trunk

in the current implementation initial algorithms and tuple initial equations (because the are lowered to algorithms in BackendDAECreate) are not part of the initial System but of the bound parameter Equations. To support some msl31 and msl32 examples it would be good to implement support for this.

in reply to:  description comment:6 by Lennart Ochel, 12 years ago

Resolution: fixed
Status: reopenedclosed

m1 initialized correctly

Replying to wbraun:

The following model isn't initial correctly.

loadString("model m1
  Real a;
  Real b(fixed = false);
initial algorithm
  b:=a ^ 2;
equation
  sin(time)+1 = a;
  der(b) = b;
end m1;");
simulate(m1);
val(b,0.0);
val(b,0.5);
val(b,1.0);
Note: See TracTickets for help on using tickets.