Skip to content

Commit

Permalink
Propagate clockIndex to residual functions
Browse files Browse the repository at this point in the history
This makes NLS in clocked systems compile.
  • Loading branch information
sjoelund committed May 20, 2020
1 parent c888c30 commit a5f09fc
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 36 deletions.
15 changes: 8 additions & 7 deletions OMCompiler/Compiler/SimCode/ReduceDAE.mo
Expand Up @@ -328,22 +328,23 @@ protected function addLabelToEquations
list<DAE.Exp> s,t,inputs,outputs,expl,b;
DAE.ComponentRef cr_1,cr;
DAE.ElementSource source "origin of the equation";
list<DAE.ElementSource> sourcelist;
list<DAE.ElementSource> sourcelist;
SimCodeVar.SimVars vars,vars_1,vars_2,vars_3;
list<String> labels,labels2,labels3,labels4,labels5;
tuple <Integer,Integer> idx,idx2,idx3,idx4;
Integer i,indexSys,idxLS,idxNLS,nUnknownsLS,nUnknownsNLS;
list<DAE.ComponentRef> conditions;
Boolean partOfLinear,tornSystem,initialCall;
list<BackendDAE.WhenOperator> whenStmtLst;
Boolean partOfLinear,tornSystem,initialCall;
list<BackendDAE.WhenOperator> whenStmtLst;
list<tuple<Integer, Integer, SimCode.SimEqSystem>> A,A2;
list<DAE.ComponentRef> crefs,crefs_1;
list<SimCodeVar.SimVar> varsLin,discVars;
list<DAE.Statement> statements,statements2;
list<SimCode.SimEqSystem> residual;
Option<SimCode.JacobianMatrix> jacobianMatrix;
list<SimCode.SimEqSystem> residual;
Option<SimCode.JacobianMatrix> jacobianMatrix;
BackendDAE.EquationAttributes eqAttr;
Boolean partOfJac;
Option<Integer> clockIndex;

// nothing
case ({},vars,idx,_,_) then ({},vars,idx,{});
Expand Down Expand Up @@ -415,7 +416,7 @@ protected function addLabelToEquations
(SimCode.SES_LINEAR(SimCode.LINEARSYSTEM(i,partOfLinear,tornSystem,varsLin,b,A2,residual,jacobianMatrix,sourcelist,idxLS,nUnknownsLS, partOfJac),NONE(), eqAttr) :: es_1,vars_2,idx3,labels3);

// non-linear systems
case (((eq as SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(index=i,eqs=nl,crefs=crefs,indexNonLinearSystem=idxNLS,nUnknowns=nUnknownsNLS,jacobianMatrix=jacobianMatrix),NONE(), eqAttr)) :: es),vars,idx,_,_)
case (((eq as SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(index=i,eqs=nl,crefs=crefs,indexNonLinearSystem=idxNLS,nUnknowns=nUnknownsNLS,jacobianMatrix=jacobianMatrix,clockIndex=clockIndex),NONE(), eqAttr)) :: es),vars,idx,_,_)
equation

if(Flags.isSet(Flags.REDUCE_DAE)) then
Expand All @@ -427,7 +428,7 @@ protected function addLabelToEquations
(es_1 ,vars_2,idx3,labels2)= addLabelToEquations(es,vars_1,idx2,reduceList,inVarRepl);
labels3=listAppend(labels,labels2);
then
(SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(index=i,eqs=nl_1,crefs=crefs,indexNonLinearSystem=idxNLS,nUnknowns=nUnknownsNLS,jacobianMatrix=jacobianMatrix,homotopySupport=false,mixedSystem=false,tornSystem=false),NONE(), eqAttr) :: es_1,vars_2,idx3,labels3);
(SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(index=i,eqs=nl_1,crefs=crefs,indexNonLinearSystem=idxNLS,nUnknowns=nUnknownsNLS,jacobianMatrix=jacobianMatrix,homotopySupport=false,mixedSystem=false,tornSystem=false,clockIndex=clockIndex),NONE(), eqAttr) :: es_1,vars_2,idx3,labels3);
// mixed systems
case (((eq as SimCode.SES_MIXED(i,cont,discVars,disc,indexSys, eqAttr)) :: es),vars,idx,_,_)
equation
Expand Down
1 change: 1 addition & 0 deletions OMCompiler/Compiler/SimCode/SimCode.mo
Expand Up @@ -506,6 +506,7 @@ uniontype NonlinearSystem
Boolean homotopySupport;
Boolean mixedSystem;
Boolean tornSystem;
Option<Integer> clockIndex;
end NONLINEARSYSTEM;
end NonlinearSystem;

