Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analysis of example models of MSL v4.0.0-beta.1 failing a pedantic translation #3435

Closed
14 of 18 tasks
beutlich opened this issue Feb 23, 2020 · 10 comments
Closed
14 of 18 tasks
Assignees
Labels
L: Blocks Issue addresses Modelica.Blocks L: Clocked Issue addresses Modelica.Clocked L: Electrical.Spice3 Issue addresses Modelica.Electrical.Spice3 L: Fluid Issue addresses Modelica.Fluid (excl. Dissipation) L: Magnetic.FluxTubes Issue addresses Modelica.Magnetic.FluxTubes L: Magnetic.QuasiStatic Issue addresses Modelica.Magnetic.QuasiStatic V: 4.0.0-dev Issue originates in MSL v4.0.0-dev (and is not present in earlier releases)

Comments

@beutlich
Copy link
Member

beutlich commented Feb 23, 2020

The following models/blocks with StopTime annotation fail translation if pedantic=true:

  • Modelica.Blocks.Examples.PID_Controller
  • Modelica.Clocked.Examples.Systems.EngineThrottleControl
  • Modelica.Clocked.Examples.Elementary.ClockSignals.RotationalSample
  • Modelica.Clocked.Examples.Elementary.ClockSignals.LogicalSample
  • Modelica.Electrical.Spice3.Examples.Oscillator
  • Modelica.Electrical.Spice3.Examples.CoupledInductors
  • Modelica.Magnetic.FluxTubes.Examples.Hysteresis.HysteresisModelComparison
  • Modelica.Magnetic.FluxTubes.Examples.Hysteresis.SinglePhaseTransformerWithHysteresis1
  • Modelica.Magnetic.FluxTubes.Examples.Hysteresis.SinglePhaseTransformerWithHysteresis2
  • Modelica.Magnetic.FluxTubes.Examples.Hysteresis.ThreePhaseTransformerWithRectifier
  • Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.Leakage.CylinderLeakage
  • Modelica.Magnetic.QuasiStatic.FluxTubes.Examples.Leakage.GeneralLeakage
  • Modelica.Fluid.Examples.HeatingSystem
  • Modelica.Fluid.Examples.AST_BatchPlant.Test.OneTank
  • Modelica.Fluid.Examples.NonCircularPipes
  • Modelica.Fluid.Examples.TraceSubstances.RoomCO2WithControls
  • Modelica.Fluid.Examples.InverseParameterization
  • Modelica.Fluid.Examples.Explanatory.MeasuringTemperature
@beutlich beutlich added L: Blocks Issue addresses Modelica.Blocks L: Electrical.Spice3 Issue addresses Modelica.Electrical.Spice3 L: Fluid Issue addresses Modelica.Fluid (excl. Dissipation) L: Magnetic.FluxTubes Issue addresses Modelica.Magnetic.FluxTubes L: Magnetic.QuasiStatic Issue addresses Modelica.Magnetic.QuasiStatic L: Clocked Issue addresses Modelica.Clocked V: 4.0.0-dev Issue originates in MSL v4.0.0-dev (and is not present in earlier releases) labels Feb 23, 2020
@beutlich beutlich added this to the MSL4.0.0 milestone Feb 23, 2020
@beutlich beutlich changed the title Analysis of example models of ModelicaTest v4.0.0-beta.1 failing a pedantic translation Analysis of example models of MSL v4.0.0-beta.1 failing a pedantic translation Feb 23, 2020
@beutlich
Copy link
Member Author

beutlich commented Feb 23, 2020

Hysteresis models are addressed by #3427.

@beutlich
Copy link
Member Author

Spice3 models are addressed by #3438.

christiankral added a commit to christiankral/ModelicaStandardLibrary that referenced this issue Feb 25, 2020
bernhard-thiele added a commit to bernhard-thiele/ModelicaStandardLibrary that referenced this issue Feb 26, 2020
Fixes the pedantic translation issues reported in modelica#3435 for the example models
- Modelica.Clocked.Examples.Systems.EngineThrottleControl
- Modelica.Clocked.Examples.Elementary.ClockSignals.RotationalSample
- Modelica.Clocked.Examples.Elementary.ClockSignals.LogicalSample
beutlich pushed a commit that referenced this issue Feb 26, 2020
Fixes the pedantic translation issues reported in #3435 for the example models
- Modelica.Clocked.Examples.Systems.EngineThrottleControl
- Modelica.Clocked.Examples.Elementary.ClockSignals.RotationalSample
- Modelica.Clocked.Examples.Elementary.ClockSignals.LogicalSample
dietmarw pushed a commit that referenced this issue Feb 28, 2020
@casella
Copy link
Contributor

