initial equation for ThermoSysPro.InstrumentationAndControl.Blocks.Continu.Integrateur

Issue

Description

When reset.signal is false the initial equation is:

 x = (1/k - 1) * ureset.signal/k;

and the output is

y.signal = if reset.signal then ureset.signal else k*x;

i.e. k*x which is not ureset.signal:

nota : In the equation there is a when condition but it works only on transition.

Clearly and concisely describe the problem encountered.

  • the value of the Integrator output is not set to the ureset.signal at start time.

Expected Behavior

Describe what you expected to happen.

  • the value of the Integrator output is set a the ureset.signal.

Actual Behavior

Describe what actually happens.

Environment

  • Operating System: (Linux/Windows)
  • Modelica Environment Used (and corresponding version): (OpenModelica 1.23/Dymola 23x)
  • ThermoSysPro's commit/version used: dfe1168a/4.0

Steps to Reproduce

Please provide any material needed to reproduce your output, from a list of steps to reproduce it to a .mat file or a .mos script.

  1. Describe the first step.
  2. Describe the second step.
  3. ...

Example of .mos file for Dymola :

openModel("ThermoSysPro/package.mo", changeDirectory=false);
checkModel("ThermoSysPro.Examples.SimpleExamples.TestBend");
translateModel("ThermoSysPro.Examples.SimpleExamples.TestBend");
simulateModel(problem="ThermoSysPro.Examples.SimpleExamples.TestBend", startTime=0, stopTime=1, method="dassl", tolerance=1e-4);

Example of .mos file for OpenModelica :

loadModel(Modelica,{"4.0"}); getErrorString();
loadModel(ThermoSysPro,{"4.0"});getErrorString();
simulate(ThermoSysPro.Examples.SimpleExamples.TestBend); getErrorString();

Logs and Screenshots

Add logs or screenshots if needed.

Additional Notes

Add any additional information that might be useful.