Skip to content

Commit

Permalink
- use Integer for Enumeration types in modeldiscription.xml instead o…
Browse files Browse the repository at this point in the history
…f Real as type, this fixes the "Warning: Assuming fixed start value for .. " warnings

- switch of debug output in IndexReduction
- Update fmi/ModelExchange tests

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14738 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jan 10, 2013
1 parent df64af6 commit 34eb99c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Compiler/BackEnd/IndexReduction.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2310,8 +2310,6 @@ algorithm
ErrorExt.setCheckpoint("DynamicStateSelection");
// get highest order derivatives
hov = highestOrderDerivatives(BackendVariable.daeVars(isyst),so);
Debug.fcall(Flags.BLT_DUMP, print, "highest Order Derivatives:\n");
Debug.fcall(Flags.BLT_DUMP, BackendDump.printVarList, hov);
// copy can be removed if method works fine
(syst,_) = BackendDAEUtil.copyBackendDAEEqSystem(isyst,ishared);
// get scalar incidence matrix solvable
Expand Down Expand Up @@ -2484,6 +2482,8 @@ algorithm
m1 = incidenceMatrixfromEnhanced2(me,hovvars);
mT1 = BackendDAEUtil.transposeMatrix(m1,nfreeStates);
hovvars = sortStateCandidatesVars(hovvars,BackendVariable.daeVars(isyst),so,SOME(mT1));
Debug.fcall(Flags.BLT_DUMP, print, "highest Order Derivatives:\n");
Debug.fcall(Flags.BLT_DUMP, BackendDump.printVariables, hovvars);
// generate incidence matrix from system and equations of that level and the states of that level
nv = BackendVariable.varsSize(vars);
ne = BackendDAEUtil.equationSize(eqns);
Expand Down Expand Up @@ -5789,7 +5789,8 @@ algorithm
case ((i,BackendDAE.SOLVABILITY_PARAMETER(b=true)),_,_) then i::iRow;
case ((i,BackendDAE.SOLVABILITY_PARAMETER(b=false)),_,_) then incidenceMatrixElementElementfromEnhanced2_1(i,vars,iRow);
case ((i,BackendDAE.SOLVABILITY_TIMEVARYING(b=_)),_,_) then incidenceMatrixElementElementfromEnhanced2_1(i,vars,iRow);
case ((i,BackendDAE.SOLVABILITY_NONLINEAR()),_,_) then incidenceMatrixElementElementfromEnhanced2_1(i,vars,iRow);
// case ((i,BackendDAE.SOLVABILITY_NONLINEAR()),_,_) then incidenceMatrixElementElementfromEnhanced2_1(i,vars,iRow);
case ((i,BackendDAE.SOLVABILITY_NONLINEAR()),_,_) then iRow;
else then iRow;
end match;
end incidenceMatrixElementElementfromEnhanced2;
Expand Down Expand Up @@ -6632,6 +6633,7 @@ algorithm
case ((v as BackendDAE.VAR(varKind=BackendDAE.VARIABLE()))::rest,i::ilst,_,_)
equation
v = BackendVariable.setVarKind(v,BackendDAE.STATE(1));
// v = BackendVariable.setVarStateSelect(v,DAE.AVOID());
vars = BackendVariable.addVar(v,inVars);
(outVars,outChangedVars) = changeDerVariablestoStates1(rest,ilst,vars,i::inChangedVars);
then
Expand Down
2 changes: 1 addition & 1 deletion Compiler/Template/CodegenFMU.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ match type_
case T_REAL(__) then '<Real <%/*ScalarVariableTypeCommonAttribute(initialValue,isFixed)%> <%ScalarVariableTypeRealAttribute(unit,displayUnit)*/%>/>'
case T_BOOL(__) then '<Boolean/>'
case T_STRING(__) then '<String/>'
case T_ENUMERATION(__) then '<Real/>'
case T_ENUMERATION(__) then '<Integer/>'
else 'UNKOWN_TYPE'
end ScalarVariableType;

Expand Down

0 comments on commit 34eb99c

Please sign in to comment.