Expand Down
62 changes: 42 additions & 20 deletions OMCompiler/Compiler/SimCode/SimCodeUtil.mo
Expand Up @@ -663,7 +663,7 @@ algorithm
end if;

// Set fullPathPrefix for FMUs
if isFMU then
if isFMU then
if (Config.simCodeTarget()=="omsic") or (Config.simCodeTarget() == "omsicpp")then
fullPathPrefix := filenamePrefix+".fmutmp";
else
Expand Down Expand Up @@ -1581,7 +1581,7 @@ protected
algorithm
arg := (stateeqnsmark, zceqnsmark, syst, shared, createAlgebraicEquations);
foldArg := (iuniqueEqIndex, {}, {}, {}, {}, itempvars, ieqSccMapping, ieqBackendSimCodeMapping, iBackendMapping, iSccIndex);
foldArg := List.fold1(comps, createEquationsForSystem1, arg, foldArg);
foldArg := List.fold2(comps, createEquationsForSystem1, arg, partitionKindToClockIndex(syst.partitionKind), foldArg);
(ouniqueEqIndex, odeEquations, algebraicEquations, allEquations, equationsforZeroCrossings,
otempvars, oeqSccMapping, oeqBackendSimCodeMapping, oBackendMapping, _) := foldArg;
outOdeEquations := List.flattenReverse(odeEquations);
Expand Down Expand Up @@ -1618,6 +1618,7 @@ end addEquationsToLists;
protected function createEquationsForSystem1
input BackendDAE.StrongComponent comp;
input CreateEquationsForSystemArg inArg;
input Option<Integer> clockIndex;
input CreateEquationsForSystemFold inFold;
output CreateEquationsForSystemFold outFold;
protected
Expand Down Expand Up @@ -1712,7 +1713,7 @@ algorithm
equation
(eqnlst, varlst, _) = BackendDAETransform.getEquationAndSolvedVar(comp, syst.orderedEqs, syst.orderedVars);
varlst = List.map(varlst, BackendVariable.transformXToXd);
(equations1, uniqueEqIndex1) = createSingleAlgorithmCode(eqnlst, varlst, false, uniqueEqIndex);
(equations1, uniqueEqIndex1) = createSingleAlgorithmCode(eqnlst, varlst, false, uniqueEqIndex, clockIndex);

eqSccMapping = appendSccIdxRange(uniqueEqIndex, uniqueEqIndex1 - 1, sccIndex, eqSccMapping);
eqBackendSimCodeMapping = appendSccIdxRange(uniqueEqIndex, uniqueEqIndex1 - 1, e, eqBackendSimCodeMapping);
Expand All @@ -1730,7 +1731,7 @@ algorithm
(eqnlst, varlst,_) = BackendDAETransform.getEquationAndSolvedVar(comp, syst.orderedEqs, syst.orderedVars);
// States are solved for der(x) not x.
varlst = List.map(varlst, BackendVariable.transformXToXd);
(equations1, uniqueEqIndex1, tempvars) = createSingleComplexEqnCode(listHead(eqnlst), varlst, uniqueEqIndex, tempvars, shared.info, true, shared.functionTree);
(equations1, uniqueEqIndex1, tempvars) = createSingleComplexEqnCode(listHead(eqnlst), varlst, uniqueEqIndex, tempvars, shared.info, true, shared.functionTree, clockIndex);

