Skip to content

Commit

Permalink
Revert previous commit and add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranke committed Oct 18, 2016
1 parent dd00510 commit a2293fc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions openmodelica/cppruntime/fmu/modelExchange/2.0/Crane_FMU2_CPP.mos
@@ -0,0 +1,41 @@
// name: Crane_FMU2_CPP
// keywords: Crane FMI export import
// status: correct
// teardown_command: rm -rf binaries sources modelDescription.xml *cranes.crane* *cranes_crane*
// Real variables, Real input variable, continuous-time states, state events, event iteration

loadModel(Modelica); getErrorString();
setCommandLineOptions("+simCodeTarget=Cpp"); getErrorString();
loadFile("../1.0/cranes.mo"); getErrorString();
translateModelFMU(cranes.crane, version="2.0"); getErrorString();

//importFMU("cranes.crane.fmu", "<default>", 6, false, true); getErrorString();
importFMU("cranes.crane.fmu", "<default>"); 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
// ""
// "SimCode: The model cranes.crane has been translated to FMU"
// ""
// "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;
// ""
// 0.949354567086967
// 0.3948242611172861
// endResult
2 changes: 1 addition & 1 deletion openmodelica/cppruntime/fmu/modelExchange/2.0/Makefile
Expand Up @@ -3,12 +3,12 @@ TEST = ../../../../../rtest -v

TESTFILES = \
DIC_FMU2_CPP.mos \
Crane_FMU2_CPP.mos \
testFMU2MatrixIO.mos \
testModelDescription.mos \
testDrumBoiler.mos

FAILINGTESTFILES = \
Crane_FMU2_CPP.mos \
CoupledClutches_FMU2_CPP.mos

DEPENDENCIES = \
Expand Down

0 comments on commit a2293fc

Please sign in to comment.