Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- all FMU-tests of the cpp-runtime use the c-runtime as import enviro…
…nment now - the crane-FMU tests should now work with GCC 4.4 again, so they are added to the test-process
- Loading branch information
Marcus Walther
committed
Sep 25, 2015
1 parent
cf47666
commit 4164dac
Showing
12 changed files
with
225 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...pruntime/fmu/modelExchange/1.0/Modelica.Fluid.Examples.BranchingDynamicPipes_FMU1_CPP.mos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// name: Modelica.Fluid.Examples.BranchingDynamicPipes_FMI_1_0 | ||
// keywords: simulation MSL Examples FMI-Export FMI-Import | ||
// status: correct | ||
// | ||
// Simulation Results | ||
// Modelica Standard Library | ||
// | ||
|
||
loadModel(Modelica, {"3.2.1"}); getErrorString(); | ||
setCommandLineOptions("+simCodeTarget=Cpp"); getErrorString(); | ||
translateModelFMU(Modelica.Fluid.Examples.BranchingDynamicPipes); getErrorString(); | ||
|
||
setCommandLineOptions("+simCodeTarget=C"); getErrorString(); | ||
importFMU("Modelica_Fluid_Examples_BranchingDynamicPipes.fmu"); getErrorString(); | ||
loadFile("Modelica_Fluid_Examples_BranchingDynamicPipes_me_FMU.mo"); getErrorString(); | ||
simulate(Modelica_Fluid_Examples_BranchingDynamicPipes_me_FMU); getErrorString(); | ||
|
||
resultFile := "Modelica_Fluid_Examples_BranchingDynamicPipes_me_FMU_res.mat"; | ||
referenceFile := getEnvironmentVar("REFERENCEFILES") + "/msl32/Modelica.Fluid.Examples.BranchingDynamicPipes.mat"; | ||
|
||
//val(pipe1_mediums_1__p, 5); | ||
//val(pipe3_flowModel_m_flows_1_, 5); | ||
//val(pipe4_mediums_5__p, 5); | ||
//val(pipe3_flowModel_m_flows_5_, 5); | ||
|
||
// Result: | ||
// true | ||
// "" | ||
// true | ||
// "" | ||
// true | ||
// "" | ||
// "SimCode: The model CoupledClutches has been translated to FMU" | ||
// "Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information. | ||
// " | ||
// "CoupledClutches_me_FMU.mo" | ||
// "" | ||
// true | ||
// "" | ||
// record SimulationResult | ||
// resultFile = "CoupledClutches_me_FMU_res.mat", | ||
// simulationOptions = "startTime = 0.0, stopTime = 1.5, numberOfIntervals = 150, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'CoupledClutches_me_FMU', options = '', outputFormat = 'mat', variableFilter = 'J1_w1|J2_w1|J3_w1|J4_w1', cflags = '', simflags = ''", | ||
// messages = "" | ||
// end SimulationResult; | ||
// "" | ||
// 3.235409814452836 | ||
// 3.382195820527042 | ||
// 3.382195822575476 | ||
// -5.144123568889825e-06 | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/CoupledClutches_FMU1_CPP_HPCOM.mos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// name: CoupledClutches_HPCOM_FMI_1_0_CPP_HPCOM | ||
// keywords: CoupledClutches FMI-Export FMI-Import | ||
// status: correct | ||
// teardown_command: rm -rf binaries sources modelDescription.xml CoupledClutches.fmu CoupledClutches_me_FMU.mo CoupledClutches.lib* CoupledClutches.so CoupledClutches.dll CoupledClutches_*.c CoupledClutches_*.h CoupledClutches_*.o CoupledClutches_*.json | ||
// Real variables, Real input variable, continuous-time states, state events, event iteration | ||
|
||
loadModel(Modelica); getErrorString(); | ||
setDebugFlags("hpcom,hardcodedStartValues"); getErrorString(); | ||
setCommandLineOptions("+simCodeTarget=Cpp +n=2 +hpcomCode=openmp +hpcomScheduler=list"); getErrorString(); | ||
loadFile("CoupledClutches.mo"); getErrorString(); | ||
translateModelFMU(CoupledClutches); getErrorString(); | ||
|
||
|
||
setCommandLineOptions("+simCodeTarget=C"); getErrorString(); | ||
clearDebugFlags(); getErrorString(); | ||
//importFMU("CoupledClutches.fmu", "<default>", 6, true, true); getErrorString(); | ||
importFMU("CoupledClutches.fmu"); getErrorString(); | ||
loadFile("CoupledClutches_me_FMU.mo"); getErrorString(); | ||
simulate(CoupledClutches_me_FMU, numberOfIntervals=150, variableFilter="J1_w1|J2_w1|J3_w1|J4_w1"); getErrorString(); | ||
|
||
val(J1_w1, 1); | ||
val(J2_w1, 1); | ||
val(J3_w1, 1); | ||
val(J4_w1, 1); | ||
|
||
// Result: | ||
// true | ||
// "" | ||
// true | ||
// "" | ||
// true | ||
// "" | ||
// true | ||
// "" | ||
// readCalcTimesFromFile: No valid profiling-file found. | ||
// Warning: The costs have been estimated. Maybe CoupledClutches_eqs_prof-file is missing. | ||
// Using list Scheduler for the DAE system | ||
// Using list Scheduler for the ODE system | ||
// Using list Scheduler for the ZeroFunc system | ||
// HpcOm is still under construction. | ||
// "SimCode: The model CoupledClutches has been translated to FMU" | ||
// "Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information. | ||
// " | ||
// "CoupledClutches_me_FMU.mo" | ||
// "" | ||
// true | ||
// "" | ||
// readCalcTimesFromFile: No valid profiling-file found. | ||
// Warning: The costs have been estimated. Maybe CoupledClutches_me_FMU_eqs_prof-file is missing. | ||
// Using level Scheduler for the DAE system | ||
// Using level Scheduler for the ODE system | ||
// Using level Scheduler for the ZeroFunc system | ||
// HpcOm is still under construction. | ||
// record SimulationResult | ||
// resultFile = "CoupledClutches_me_FMU_res.mat", | ||
// simulationOptions = "startTime = 0.0, stopTime = 1.5, numberOfIntervals = 150, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'CoupledClutches_me_FMU', options = '', outputFormat = 'mat', variableFilter = 'J1_w1|J2_w1|J3_w1|J4_w1', cflags = '', simflags = ''", | ||
// messages = "" | ||
// end SimulationResult; | ||
// "" | ||
// 3.044323911098361 | ||
// 3.242493326997348 | ||
// 3.242493328798009 | ||
// -1.000195481992705e-10 | ||
// endResult |
82 changes: 82 additions & 0 deletions
82
openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/Crane_FMU1_CPP_HPCOM.mos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// name: Crane_HPCOM_FMI_1_0_CPP_HPCOM | ||
// keywords: Crane FMI-Export FMI-Import | ||
// status: correct | ||
// Real variables, Real input variable, continuous-time states, state events, event iteration | ||
|
||
loadModel(Modelica); getErrorString(); | ||
setDebugFlags("hpcom,hardcodedStartValues"); getErrorString(); | ||
setCommandLineOptions("+simCodeTarget=Cpp +n=2 +hpcomCode=openmp +hpcomScheduler=level"); getErrorString(); | ||
loadFile("cranes.mo"); getErrorString(); | ||
translateModelFMU(cranes.crane); getErrorString(); | ||
|
||
setCommandLineOptions("+simCodeTarget=C"); getErrorString(); | ||
clearDebugFlags(); getErrorString(); | ||
//importFMU("cranes_crane.fmu", "<default>", 6); getErrorString(); | ||
importFMU("cranes_crane.fmu"); getErrorString(); | ||
loadFile("cranes_crane_me_FMU.mo"); getErrorString(); | ||
simulate(cranes_crane_me_FMU, numberOfIntervals=150); getErrorString(); | ||
|
||
val(position_s, 1); | ||
val(prismatic_v, 1); | ||
|
||
// Result: | ||
// true | ||
// "" | ||
// true | ||
// "" | ||
// true | ||
// "" | ||
// true | ||
// "" | ||
// readCalcTimesFromFile: No valid profiling-file found. | ||
// Warning: The costs have been estimated. Maybe cranes_crane_eqs_prof-file is missing. | ||
// Using level Scheduler for the DAE system | ||
// Using level Scheduler for the ODE system | ||
// Using level Scheduler for the ZeroFunc system | ||
// HpcOm is still under construction. | ||
// "SimCode: The model cranes.crane has been translated to FMU" | ||
// "" | ||
// true | ||
// "" | ||
// true | ||
// "" | ||
// "cranes_crane_me_FMU.mo" | ||
// "" | ||
// true | ||
// "" | ||
// record SimulationResult | ||
// resultFile = "cranes_crane_me_FMU_res.mat", | ||
// simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 150, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'cranes_crane_me_FMU', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", | ||
// messages = "" | ||
// end SimulationResult; | ||
// "[openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1670:3-1670:182:writable] Warning: Parameter body_cylinder_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1671:3-1671:178:writable] Warning: Parameter body_sphere_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="sphere") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1672:3-1672:102:writable] Warning: Parameter bodyShape_frameTranslation_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1673:3-1673:185:writable] Warning: Parameter bodyShape_shape1_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1674:3-1674:183:writable] Warning: Parameter bodyShape_shape2_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="sphere") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1675:3-1675:85:writable] Warning: Parameter bodyShape_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1676:3-1676:191:writable] Warning: Parameter fixedTranslation_shape_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1677:3-1677:92:writable] Warning: Parameter fixedTranslation_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1678:3-1678:177:writable] Warning: Parameter prismatic_box_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="box") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1679:3-1679:186:writable] Warning: Parameter revolute_cylinder_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1680:3-1680:187:writable] Warning: Parameter world_gravityArrowHead_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cone") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1681:3-1681:191:writable] Warning: Parameter world_gravityArrowLine_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1682:3-1682:90:writable] Warning: Parameter world_label1 has no value, and is fixed during initialization (fixed=true), using available start value (start="x") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1683:3-1683:88:writable] Warning: Parameter world_label2 has no value, and is fixed during initialization (fixed=true), using available start value (start="y") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1684:3-1684:182:writable] Warning: Parameter world_x_arrowHead_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cone") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1685:3-1685:186:writable] Warning: Parameter world_x_arrowLine_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1686:3-1686:195:writable] Warning: Parameter world_x_label_cylinders_1__shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1687:3-1687:195:writable] Warning: Parameter world_x_label_cylinders_2__shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1688:3-1688:182:writable] Warning: Parameter world_y_arrowHead_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cone") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1689:3-1689:186:writable] Warning: Parameter world_y_arrowLine_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1690:3-1690:195:writable] Warning: Parameter world_y_label_cylinders_1__shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1691:3-1691:195:writable] Warning: Parameter world_y_label_cylinders_2__shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1692:3-1692:182:writable] Warning: Parameter world_z_arrowHead_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cone") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1693:3-1693:186:writable] Warning: Parameter world_z_arrowLine_shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1694:3-1694:195:writable] Warning: Parameter world_z_label_cylinders_1__shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1695:3-1695:195:writable] Warning: Parameter world_z_label_cylinders_2__shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// [openmodelica/cppruntime/hpcom/fmu/modelExchange/1.0/cranes_crane_me_FMU.mo:1696:3-1696:195:writable] Warning: Parameter world_z_label_cylinders_3__shapeType has no value, and is fixed during initialization (fixed=true), using available start value (start="cylinder") as default value. | ||
// " | ||
// 0.9493545676148136 | ||
// 0.3948240567413477 | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters