Skip to content

Commit

Permalink
- Calculate better start-values for the init-file by interpreting fun…
Browse files Browse the repository at this point in the history
…ction calls in the backend

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7955 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Feb 17, 2011
1 parent b6ef61d commit bae39ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions Compiler/BackEnd/BackendDAEUtil.mo
Expand Up @@ -981,10 +981,7 @@ algorithm
values = va, comment = c, flowPrefix = fp, streamPrefix = sp), cache, env, _)
equation
((e2, _)) = Expression.traverseExp(e, replaceCrefsWithValues, vars);
// Is this supposed to be Ceval with the cache+env
// (_, v, _) = Ceval.ceval(cache, env, e2, false,NONE(), NONE(), Ceval.MSG());
// Or should the error messages be disabled, i.e. Ceval.NO_MSG()
(_, v, _) = Ceval.ceval(Env.emptyCache(), Env.emptyEnv, e2, false,NONE(), NONE(), Ceval.MSG());
(_, v, _) = Ceval.ceval(cache, env, e2, false,NONE(), NONE(), Ceval.MSG());
then
BackendDAE.VAR(cr, vk, vd, ty, SOME(e), SOME(v), dims, idx, src, va, c, fp, sp);
else inVar;
Expand Down
6 changes: 3 additions & 3 deletions Compiler/FrontEnd/DAE.mo
Expand Up @@ -829,11 +829,11 @@ uniontype Const "The degree of constantness of an expression is determined by th
all other variables are not constant and will get C_VAR constantness.

- Variable properties"
record C_CONST end C_CONST;
record C_CONST "constant " end C_CONST;

record C_PARAM "\'constant\'s, should always be evaluated" end C_PARAM;
record C_PARAM "parameter" end C_PARAM;

record C_VAR "\'parameter\'s, evaluated if structural not constants, never evaluated" end C_VAR;
record C_VAR "continuous" end C_VAR;

record C_UNKNOWN end C_UNKNOWN;
end Const;
Expand Down

0 comments on commit bae39ab

Please sign in to comment.