Skip to content

Commit 7ee74b3

Browse files
committed
Print warning message only with log=true, if variables with init values are explicitly solved for.
1 parent 64cde91 commit 7ee74b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/StateSelection.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,8 +1479,8 @@ function getSortedAndSolvedAST(G, # Typically ::Vector{Vector{Int}}
14791479

14801480

14811481
# Print warning, if there are variables with fixed=true that are
1482-
# explicitly solved for
1483-
if length(eq.equationInfo.vSolvedWithFixedTrue) > 0
1482+
# explicitly solved for and log=true
1483+
if log && length(eq.equationInfo.vSolvedWithFixedTrue) > 0
14841484
showMessage2("The following variables have an 'init' initialization and are explicitly solved for.",
14851485
details = "Therefore, the 'init' values have no effect, but must exactly match the values,\n"*
14861486
"computed during initialization. Otherwise this gives a run-time error.\n"*

0 commit comments

Comments
 (0)