eqSccMapping = appendSccIdx(uniqueEqIndex1-1, sccIndex, eqSccMapping);
eqBackendSimCodeMapping = appendSccIdxRange(uniqueEqIndex, uniqueEqIndex1 - 1, e, eqBackendSimCodeMapping);
Expand Down Expand Up @@ -1945,7 +1946,7 @@ algorithm
equation
(eqnlst, varlst, _) = BackendDAETransform.getEquationAndSolvedVar(comp, eqns, vars);
varlst = List.map(varlst, BackendVariable.transformXToXd);
(equations1, uniqueEqIndex) = createSingleAlgorithmCode(eqnlst, varlst, skipDiscInAlgorithm, iuniqueEqIndex);
(equations1, uniqueEqIndex) = createSingleAlgorithmCode(eqnlst, varlst, skipDiscInAlgorithm, iuniqueEqIndex, partitionKindToClockIndex(syst.partitionKind));
then (equations1, equations1, uniqueEqIndex, itempvars);

// A single complex equation
Expand All @@ -1954,7 +1955,7 @@ algorithm
(eqnlst, varlst,_) = BackendDAETransform.getEquationAndSolvedVar(comp, eqns, vars);
// States are solved for der(x) not x.
varlst = List.map(varlst, BackendVariable.transformXToXd);
(equations1, uniqueEqIndex, tempvars) = createSingleComplexEqnCode(listHead(eqnlst), varlst, iuniqueEqIndex, itempvars, ei, genDiscrete, shared.functionTree);
(equations1, uniqueEqIndex, tempvars) = createSingleComplexEqnCode(listHead(eqnlst), varlst, iuniqueEqIndex, itempvars, ei, genDiscrete, shared.functionTree, partitionKindToClockIndex(syst.partitionKind));
then (equations1, equations1, uniqueEqIndex, tempvars);

// A single when equation
Expand Down Expand Up @@ -2150,6 +2151,18 @@ algorithm
end match;
end addAssertEqn;

protected function partitionKindToClockIndex
input BackendDAE.BaseClockPartitionKind kind;
output Option<Integer> clockIndex;
algorithm
clockIndex := match kind
local
Integer index;
case BackendDAE.CLOCKED_PARTITION(subPartIdx=index) then SOME(index);
else NONE();
end match;
end partitionKindToClockIndex;

