Skip to content

Commit

Permalink
- change warnings
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16461 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
lochel committed Jun 23, 2013
1 parent f1864a1 commit 214be05
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Compiler/BackEnd/Initialization.mo
Expand Up @@ -190,14 +190,15 @@ algorithm
(initdae, Util.SUCCESS()) = BackendDAEUtil.pastoptimiseDAE(initdae, pastOptModules, matchingAlgorithm, daeHandler);
Debug.fcall2(Flags.DUMP_INITIAL_SYSTEM, BackendDump.dumpBackendDAE, initdae, "solved initial system");

// warn about selected default initial conditions
b = intGt(listLength(dumpVars), 0);
Debug.bcall(b and (not Flags.isSet(Flags.INITIALIZATION)), Error.addCompilerWarning, "The initial conditions are not fully specified. Use +d=initialization for more information.");
Debug.bcall(b and Flags.isSet(Flags.INITIALIZATION), Error.addCompilerWarning, "Assuming fixed start value for the following " +& intString(listLength(dumpVars)) +& " variables:");
Debug.bcall(b and Flags.isSet(Flags.INITIALIZATION), warnAboutVars, dumpVars);

// warn about iteration variables with default zero start attribute
// Debug.fcall(Flags.INITIALIZATION, warnAboutIterationVariablesWithDefaultZeroStartAttribute, initdae);
b = warnAboutIterationVariablesWithDefaultZeroStartAttribute(initdae);
b = b or intGt(listLength(dumpVars), 0);
b = b and (not Flags.isSet(Flags.INITIALIZATION));
Debug.bcall(b, Error.addCompilerWarning, "There are suppressed warnings from the initialization. Use +d=initialization to display them.");
Debug.bcall(intGt(listLength(dumpVars), 0) and Flags.isSet(Flags.INITIALIZATION), Error.addCompilerWarning, "Assuming fixed start value for the following " +& intString(listLength(dumpVars)) +& " variables:");
Debug.bcall(intGt(listLength(dumpVars), 0) and Flags.isSet(Flags.INITIALIZATION), warnAboutVars, dumpVars);
Debug.bcall(b and (not Flags.isSet(Flags.INITIALIZATION)), Error.addCompilerWarning, "There are iteration variables with default zero start attribute. Use +d=initialization for more information.");

b = Flags.isSet(Flags.DUMP_EQNINORDER) and Flags.isSet(Flags.DUMP_INITIAL_SYSTEM);
Debug.bcall2(b, BackendDump.dumpEqnsSolved, initdae, "initial system: eqns in order");
Expand Down

0 comments on commit 214be05

Please sign in to comment.