-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added test case for array expansion of outer parameters.
- Loading branch information
Showing
2 changed files
with
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// name: ArrayOuterParamExpand | ||
// keywords: array inner outer parameter | ||
// status: correct | ||
// | ||
// Checks that outer parameters are expanded correctly. | ||
// | ||
|
||
model A | ||
outer parameter Real[3] p1; | ||
parameter Real[3] p2; | ||
Real v; | ||
equation | ||
v = p1 * p2; | ||
end A; | ||
|
||
model ArrayOuterParamExpand | ||
inner parameter Real[3] p1; | ||
A a; | ||
end ArrayOuterParamExpand; | ||
|
||
// Result: | ||
// class ArrayOuterParamExpand | ||
// parameter Real p1[1]; | ||
// parameter Real p1[2]; | ||
// parameter Real p1[3]; | ||
// parameter Real a.p2[1]; | ||
// parameter Real a.p2[2]; | ||
// parameter Real a.p2[3]; | ||
// Real a.v; | ||
// equation | ||
// a.v = p1[1] * a.p2[1] + p1[2] * a.p2[2] + p1[3] * a.p2[3]; | ||
// end ArrayOuterParamExpand; | ||
// 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