protected function createEquation
input Integer eqNum;
input Integer varNum;
Expand All @@ -2167,8 +2180,9 @@ protected
BackendDAE.EquationArray eqns;
BackendDAE.Equation eqn;
BackendDAE.Var v;
BackendDAE.BaseClockPartitionKind partitionKind;
algorithm
BackendDAE.EQSYSTEM(orderedVars=vars, orderedEqs=eqns) := syst;
BackendDAE.EQSYSTEM(orderedVars=vars, orderedEqs=eqns, partitionKind=partitionKind) := syst;
eqn := BackendEquation.get(eqns, eqNum);
_ := match eqn
case BackendDAE.WHEN_EQUATION() then ();
Expand Down Expand Up @@ -2301,7 +2315,7 @@ algorithm
(resEqs, uniqueEqIndex, tempvars) := createNonlinearResidualEquations({eqn}, iuniqueEqIndex, itempvars, shared.functionTree);
cr := if BackendVariable.isStateVar(v) then ComponentReference.crefPrefixDer(cr) else cr;
(_, homotopySupport) := BackendEquation.traverseExpsOfEquation(eqn, BackendDAEUtil.containsHomotopyCall, false);
eqSystlst := {SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, {cr}, 0, 1, NONE(), homotopySupport, false, false), NONE(), eqAttr)};
eqSystlst := {SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, {cr}, 0, 1, NONE(), homotopySupport, false, false, partitionKindToClockIndex(partitionKind)), NONE(), eqAttr)};
uniqueEqIndex := uniqueEqIndex + 1;
else
b := false;
Expand All @@ -2314,7 +2328,7 @@ algorithm
(resEqs, uniqueEqIndex, tempvars) := createNonlinearResidualEquations({eqn}, iuniqueEqIndex, itempvars, shared.functionTree);
cr := if BackendVariable.isStateVar(v) then ComponentReference.crefPrefixDer(cr) else cr;
(_, homotopySupport) := BackendEquation.traverseExpsOfEquation(eqn, BackendDAEUtil.containsHomotopyCall, false);
eqSystlst := {SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, {cr}, 0, 1, NONE(), homotopySupport, false, false), NONE(), eqAttr)};
eqSystlst := {SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, {cr}, 0, 1, NONE(), homotopySupport, false, false, partitionKindToClockIndex(partitionKind)), NONE(), eqAttr)};
uniqueEqIndex := uniqueEqIndex+1;
end if;
end if;
Expand Down Expand Up @@ -3286,7 +3300,7 @@ algorithm
vars_1 = BackendVariable.listVar1(var_lst_1);
eqns_1 = BackendEquation.listEquation(eqn_lst);
partOfJac = BackendDAEUtil.isJacobianDAE(ishared);
(equations_, uniqueEqIndex, tempvars) = createOdeSystem2(false, vars_1, globalKnownVars, eqns_1, jacobian, jac_tp, funcs, vars, iuniqueEqIndex, ei, mixedSystem, partOfJac, itempvars);
(equations_, uniqueEqIndex, tempvars) = createOdeSystem2(false, vars_1, globalKnownVars, eqns_1, jacobian, jac_tp, funcs, vars, iuniqueEqIndex, ei, mixedSystem, partOfJac, itempvars, partitionKindToClockIndex(isyst.partitionKind));
uniqueEqIndexMapping = uniqueEqIndex-1; //a system with this index is created that contains all the equations with the indeces from iuniqueEqIndex to uniqueEqIndex-2
//tmpEqSccMapping = appendSccIdxRange(iuniqueEqIndex, uniqueEqIndex - 1, isccIndex, ieqSccMapping);
tmpEqSccMapping = appendSccIdxRange(uniqueEqIndexMapping, uniqueEqIndex - 1, isccIndex, ieqSccMapping);
Expand Down Expand Up @@ -3327,6 +3341,7 @@ protected function createOdeSystem2
input Boolean mixedSystem;
input Boolean partOfJac;
input list<SimCodeVar.SimVar> itempvars;
input Option<Integer> clockIndex;
output list<SimCode.SimEqSystem> equations_;
output Integer ouniqueEqIndex;
output list<SimCodeVar.SimVar> otempvars;
Expand Down Expand Up @@ -3400,7 +3415,7 @@ algorithm
// create symbolic jacobian for simulation
(jacobianMatrix, uniqueEqIndex, tempvars) = createSymbolicSimulationJacobian(inJacobian, uniqueEqIndex, tempvars);
(_, homotopySupport) = BackendEquation.traverseExpsOfEquationList(eqn_lst, BackendDAEUtil.containsHomotopyCall, false);
then ({SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, crefs, 0, inVars.numberOfVars+listLength(tempvars)-listLength(itempvars), jacobianMatrix, homotopySupport, mixedSystem, false), NONE(), BackendDAE.EQ_ATTR_DEFAULT_UNKNOWN)}, uniqueEqIndex+1, tempvars);
then ({SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, crefs, 0, inVars.numberOfVars+listLength(tempvars)-listLength(itempvars), jacobianMatrix, homotopySupport, mixedSystem, false, clockIndex), NONE(), BackendDAE.EQ_ATTR_DEFAULT_UNKNOWN)}, uniqueEqIndex+1, tempvars);

// No analytic jacobian available. Generate non-linear system.
case (_, _) equation
Expand All @@ -3411,7 +3426,7 @@ algorithm
crefs = BackendVariable.getAllCrefFromVariables(inVars);
(resEqs, uniqueEqIndex, tempvars) = createNonlinearResidualEquations(eqn_lst, iuniqueEqIndex, itempvars, inFuncs);
(_, homotopySupport) = BackendEquation.traverseExpsOfEquationList(eqn_lst, BackendDAEUtil.containsHomotopyCall, false);
then ({SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, crefs, 0, inVars.numberOfVars+listLength(tempvars)-listLength(itempvars), NONE(), homotopySupport, mixedSystem, false), NONE(), BackendDAE.EQ_ATTR_DEFAULT_UNKNOWN)}, uniqueEqIndex+1, tempvars);
then ({SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, crefs, 0, inVars.numberOfVars+listLength(tempvars)-listLength(itempvars), NONE(), homotopySupport, mixedSystem, false, clockIndex), NONE(), BackendDAE.EQ_ATTR_DEFAULT_UNKNOWN)}, uniqueEqIndex+1, tempvars);

