Skip to content

Commit

Permalink
More error-checking for BouncingBall
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Nov 2, 2015
1 parent 80a4002 commit 1aea30b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions openmodelica/fmi/ModelExchange/1.0/BouncingBall.mos
Expand Up @@ -6,7 +6,11 @@
//
setCFlags(getCFlags() + " -g"); getErrorString();
loadFile("BouncingBall.mo"); getErrorString();
translateModelFMU(BouncingBall); getErrorString();
if ""==translateModelFMU(BouncingBall) then
print(getErrorString());
exit(1);
end if;
getErrorString();
importFMU("BouncingBall.fmu"); getErrorString();
loadFile("BouncingBall_me_FMU.mo"); getErrorString();
simulate(BouncingBall_me_FMU, stopTime=3.0); getErrorString();
Expand All @@ -19,7 +23,7 @@ val(h,3);
// ""
// true
// ""
// "SimCode: The model BouncingBall has been translated to FMU"
//
// "Warning: The initial conditions are not fully specified. Use +d=initialization for more information.
// "
// "BouncingBall_me_FMU.mo"
Expand All @@ -33,6 +37,6 @@ val(h,3);
// end SimulationResult;
// ""
// 1.0
// 0.2250205572103477
// -0.9555203906613871
// 0.2250205572103156
// -0.9555203906614377
// endResult

0 comments on commit 1aea30b

Please sign in to comment.