Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee38431
commit e952f3d
Showing
3 changed files
with
30 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// status: incorrect | ||
|
||
model WhenNotInitial | ||
discrete Real r(start=0, fixed=true); | ||
equation | ||
when not initial() then | ||
r=1; | ||
end when; | ||
end WhenNotInitial; | ||
|
||
// Result: | ||
// Error processing file: WhenNotInitial.mo | ||
// [flattening/modelica/equations/WhenNotInitial.mo:6:3-8:11:writable] Warning: The standard says that initial() may only be used as a when condition (when initial() or when {..., initial(), ...}), but got condition not initial(). | ||
// [flattening/modelica/equations/WhenNotInitial.mo:6:3-8:11:writable] Error: Failed to instantiate equation | ||
// when not initial() then | ||
// r = 1; | ||
// end when;. | ||
// Error: Error occurred while flattening model WhenNotInitial | ||
// | ||
// # Error encountered! Exiting... | ||
// # Please check the error message and the flags. | ||
// | ||
// Execution failed! | ||
// 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