// failure
else equation
Expand Down Expand Up @@ -3506,6 +3521,7 @@ algorithm
Option<SimCode.NonlinearSystem> alternativeTearingNl;
BackendDAE.BackendDAEType backendDAEType;
Boolean partOfJac;
Option<Integer> clockIndex;

// CASE: linear
case(true, BackendDAE.EQSYSTEM(orderedVars=vars, orderedEqs=eqns), BackendDAE.SHARED(globalKnownVars=globalKnownVars)) equation
Expand Down Expand Up @@ -3582,7 +3598,9 @@ algorithm
(_, homotopySupport) = BackendEquation.traverseExpsOfEquationList(reqns, BackendDAEUtil.containsHomotopyCall, false);
end if;

nlSystem = SimCode.NONLINEARSYSTEM(uniqueEqIndex, simequations, tcrs, 0, listLength(tvars)+nInnerVars+listLength(tempvars)-listLength(itempvars), jacobianMatrix, homotopySupport, mixedSystem, true);
clockIndex = partitionKindToClockIndex(isyst.partitionKind);

nlSystem = SimCode.NONLINEARSYSTEM(uniqueEqIndex, simequations, tcrs, 0, listLength(tvars)+nInnerVars+listLength(tempvars)-listLength(itempvars), jacobianMatrix, homotopySupport, mixedSystem, true, clockIndex);
tempvars2 = tempvars;

// Do if dynamic tearing is activated
Expand All @@ -3607,7 +3625,7 @@ algorithm
(_, homotopySupport) = BackendEquation.traverseExpsOfEquationList(reqns, BackendDAEUtil.containsHomotopyCall, false);
end if;

alternativeTearingNl = SOME(SimCode.NONLINEARSYSTEM(uniqueEqIndex, simequations, tcrs, 0, listLength(tvars)+nInnerVars+listLength(tempvars2)-listLength(tempvars), jacobianMatrix, homotopySupport, mixedSystem, true));
alternativeTearingNl = SOME(SimCode.NONLINEARSYSTEM(uniqueEqIndex, simequations, tcrs, 0, listLength(tvars)+nInnerVars+listLength(tempvars2)-listLength(tempvars), jacobianMatrix, homotopySupport, mixedSystem, true, clockIndex));
else
alternativeTearingNl = NONE();
end if;
Expand Down Expand Up @@ -3895,7 +3913,9 @@ protected
Integer nAlgebraicSystems = 0;
Integer index, nAllVars = 0;
Boolean debug=false;
Option<Integer> clockIndex;
algorithm
clockIndex := partitionKindToClockIndex(constSyst.partitionKind);
for component in components loop
tmpEqns := {};
tmpInputVars := {}; tmpOutputVars := {}; tmpInnerVars := {};
Expand Down Expand Up @@ -3940,14 +3960,14 @@ algorithm
(eqnlst, varlst,_) = BackendDAETransform.getEquationAndSolvedVar(component, constSyst.orderedEqs, constSyst.orderedVars);
// States are solved for der(x) not x.
varlst = List.map(varlst, BackendVariable.transformXToXd);
(tmpEqns, uniqueEqIndex, _) = createSingleComplexEqnCode(listHead(eqnlst), varlst, uniqueEqIndex, {}, shared.info, true, shared.functionTree);
(tmpEqns, uniqueEqIndex, _) = createSingleComplexEqnCode(listHead(eqnlst), varlst, uniqueEqIndex, {}, shared.info, true, shared.functionTree, clockIndex);
then();

// case for single algorithm equation
case BackendDAE.SINGLEALGORITHM() equation
(eqnlst, varlst,_) = BackendDAETransform.getEquationAndSolvedVar(component, constSyst.orderedEqs, constSyst.orderedVars);
varlst = List.map(varlst, BackendVariable.transformXToXd);
(tmpEqns, uniqueEqIndex) = createSingleAlgorithmCode(eqnlst, varlst, false, uniqueEqIndex);
(tmpEqns, uniqueEqIndex) = createSingleAlgorithmCode(eqnlst, varlst, false, uniqueEqIndex, clockIndex);
then();

