HADJ AMOR HASSEN
Fri, 05 Feb 2010 03:07:20 -0800
Try to add this in the bloc equation when initial() then reinit(storage, 0); end when;
--- En date de : Ven 5.2.10, Tukaram <tuka...@openaqua.de> a écrit :
De: Tukaram <tuka...@openaqua.de>
Objet: start != start
À: openmodelicainterest@ida.liu.se
Date: Vendredi 5 Février 2010, 9h47
Dear Sirs,
I have this simple model:
--------------
class Building
parameter Real offer=1000;
Real storage(start=0);
equation
when sample(1,1) then
storage=pre(storage)+offer;
end when;
end Building;
--------------
It will be simulated with the following commands:
-------------
simulate( Building, startTime=0, stopTime=8 );
plot({storage})
-------------
The Plot shows me plus 1000 on the storage per second (fine) but the
storage starts with a value of 1000 (not fine). I would expect a start
value 0.
What is going wrong? Has someone with more Modelica experience a hint for
me? :-)
Kindly Regards