Skip to content

Commit

Permalink
BackEnd/BackendVariable.mo
Browse files Browse the repository at this point in the history
- use ComponentReference.printComponentRefStr to also print the subscripts.

SimulationRuntime/c/simulation/solver/solver_main.c
- disable some printouts before printAllVars because they are printed inside anyway.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11831 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Apr 29, 2012
1 parent 8edc12e commit 1fc44f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Compiler/BackEnd/BackendVariable.mo
Expand Up @@ -1762,7 +1762,7 @@ algorithm
case (attr,name,source,_,vartype)
equation
ominmax = DAEUtil.getMinMax(attr);
str = ComponentReference.crefStr(name);
str = ComponentReference.printComponentRefStr(name);
str = stringAppendList({"Variable ",str," out of [min, max] interval: "});
e = Expression.crefExp(name);
tp = BackendDAEUtil.makeExpType(vartype);
Expand Down Expand Up @@ -1829,7 +1829,7 @@ algorithm
case (attr as SOME(DAE.VAR_ATTR_REAL(nominal=SOME(e))),name,source,_,vartype)
equation
ominmax = DAEUtil.getMinMax(attr);
str = ComponentReference.crefStr(name);
str = ComponentReference.printComponentRefStr(name);
str = stringAppendList({"Nominal ",str," out of [min, max] interval: "});
tp = BackendDAEUtil.makeExpType(vartype);
cond = getMinMaxAsserts1(ominmax,e,tp);
Expand Down
5 changes: 2 additions & 3 deletions SimulationRuntime/c/simulation/solver/solver_main.c
Expand Up @@ -221,7 +221,6 @@ int solver_main(DATA* simData, double start, double stop, double step,
/* debug print */
if (DEBUG_FLAG(LOG_DEBUG)){
for (i=0; i<3;i++){
INFO1("Print values for buffer segment = %d",i);
printAllVars(simData,i);
}
}
Expand Down Expand Up @@ -441,11 +440,10 @@ int solver_main(DATA* simData, double start, double stop, double step,
/* debug print */
if (DEBUG_FLAG(LOG_DEBUG)){
for (i=0; i<3;i++){
INFO1("Print values for buffer segment = %d",i);
printAllVars(simData,i);
}
}
}
} /* end while solver */


/* Last step with terminal()=true */
Expand Down Expand Up @@ -609,5 +607,6 @@ void checkTermination(DATA* simData)
WARNING2("Simulation call terminate() at time %f\nMessage : %s", simData->localData[0]->timeValue, TermMsg);
/* THROW1("timeValue = %f", simData->localData[0]->timeValue); */
}
fflush(NULL);
}

0 comments on commit 1fc44f2

Please sign in to comment.