// case for single algorithm equation
Expand Down Expand Up @@ -6034,6 +6054,7 @@ protected function createSingleComplexEqnCode
input BackendDAE.ExtraInfo iextra;
input Boolean genDiscrete;
input DAE.FunctionTree funcTree;
input Option<Integer> clockIndex;
output list<SimCode.SimEqSystem> equations_;
output Integer ouniqueEqIndex;
output list<SimCodeVar.SimVar> otempvars;
Expand Down Expand Up @@ -6073,7 +6094,7 @@ algorithm
// Create nonlinear equation system from complex function
(resEqs, uniqueEqIndex, tempvars, crefs) = createNonlinearResidualEquationsSingleComplex(e1, e2, source, eqAttr, iuniqueEqIndex, itempvars, crefs);
(_, homotopySupport) = BackendEquation.traverseExpsOfEquation(inEquation, BackendDAEUtil.containsHomotopyCall, false);
then ({SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, crefs, 0, listLength(inVars)+listLength(tempvars)-listLength(itempvars), NONE(), homotopySupport, false, false), NONE(), eqAttr)}, uniqueEqIndex+1, tempvars);
then ({SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, crefs, 0, listLength(inVars)+listLength(tempvars)-listLength(itempvars), NONE(), homotopySupport, false, false, clockIndex), NONE(), eqAttr)}, uniqueEqIndex+1, tempvars);

case (BackendDAE.COMPLEX_EQUATION(attr=eqAttr), _, _, _) equation
crefs = List.map(inVars, BackendVariable.varCref);
Expand All @@ -6088,7 +6109,7 @@ algorithm
// considered yet there.
(resEqs, uniqueEqIndex, tempvars) = createNonlinearResidualEquations({inEquation}, iuniqueEqIndex, itempvars, funcTree);
(_, homotopySupport) = BackendEquation.traverseExpsOfEquation(inEquation, BackendDAEUtil.containsHomotopyCall, false);
then ({SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, crefs, 0, listLength(inVars)+listLength(tempvars)-listLength(itempvars), NONE(), homotopySupport, false, false), NONE(), eqAttr)}, uniqueEqIndex+1, tempvars);
then ({SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(uniqueEqIndex, resEqs, crefs, 0, listLength(inVars)+listLength(tempvars)-listLength(itempvars), NONE(), homotopySupport, false, false, clockIndex), NONE(), eqAttr)}, uniqueEqIndex+1, tempvars);

// failure
case (BackendDAE.COMPLEX_EQUATION(left=e1, right=e2), _, _, _) equation
Expand Down Expand Up @@ -6510,6 +6531,7 @@ protected function createSingleAlgorithmCode
input list<BackendDAE.Var> vars;
input Boolean skipDiscinAlgorithm;
input Integer iuniqueEqIndex;
input Option<Integer> clockIndex;
output list<SimCode.SimEqSystem> equations_;
output Integer ouniqueEqIndex;
algorithm
Expand Down Expand Up @@ -6590,7 +6612,7 @@ algorithm
if not listEmpty(solvedVars) then
result = {SimCode.SES_NONLINEAR(SimCode.NONLINEARSYSTEM(iuniqueEqIndex+1,
{SimCode.SES_INVERSE_ALGORITHM(iuniqueEqIndex, algStatements, knownOutputCrefs, true, eqAttr)},
solvedVars, 0, listLength(vars), NONE(), false, false, false), NONE(), eqAttr)};
solvedVars, 0, listLength(vars), NONE(), false, false, false, clockIndex), NONE(), eqAttr)};
ouniqueEqIndex = iuniqueEqIndex+2;
else
result = {SimCode.SES_INVERSE_ALGORITHM(iuniqueEqIndex, algStatements, knownOutputCrefs, false, eqAttr)};
Expand Down Expand Up @@ -13844,7 +13866,7 @@ algorithm
getDefaultValueReference(inSimVar, inSimCode.modelInfo.varInfo);
case (_, _, _) guard(stringEqual(Config.simCodeTarget(), "Cpp")
or stringEqual(Config.simCodeTarget(), "omsic")
or stringEqual(Config.simCodeTarget(), "omsicpp"))
or stringEqual(Config.simCodeTarget(), "omsicpp"))
algorithm
// resolve aliases to get multi-dimensional arrays right
// (this should possibly be done in getVarIndexByMapping?)
Expand Down

0 comments on commit a5f09fc

Please sign in to comment.