Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated for equation scodeinst tests.
- Loading branch information
1 parent
1e13743
commit 45dd27c
Showing
7 changed files
with
99 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// name: ForEquation1.mo | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
// | ||
|
||
model ForEquation1 | ||
Real x[5]; | ||
equation | ||
for i in 1:5 loop | ||
x[i] = i; | ||
end for; | ||
end ForEquation1; | ||
|
||
// Result: | ||
// class ForEquation1 | ||
// Real x[1]; | ||
// Real x[2]; | ||
// Real x[3]; | ||
// Real x[4]; | ||
// Real x[5]; | ||
// equation | ||
// x[1] = 1; | ||
// x[2] = 2; | ||
// x[3] = 3; | ||
// x[4] = 4; | ||
// x[5] = 5; | ||
// end ForEquation1; | ||
// 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// name: ForEquation2.mo | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model ForEquation2 | ||
Real x[3,3]; | ||
equation | ||
for i in 1:2 loop | ||
for i in 1:3 loop | ||
x[i, i] = i; | ||
end for; | ||
end for; | ||
end ForEquation2; | ||
|
||
// Result: | ||
// class ForEquation2 | ||
// Real x[1,1]; | ||
// Real x[1,2]; | ||
// Real x[1,3]; | ||
// Real x[2,1]; | ||
// Real x[2,2]; | ||
// Real x[2,3]; | ||
// Real x[3,1]; | ||
// Real x[3,2]; | ||
// Real x[3,3]; | ||
// equation | ||
// x[1,1] = 1; | ||
// x[2,2] = 2; | ||
// x[3,3] = 3; | ||
// x[1,1] = 1; | ||
// x[2,2] = 2; | ||
// x[3,3] = 3; | ||
// end ForEquation2; | ||
// 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// name: ForEquation3.mo | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
// | ||
|
||
model ForEquation3 | ||
Real x[5]; | ||
equation | ||
for i in {1, 2, 3, 4, 5} loop | ||
x[i] = i; | ||
end for; | ||
end ForEquation3; | ||
|
||
// Result: | ||
// class ForEquation3 | ||
// Real x[1]; | ||
// Real x[2]; | ||
// Real x[3]; | ||
// Real x[4]; | ||
// Real x[5]; | ||
// equation | ||
// x[1] = 1; | ||
// x[2] = 2; | ||
// x[3] = 3; | ||
// x[4] = 4; | ||
// x[5] = 5; | ||
// end ForEquation3; | ||
// 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.