Skip to content

Commit

Permalink
- changed CoupleClutches test of FMU 2.0 ModelExchange (C++ Runtime) …
Browse files Browse the repository at this point in the history
…to a verified simulation test

- all FMU test of the cpp runtime are working now as verified simulations
- changed the names of the mos-files, so that they can be identified in the hudson-jobs more easily
  • Loading branch information
Marcus Walther committed Jul 28, 2015
1 parent b801d5c commit 5b0f74e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
Expand Up @@ -13,7 +13,7 @@ importFMU("cranes_crane.fmu", "<default>"); getErrorString();
loadFile("cranes_crane_me_FMU.mo"); getErrorString();
simulate(cranes_crane_me_FMU, numberOfIntervals=150); getErrorString();

//simulate(cranes.crane, numberOfIntervals=150); getErrorString();
//simulate(cranes.crane, numberOfIntervals=150, simflags="-N newton"); getErrorString();

val(position_s, 1);
val(prismatic_v, 1);
Expand Down
4 changes: 2 additions & 2 deletions openmodelica/cppruntime/fmu/modelExchange/1.0/Makefile
Expand Up @@ -2,8 +2,8 @@ TEST = ../../../../../rtest -v


TESTFILES = \
CoupledClutches.mos \
crane.mos
CoupledClutches_FMU1_CPP.mos \
Crane_FMU1_CPP.mos

FAILINGTESTFILES =

Expand Down
Expand Up @@ -9,9 +9,14 @@ setCommandLineOptions("+simCodeTarget=Cpp"); getErrorString();
loadFile("CoupledClutches.mo"); getErrorString();
translateModelFMU(CoupledClutches, version = "2.0"); 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();
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
Expand All @@ -23,4 +28,18 @@ translateModelFMU(CoupledClutches, version = "2.0"); getErrorString();
// "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.235510485522502
// 3.382296491595568
// 3.382296493634146
// 7.492717557511241e-11
// endResult
2 changes: 1 addition & 1 deletion openmodelica/cppruntime/fmu/modelExchange/2.0/Makefile
Expand Up @@ -2,7 +2,7 @@ TEST = ../../../../../rtest -v


TESTFILES = \
CoupledClutches.mos
CoupledClutches_FMU2_CPP.mos

FAILINGTESTFILES =

Expand Down

0 comments on commit 5b0f74e

Please sign in to comment.