Comments (3)
Regarding the first problem, PEleMin
is computed from tabular data. First, an external object parameter is created by means of an internal CombiTable2D function call
parameter Modelica.Blocks.Types.ExternalCombiTable2D tabIdePEle=
Modelica.Blocks.Types.ExternalCombiTable2D(
"NoName",
"NoName",
tabPEle.table,
smoothness,
extrapolation,
false) "External table object for nominal electrical power consumption";
then, the flat model contains
final parameter Real heaPum.refCyc.refCycHeaPumHea.PEle_nominal(quantity = "Power", unit = "W") =
Modelica.Blocks.Tables.Internal.getTable2DValueNoDer2(
heaPum.refCyc.refCycHeaPumHea.tabIdePEle,
heaPum.refCyc.refCycHeaPumHea.TCon_nominal,
heaPum.refCyc.refCycHeaPumHea.TEva_nominal) *
heaPum.refCyc.refCycHeaPumHea.scaFac "Nominal electrical power consumption";
which looks good.
However, in the debugger we see:
(assign) heaPum.refCyc.refCycHeaPumHea.PEle_nominal :=
Modelica.Blocks.Tables.Internal.getTable2DValueNoDer2(
heaPum.refCyc.refCycHeaPumHea.tabIdePEle,
false,
Modelica.Fluid.Types.Dynamics.FixedInitial) *
heaPum.refCyc.refCycHeaPumHea.scaFac
So, during code generation, at some point the two Real inputs TCon_nominal
and TEva_nominal
were replaced by a Boolean and an enumeration value.
Running the model with -d=optdaedump
crashes OMEdit, probably because there is something fishy going on.
from openmodelica.
Got it, by running -d=optdaedump from the command line. The issue is in the pre-optimization module evaluateParameters (simulation)
. Before that module runs, we see
3168: heaPum.refCyc.refCycHeaPumHea.PEle_nominal:PARAM(unit = "W" final = true ) =
Modelica.Blocks.Tables.Internal.getTable2DValueNoDer2(heaPum.refCyc.refCycHeaPumHea.tabIdePEle,
heaPum.refCyc.refCycHeaPumHea.TCon_nominal,
heaPum.refCyc.refCycHeaPumHea.TEva_nominal) *
heaPum.refCyc.refCycHeaPumHea.scaFac "Nominal electrical power consumption" type: Real
which is fine. After that module runs, we see
3168: heaPum.refCyc.refCycHeaPumHea.PEle_nominal:PARAM(unit = "W" final = true ) =
Modelica.Blocks.Tables.Internal.getTable2DValueNoDer2(
heaPum.refCyc.refCycHeaPumHea.tabIdePEle,
false,
Modelica.Fluid.Types.Dynamics.FixedInitial) *
heaPum.refCyc.refCycHeaPumHea.scaFac "Nominal electrical power consumption" type: Real
which is obviously nonsense.
@phannebohm, @kabdelhak can you please check what is going wrong in that module and fix it?
Thanks
from openmodelica.
Is this new or old backend? You link to the old one.
I'm having trouble reproducing the issue. When I use this script (old backend):
loadModel(Buildings, priorityVersion = {"12.0.0-master"}); getErrorString();
simulate(Buildings.Fluid.HeatPumps.ModularReversible.Examples.LargeScaleWaterToWater_OneRoomRadiator); getErrorString();
I get the following result:
true
""
record SimulationResult
resultFile = "/home/ph/ws/models/test/Buildings.Fluid.HeatPumps.ModularReversible.Examples.LargeScaleWaterToWater_OneRoomRadiator_res.mat",
simulationOptions = "startTime = 0.0, stopTime = 86400.0, numberOfIntervals = 500, tolerance = 1e-8, method = 'dassl', fileNamePrefix = 'Buildings.Fluid.HeatPumps.ModularReversible.Examples.LargeScaleWaterToWater_OneRoomRadiator', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
messages = "LOG_ASSERT | warning | [/home/ph/.openmodelica/libraries/Buildings 12.0.0-master/Fluid/HeatPumps/ModularReversible/TableData2D.mo:78:3-83:28:writable]
| | | | The following assertion has been violated during initialization at time 0.000000
| | | | ((abs(heaPum.scaFacHea - heaPum.scaFacCoo) / heaPum.scaFacHea < heaPum.limWarSca)) --> \"In LargeScaleWaterToWater_OneRoomRadiator.heaPum: Scaling factors for heating and cooling
| | | | operation differ by 95.9592 %. The simulated nominal heating and cooling
| | | | capacities may not be realistic for a single device\"
LOG_SUCCESS | info | The initialization finished successfully with 3 homotopy steps.
LOG_SUCCESS | info | The simulation finished successfully.
",
timeFrontend = 1.107622303,
timeBackend = 1.06267989,
timeSimCode = 0.137295308,
timeTemplates = 0.178590055,
timeCompile = 1.298441242,
timeSimulation = 0.281521631,
timeTotal = 4.06624667
end SimulationResult;
"Warning: The model contains alias variables with redundant start and/or conflicting nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts.
"
The new backend doesn't come this far:
true
""
record SimulationResult
resultFile = "",
simulationOptions = "startTime = 0.0, stopTime = 86400.0, numberOfIntervals = 500, tolerance = 1e-8, method = 'dassl', fileNamePrefix = 'Buildings.Fluid.HeatPumps.ModularReversible.Examples.LargeScaleWaterToWater_OneRoomRadiator', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
messages = "Failed to build model: Buildings.Fluid.HeatPumps.ModularReversible.Examples.LargeScaleWaterToWater_OneRoomRadiator",
timeFrontend = 0.0,
timeBackend = 0.0,
timeSimCode = 0.0,
timeTemplates = 0.0,
timeCompile = 0.0,
timeSimulation = 0.0,
timeTotal = 0.0
end SimulationResult;
"[/home/ph/ws/OpenModelica/OMCompiler/Compiler/NFFrontEnd/NFComponentRef.mo:595:7-598:102:writable] Error: Internal error NFComponentRef.mergeSubscripts failed because the subscripts {$i1} could not be fully merged onto rad.vol.dynBal.Medium.nC.
Result: rad.vol.dynBal.Medium.nC with leftover: {$i1}.
"
from openmodelica.
Related Issues (20)
- Usage of setCommandLineOptions vs. CompilerFlag and SimulationFlag HOT 3
- Improve documentation of the omc scripting language HOT 1
- Model Buildings.Fluid.HeatPumps.Validation.ReciprocatingWaterToWater_Static fails verification (missing equation) HOT 2
- Array of custom model causes translation error in NFRangeIterator.hasNext on model check HOT 1
- The model Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.InjectionTwoWayCheckValve fails verification (possible flattening issue) HOT 1
- Internal Errors when checking the Modelica Standard Libary. HOT 4
- Models in package Buildings.Occupants.BaseClasses.Validation fail verefication due to differencies in random number generation HOT 2
- model Buildings.Templates.Plants.Controls.HeatRecoveryChillers.Validation.EnableAndModeControl fails verification (threshold issue) HOT 1
- Model Buildings.Templates.Plants.Controls.Setpoints.Validation.PlantReset fail verification (synchronization) HOT 1
- Experiment annotation ignored by OMC in Buildings.Fluid.HeatPumps.ModularReversible.Examples.AirToWater2D_OneRoomRadiator HOT 1
- Base Modelica output fails in Buildings.Fluid.HeatPumps.ModularReversible.Examples.AirToWater2D_OneRoomRadiator
- Division by zero with 1.22 (and higher) but not with 1.21 in a simple model. HOT 13
- Potentially important min violation warnings are lost
- Model Buildings.Templates.Plants.Controls.StagingRotation.Validation.EquipmentEnable fails verification HOT 1
- OMEdit 1.23.1: graphical connect broken (wrong port selected) HOT 5
- New Backend regression following #12562 HOT 2
- #12707 for clocked systems caused 600+ regressions on non-clocked systems HOT 3
- #12530 caused 245 regressions HOT 1
- List of tickets related to models that fail the verification due to the event iteration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openmodelica.