casella commented Mar 3, 2020

@beutlich, I just checked all the Modelica.Fluid examples on branch v4.0.0-beta.1 using Dymola 2020x and pedantic mode, but I don't get any error or warning. Can you please report which errors do you get?

@beutlich
Copy link
Member Author

beutlich commented Mar 7, 2020

Here the warnings:

Translation of Modelica.Fluid.Examples.HeatingSystem:

Some variables are iteration variables of the initialization problem:
but they are not given any explicit start values. Zero will be used.

Iteration variables:
der(tank.V)
Translation of Modelica.Fluid.Examples.AST_BatchPlant.Test.OneTank:

The initial conditions are not fully specified.
Dymola has selected default initial conditions.

Assuming fixed start value for the continuous states:
tank.level(start = tank.level_start)
tank.medium.T(start = tank.T_start)
Translation of Modelica.Fluid.Examples.NonCircularPipes:

Redundant consistent initial conditions.

Removed the following equations which are redundant and consistent: 
circular_pipe.port_a.p = circular_pipe.mediums[1].p;
annulus_pipe.port_a.p = annulus_pipe.mediums[1].p;

This required evaluation of 
the interactive parameters 
boundary.p(start = 1000000.0)

The redundancies involve
initial equations: 
circular_pipe.mediums[1].p = 1000000.0;
annulus_pipe.mediums[1].p = 1000000.0;
Translation of Modelica.Fluid.Examples.TraceSubstances.RoomCO2WithControls:

The initial conditions are not fully specified.
Dymola has selected default initial conditions.

Assuming fixed start value for the continuous states:
PID.I.y(start = PID.I.y_start)
Translation of Modelica.Fluid.Examples.Explanatory.MeasuringTemperature:

Some variables are iteration variables of the initialization problem:
but they are not given any explicit start values. Zero will be used.

Iteration variables:
der(openTankCold3.m)
der(openTankHot1.m)
der(openTankHot2.m)

I can no longer reproduce Modelica.Fluid.Examples.InverseParameterization.

@beutlich
Copy link
Member Author

@AHaumer @christiankral Can you please have a look at Modelica.Blocks.Examples.PID_Controller. It is not a big deal to set this initial condition (somewhere hidden in the component), the actual trouble is, if PID is missing such an option generally.

@christiankral
Copy link
Contributor

@AHaumer @christiankral Can you please have a look at Modelica.Blocks.Examples.PID_Controller. It is not a big deal to set this initial condition (somewhere hidden in the component), the actual trouble is, if PID is missing such an option generally.

@beutlich So this means that we actually need a new ticket to consistently set the initial conditions in each case of controller configurations (P, PI, PD, PID).

@beutlich
Copy link
Member Author

Yes, that is the question I was asking myself.

christiankral added a commit to christiankral/ModelicaStandardLibrary that referenced this issue Mar 16, 2020
beutlich pushed a commit that referenced this issue Mar 17, 2020
@beutlich
Copy link
Member Author

Removing milestone after discussion stopped.

@beutlich beutlich removed this from the MSL4.0.0 milestone Apr 27, 2020
@beutlich
Copy link
Member Author

Modelica.Fluid.Examples.TraceSubstances.RoomCO2WithControls was fixed en passant by a0b60a0.

@beutlich beutlich pinned this issue May 15, 2020
@beutlich beutlich unpinned this issue May 15, 2020
@beutlich
Copy link
Member Author

Closing after MSL v4.0.0 was released. It is a "WontFix" for the four Fluid examples that still raise initialization warnings in pedantic mode.

  • Modelica.Fluid.Examples.HeatingSystem
  • Modelica.Fluid.Examples.AST_BatchPlant.Test.OneTank
  • Modelica.Fluid.Examples.NonCircularPipes
  • Modelica.Fluid.Examples.Explanatory.MeasuringTemperature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: Blocks Issue addresses Modelica.Blocks L: Clocked Issue addresses Modelica.Clocked L: Electrical.Spice3 Issue addresses Modelica.Electrical.Spice3 L: Fluid Issue addresses Modelica.Fluid (excl. Dissipation) L: Magnetic.FluxTubes Issue addresses Modelica.Magnetic.FluxTubes L: Magnetic.QuasiStatic Issue addresses Modelica.Magnetic.QuasiStatic V: 4.0.0-dev Issue originates in MSL v4.0.0-dev (and is not present in earlier releases)
Projects
None yet
Development

No branches or pull requests

5 participants