Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test case for resetting a nested state machine. Belonging to [master]: - OpenModelica/OMCompiler#1901 - OpenModelica/OpenModelica-testsuite#742
- Loading branch information
1 parent
f8d55c6
commit 90e7f8a
Showing
3 changed files
with
279 additions
and
0 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
27 changes: 27 additions & 0 deletions
27
simulation/modelica/statemachines/SMGraphicalTestCases_DeepHierarchy.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,27 @@ | ||
// name: SMGraphicalTestCases_DeepHierarchy | ||
// keywords: state machines | ||
// status: correct | ||
// | ||
|
||
loadFile("SMGraphicalTestCases.mo"); | ||
echo(false); | ||
setCommandLineOptions({"+simCodeTarget=Cpp"}); getErrorString(); | ||
simulate(SMGraphicalTestCases.DeepHierarchy, startTime=0, stopTime=30, numberOfIntervals = 0); getErrorString(); | ||
echo(true); | ||
val(l1Composite.l2Composite.l3Final.active,4.0); | ||
val(l1Composite.l2Composite.l3Final.active,5.0); | ||
val(l1Composite.l2Composite.l3Final.active,6.0); | ||
val(l1Composite.l2Composite.l3Final.active,28.0); | ||
val(l1Composite.l2Composite.l3Final.active,29.0); | ||
val(l1Composite.l2Composite.l3Final.active,30.0); | ||
|
||
// Result: | ||
// true | ||
// true | ||
// 0.0 | ||
// 1.0 | ||
// 0.0 | ||
// 0.0 | ||
// 1.0 | ||
// 0.0 | ||
// endResult |