-
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.
Fix creation of binding equations from start values (#12354)
- Unpropagate the binding when copying it from the start attribute to the component.
- Loading branch information
Showing
5 changed files
with
51 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
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
23 changes: 23 additions & 0 deletions
23
testsuite/flattening/modelica/scodeinst/UnboundParameter4.mo
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,23 @@ | ||
// name: UnboundParameter4 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
model A | ||
parameter Real x[3](start = {0, 0, 0}); | ||
end A; | ||
|
||
model UnboundParameter4 | ||
A a; | ||
end UnboundParameter4; | ||
|
||
// Result: | ||
// class UnboundParameter4 | ||
// parameter Real a.x[1](start = 0.0) = 0.0; | ||
// parameter Real a.x[2](start = 0.0) = 0.0; | ||
// parameter Real a.x[3](start = 0.0) = 0.0; | ||
// end UnboundParameter4; | ||
// [flattening/modelica/scodeinst/UnboundParameter4.mo:8:3-8:41:writable] Warning: Parameter a.x has no value, and is fixed during initialization (fixed=true), using available start value (start={0, 0, 0}) as default value. | ||
// | ||
// endResult |