Skip to content

Commit

Permalink
Expected output after relaxing constructor checks
Browse files Browse the repository at this point in the history
External object constructor inputs are no longer forced to be evaluated.
These testsuite changes are updates for ticket:4207.
  • Loading branch information
sjoelund authored and OpenModelica-Hudson committed Feb 21, 2017
1 parent cd62054 commit ca74ffb
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 68 deletions.
2 changes: 1 addition & 1 deletion flattening/libraries/3rdParty/Buildings/System2.mo
Expand Up @@ -8821,7 +8821,7 @@ end System2;
// final parameter Real timTab.t_min(quantity = "Time", unit = "s", fixed = false);
// final parameter Real timTab.t_max(quantity = "Time", unit = "s", fixed = false);
// protected final parameter Real timTab.p_offset[1] = timTab.offset[1];
// protected Modelica.Blocks.Types.ExternalCombiTimeTable timTab.tableID = Modelica.Blocks.Types.ExternalCombiTimeTable.constructor("NoName", "NoName", {{0.0, 0.0}, {28800.0, 0.0}, {28800.0, 4000.0}, {64800.0, 4000.0}, {64800.0, 0.0}, {86400.0, 0.0}}, timTab.startTime, {timTab.columns[1]}, timTab.smoothness, timTab.extrapolation);
// protected Modelica.Blocks.Types.ExternalCombiTimeTable timTab.tableID = Modelica.Blocks.Types.ExternalCombiTimeTable.constructor(if timTab.tableOnFile then timTab.tableName else "NoName", if timTab.tableOnFile and timTab.fileName <> "NoName" and not Modelica.Utilities.Strings.isEmpty(timTab.fileName) then timTab.fileName else "NoName", {{timTab.table[1,1], timTab.table[1,2]}, {timTab.table[2,1], timTab.table[2,2]}, {timTab.table[3,1], timTab.table[3,2]}, {timTab.table[4,1], timTab.table[4,2]}, {timTab.table[5,1], timTab.table[5,2]}, {timTab.table[6,1], timTab.table[6,2]}}, timTab.startTime, {timTab.columns[1]}, timTab.smoothness, timTab.extrapolation);
// protected discrete Real timTab.nextTimeEvent(quantity = "Time", unit = "s", start = 0.0, fixed = true);
// protected parameter Real timTab.tableOnFileRead(fixed = false);
// parameter Boolean rad.allowFlowReversal = system.allowFlowReversal;
Expand Down
3 changes: 0 additions & 3 deletions flattening/modelica/connectors/Ticket4062.mo
Expand Up @@ -485,7 +485,4 @@ end Ticket4062;
// serialReceive.pkgOut.userPkgBitSize = unpackInt.pkgIn.userPkgBitSize;
// integerToReal.u = unpackInt.y;
// end Ticket4062;
// [flattening/modelica/connectors/Ticket4062.mo:85:38-85:147:writable] Warning: OpenModelica requires that all external objects input arguments are possible to evaluate before initialization in order to avoid odd run-time failures, but if autoBufferSize then bufferSize else userBufferSize is a variable.
// [flattening/modelica/connectors/Ticket4062.mo:88:9-88:206:writable] Warning: OpenModelica requires that all external objects input arguments are possible to evaluate before initialization in order to avoid odd run-time failures, but if autoBufferSize then bufferSize else userBufferSize is a variable.
//
// endResult
4 changes: 1 addition & 3 deletions flattening/modelica/equations/Bug4124.mos
Expand Up @@ -181,7 +181,5 @@ instantiateModel(Bug4124); getErrorString();
// unpackInt.pkgOut[1].userPkgBitSize = unpackInt1.pkgIn.userPkgBitSize;
// end Bug4124;
// "
// "[flattening/modelica/equations/Bug4124.mo:80:38-80:147:writable] Warning: OpenModelica requires that all external objects input arguments are possible to evaluate before initialization in order to avoid odd run-time failures, but if autoBufferSize then bufferSize else userBufferSize is a variable.
// [flattening/modelica/equations/Bug4124.mo:83:9-83:206:writable] Warning: OpenModelica requires that all external objects input arguments are possible to evaluate before initialization in order to avoid odd run-time failures, but if autoBufferSize then bufferSize else userBufferSize is a variable.
// "
// ""
// endResult
50 changes: 0 additions & 50 deletions flattening/modelica/others/ExternalObjectVariable.mo

This file was deleted.

1 change: 0 additions & 1 deletion flattening/modelica/others/Makefile
Expand Up @@ -33,7 +33,6 @@ EndIllegal.mo \
EndUnknown.mo \
ExtObjError.mo \
ExtObjError2.mo \
ExternalObjectVariable.mo \
FaultNonPropagation.mo \
FlexibleShaftNonLinearTotal.mo \
FlowInvalid1.mo \
Expand Down
Expand Up @@ -2450,7 +2450,7 @@ instantiateModel(ThermoPower.Examples.BraytonCycle.ClosedLoopSimulator); getErro
// parameter String plant.compressor.Eta.fileName = if plant.compressor.Table == ThermoPower.Choices.TurboMachinery.TableTypes.matrix then \"NoName\" else plant.compressor.fileName;
// parameter Boolean plant.compressor.Eta.verboseRead = true;
// parameter enumeration(LinearSegments, ContinuousDerivative, ConstantSegments) plant.compressor.Eta.smoothness = Modelica.Blocks.Types.Smoothness.ContinuousDerivative;
// protected Modelica.Blocks.Types.ExternalCombiTable2D plant.compressor.Eta.tableID = Modelica.Blocks.Types.ExternalCombiTable2D.constructor(\"NoName\", \"NoName\", {{0.0, 95.0, 100.0, 105.0}, {1.0, 0.825, 0.8100000000000001, 0.805}, {2.0, 0.84, 0.829, 0.82}, {3.0, 0.832, 0.822, 0.8149999999999999}, {4.0, 0.825, 0.8120000000000001, 0.79}, {5.0, 0.795, 0.78, 0.765}}, plant.compressor.Eta.smoothness);
// protected Modelica.Blocks.Types.ExternalCombiTable2D plant.compressor.Eta.tableID = Modelica.Blocks.Types.ExternalCombiTable2D.constructor(if plant.compressor.Eta.tableOnFile then plant.compressor.Eta.tableName else \"NoName\", if plant.compressor.Eta.tableOnFile and plant.compressor.Eta.fileName <> \"NoName\" and not Modelica.Utilities.Strings.isEmpty(plant.compressor.Eta.fileName) then plant.compressor.Eta.fileName else \"NoName\", {{plant.compressor.Eta.table[1,1], plant.compressor.Eta.table[1,2], plant.compressor.Eta.table[1,3], plant.compressor.Eta.table[1,4]}, {plant.compressor.Eta.table[2,1], plant.compressor.Eta.table[2,2], plant.compressor.Eta.table[2,3], plant.compressor.Eta.table[2,4]}, {plant.compressor.Eta.table[3,1], plant.compressor.Eta.table[3,2], plant.compressor.Eta.table[3,3], plant.compressor.Eta.table[3,4]}, {plant.compressor.Eta.table[4,1], plant.compressor.Eta.table[4,2], plant.compressor.Eta.table[4,3], plant.compressor.Eta.table[4,4]}, {plant.compressor.Eta.table[5,1], plant.compressor.Eta.table[5,2], plant.compressor.Eta.table[5,3], plant.compressor.Eta.table[5,4]}, {plant.compressor.Eta.table[6,1], plant.compressor.Eta.table[6,2], plant.compressor.Eta.table[6,3], plant.compressor.Eta.table[6,4]}}, plant.compressor.Eta.smoothness);
// protected Real plant.compressor.Eta.tableOnFileRead;
// Real plant.compressor.PressRatio.u1;
// Real plant.compressor.PressRatio.u2;
Expand Down Expand Up @@ -2484,7 +2484,7 @@ instantiateModel(ThermoPower.Examples.BraytonCycle.ClosedLoopSimulator); getErro
// parameter String plant.compressor.PressRatio.fileName = if plant.compressor.Table == ThermoPower.Choices.TurboMachinery.TableTypes.matrix then \"NoName\" else plant.compressor.fileName;
// parameter Boolean plant.compressor.PressRatio.verboseRead = true;
// parameter enumeration(LinearSegments, ContinuousDerivative, ConstantSegments) plant.compressor.PressRatio.smoothness = Modelica.Blocks.Types.Smoothness.ContinuousDerivative;
// protected Modelica.Blocks.Types.ExternalCombiTable2D plant.compressor.PressRatio.tableID = Modelica.Blocks.Types.ExternalCombiTable2D.constructor(\"NoName\", \"NoName\", {{0.0, 95.0, 100.0, 105.0}, {1.0, 22.6, 27.0, 32.0}, {2.0, 22.0, 26.6, 30.8}, {3.0, 20.8, 25.5, 29.0}, {4.0, 19.0, 24.3, 27.1}, {5.0, 17.0, 21.5, 24.2}}, plant.compressor.PressRatio.smoothness);
// protected Modelica.Blocks.Types.ExternalCombiTable2D plant.compressor.PressRatio.tableID = Modelica.Blocks.Types.ExternalCombiTable2D.constructor(if plant.compressor.PressRatio.tableOnFile then plant.compressor.PressRatio.tableName else \"NoName\", if plant.compressor.PressRatio.tableOnFile and plant.compressor.PressRatio.fileName <> \"NoName\" and not Modelica.Utilities.Strings.isEmpty(plant.compressor.PressRatio.fileName) then plant.compressor.PressRatio.fileName else \"NoName\", {{plant.compressor.PressRatio.table[1,1], plant.compressor.PressRatio.table[1,2], plant.compressor.PressRatio.table[1,3], plant.compressor.PressRatio.table[1,4]}, {plant.compressor.PressRatio.table[2,1], plant.compressor.PressRatio.table[2,2], plant.compressor.PressRatio.table[2,3], plant.compressor.PressRatio.table[2,4]}, {plant.compressor.PressRatio.table[3,1], plant.compressor.PressRatio.table[3,2], plant.compressor.PressRatio.table[3,3], plant.compressor.PressRatio.table[3,4]}, {plant.compressor.PressRatio.table[4,1], plant.compressor.PressRatio.table[4,2], plant.compressor.PressRatio.table[4,3], plant.compressor.PressRatio.table[4,4]}, {plant.compressor.PressRatio.table[5,1], plant.compressor.PressRatio.table[5,2], plant.compressor.PressRatio.table[5,3], plant.compressor.PressRatio.table[5,4]}, {plant.compressor.PressRatio.table[6,1], plant.compressor.PressRatio.table[6,2], plant.compressor.PressRatio.table[6,3], plant.compressor.PressRatio.table[6,4]}}, plant.compressor.PressRatio.smoothness);
// protected Real plant.compressor.PressRatio.tableOnFileRead;
// Real plant.compressor.Phic.u1;
// Real plant.compressor.Phic.u2;
Expand Down Expand Up @@ -2518,7 +2518,7 @@ instantiateModel(ThermoPower.Examples.BraytonCycle.ClosedLoopSimulator); getErro
// parameter String plant.compressor.Phic.fileName = if plant.compressor.Table == ThermoPower.Choices.TurboMachinery.TableTypes.matrix then \"NoName\" else plant.compressor.fileName;
// parameter Boolean plant.compressor.Phic.verboseRead = true;
// parameter enumeration(LinearSegments, ContinuousDerivative, ConstantSegments) plant.compressor.Phic.smoothness = Modelica.Blocks.Types.Smoothness.ContinuousDerivative;
// protected Modelica.Blocks.Types.ExternalCombiTable2D plant.compressor.Phic.tableID = Modelica.Blocks.Types.ExternalCombiTable2D.constructor(\"NoName\", \"NoName\", {{0.0, 95.0, 100.0, 105.0}, {1.0, 0.0383, 0.043, 0.0468}, {2.0, 0.0393, 0.0438, 0.0479}, {3.0, 0.0406, 0.0452, 0.0484}, {4.0, 0.0416, 0.0461, 0.0489}, {5.0, 0.0423, 0.0466, 0.0493}}, plant.compressor.Phic.smoothness);
// protected Modelica.Blocks.Types.ExternalCombiTable2D plant.compressor.Phic.tableID = Modelica.Blocks.Types.ExternalCombiTable2D.constructor(if plant.compressor.Phic.tableOnFile then plant.compressor.Phic.tableName else \"NoName\", if plant.compressor.Phic.tableOnFile and plant.compressor.Phic.fileName <> \"NoName\" and not Modelica.Utilities.Strings.isEmpty(plant.compressor.Phic.fileName) then plant.compressor.Phic.fileName else \"NoName\", {{plant.compressor.Phic.table[1,1], plant.compressor.Phic.table[1,2], plant.compressor.Phic.table[1,3], plant.compressor.Phic.table[1,4]}, {plant.compressor.Phic.table[2,1], plant.compressor.Phic.table[2,2], plant.compressor.Phic.table[2,3], plant.compressor.Phic.table[2,4]}, {plant.compressor.Phic.table[3,1], plant.compressor.Phic.table[3,2], plant.compressor.Phic.table[3,3], plant.compressor.Phic.table[3,4]}, {plant.compressor.Phic.table[4,1], plant.compressor.Phic.table[4,2], plant.compressor.Phic.table[4,3], plant.compressor.Phic.table[4,4]}, {plant.compressor.Phic.table[5,1], plant.compressor.Phic.table[5,2], plant.compressor.Phic.table[5,3], plant.compressor.Phic.table[5,4]}, {plant.compressor.Phic.table[6,1], plant.compressor.Phic.table[6,2], plant.compressor.Phic.table[6,3], plant.compressor.Phic.table[6,4]}}, plant.compressor.Phic.smoothness);
// protected Real plant.compressor.Phic.tableOnFileRead;
// Real plant.compressor.N_T;
// Real plant.compressor.N_T_design;
Expand Down Expand Up @@ -2697,7 +2697,7 @@ instantiateModel(ThermoPower.Examples.BraytonCycle.ClosedLoopSimulator); getErro
// parameter String plant.turbine.Phic.fileName = if plant.turbine.Table == ThermoPower.Choices.TurboMachinery.TableTypes.matrix then \"NoName\" else plant.turbine.fileName;
// parameter Boolean plant.turbine.Phic.verboseRead = true;
// parameter enumeration(LinearSegments, ContinuousDerivative, ConstantSegments) plant.turbine.Phic.smoothness = Modelica.Blocks.Types.Smoothness.ContinuousDerivative;
// protected Modelica.Blocks.Types.ExternalCombiTable2D plant.turbine.Phic.tableID = Modelica.Blocks.Types.ExternalCombiTable2D.constructor(\"NoName\", \"NoName\", {{1.0, 90.0, 100.0, 110.0}, {2.36, 0.00468, 0.00468, 0.00468}, {2.88, 0.00468, 0.00468, 0.00468}, {3.56, 0.00468, 0.00468, 0.00468}, {4.46, 0.00468, 0.00468, 0.00468}}, plant.turbine.Phic.smoothness);
// protected Modelica.Blocks.Types.ExternalCombiTable2D plant.turbine.Phic.tableID = Modelica.Blocks.Types.ExternalCombiTable2D.constructor(if plant.turbine.Phic.tableOnFile then plant.turbine.Phic.tableName else \"NoName\", if plant.turbine.Phic.tableOnFile and plant.turbine.Phic.fileName <> \"NoName\" and not Modelica.Utilities.Strings.isEmpty(plant.turbine.Phic.fileName) then plant.turbine.Phic.fileName else \"NoName\", {{plant.turbine.Phic.table[1,1], plant.turbine.Phic.table[1,2], plant.turbine.Phic.table[1,3], plant.turbine.Phic.table[1,4]}, {plant.turbine.Phic.table[2,1], plant.turbine.Phic.table[2,2], plant.turbine.Phic.table[2,3], plant.turbine.Phic.table[2,4]}, {plant.turbine.Phic.table[3,1], plant.turbine.Phic.table[3,2], plant.turbine.Phic.table[3,3], plant.turbine.Phic.table[3,4]}, {plant.turbine.Phic.table[4,1], plant.turbine.Phic.table[4,2], plant.turbine.Phic.table[4,3], plant.turbine.Phic.table[4,4]}, {plant.turbine.Phic.table[5,1], plant.turbine.Phic.table[5,2], plant.turbine.Phic.table[5,3], plant.turbine.Phic.table[5,4]}}, plant.turbine.Phic.smoothness);
// protected Real plant.turbine.Phic.tableOnFileRead;
// Real plant.turbine.Eta.u1;
// Real plant.turbine.Eta.u2;
Expand Down Expand Up @@ -2727,7 +2727,7 @@ instantiateModel(ThermoPower.Examples.BraytonCycle.ClosedLoopSimulator); getErro
// parameter String plant.turbine.Eta.fileName = if plant.turbine.Table == ThermoPower.Choices.TurboMachinery.TableTypes.matrix then \"NoName\" else plant.turbine.fileName;
// parameter Boolean plant.turbine.Eta.verboseRead = true;
// parameter enumeration(LinearSegments, ContinuousDerivative, ConstantSegments) plant.turbine.Eta.smoothness = Modelica.Blocks.Types.Smoothness.ContinuousDerivative;
// protected Modelica.Blocks.Types.ExternalCombiTable2D plant.turbine.Eta.tableID = Modelica.Blocks.Types.ExternalCombiTable2D.constructor(\"NoName\", \"NoName\", {{1.0, 90.0, 100.0, 110.0}, {2.36, 0.89, 0.895, 0.893}, {2.88, 0.9, 0.906, 0.905}, {3.56, 0.905, 0.906, 0.905}, {4.46, 0.902, 0.903, 0.9}}, plant.turbine.Eta.smoothness);
// protected Modelica.Blocks.Types.ExternalCombiTable2D plant.turbine.Eta.tableID = Modelica.Blocks.Types.ExternalCombiTable2D.constructor(if plant.turbine.Eta.tableOnFile then plant.turbine.Eta.tableName else \"NoName\", if plant.turbine.Eta.tableOnFile and plant.turbine.Eta.fileName <> \"NoName\" and not Modelica.Utilities.Strings.isEmpty(plant.turbine.Eta.fileName) then plant.turbine.Eta.fileName else \"NoName\", {{plant.turbine.Eta.table[1,1], plant.turbine.Eta.table[1,2], plant.turbine.Eta.table[1,3], plant.turbine.Eta.table[1,4]}, {plant.turbine.Eta.table[2,1], plant.turbine.Eta.table[2,2], plant.turbine.Eta.table[2,3], plant.turbine.Eta.table[2,4]}, {plant.turbine.Eta.table[3,1], plant.turbine.Eta.table[3,2], plant.turbine.Eta.table[3,3], plant.turbine.Eta.table[3,4]}, {plant.turbine.Eta.table[4,1], plant.turbine.Eta.table[4,2], plant.turbine.Eta.table[4,3], plant.turbine.Eta.table[4,4]}, {plant.turbine.Eta.table[5,1], plant.turbine.Eta.table[5,2], plant.turbine.Eta.table[5,3], plant.turbine.Eta.table[5,4]}}, plant.turbine.Eta.smoothness);
// protected Real plant.turbine.Eta.tableOnFileRead;
// parameter Real plant.CombustionChamber1.V(quantity = \"Volume\", unit = \"m3\") = 0.05;
// parameter Real plant.CombustionChamber1.S(quantity = \"Area\", unit = \"m2\") = 0.05;
Expand Down
6 changes: 1 addition & 5 deletions simulation/libraries/3rdParty/Buildings/ReaderTMY3_total.mos
Expand Up @@ -14,9 +14,5 @@ simulate(ReaderTMY3_total, stopTime=0);getErrorString();
// simulationOptions = "startTime = 0.0, stopTime = 0.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'ReaderTMY3_total', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
// messages = ""
// end SimulationResult;
// "[Modelica 3.2.2/Blocks/Tables.mo:338:5-344:46:writable] Error: Variable weaDat.absFilNam not found in scope Modelica.Blocks.Tables.CombiTable1Ds$weaDat$datRea.
// [Modelica 3.2.2/Blocks/Tables.mo:338:5-344:46:writable] Error: Variable weaDat.absFilNam not found in scope Modelica.Blocks.Tables.CombiTable1Ds$weaDat$datRea1.
// [Modelica 3.2.2/Blocks/Tables.mo:338:5-344:46:writable] Error: Variable weaDatInpCon.absFilNam not found in scope Modelica.Blocks.Tables.CombiTable1Ds$weaDatInpCon$datRea.
// [Modelica 3.2.2/Blocks/Tables.mo:338:5-344:46:writable] Error: Variable weaDatInpCon.absFilNam not found in scope Modelica.Blocks.Tables.CombiTable1Ds$weaDatInpCon$datRea1.
// "
// ""
// endResult

0 comments on commit ca74ffb

Please sign in to comment.