Skip to content

Commit

Permalink
- fix bootstrapping
Browse files Browse the repository at this point in the history
- try if relaxation of linear systems works

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13912 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Nov 15, 2012
1 parent c572316 commit 0fda3e2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -10280,8 +10280,8 @@ algorithm
case (_,_,
(comp as BackendDAE.EQUATIONSYSTEM(eqns=eindex,vars=vindx,jac=ojac,jacType=jacType))::comps,_,_)
equation
equality(jacType = BackendDAE.JAC_TIME_VARYING());
true = Flags.isSet(Flags.LINEAR_TEARING);
//equality(jacType = BackendDAE.JAC_TIME_VARYING());
//true = Flags.isSet(Flags.LINEAR_TEARING);
(comp1,true) = tearingSystemNew1_1(isyst,ishared,eindex,vindx,ojac,jacType);
(acc,b1) = tearingSystemNew1(isyst,ishared,comps,true,comp1::iAcc);
then
Expand Down
5 changes: 3 additions & 2 deletions Compiler/BackEnd/ExpressionSolve.mo
Expand Up @@ -377,7 +377,8 @@ algorithm
case (_,_,DAE.CREF(componentRef = cr),_)
equation
e = Expression.makeDiff(inExp1,inExp2);
((e,(_,false,SOME(DAE.BINARY(operator=DAE.POW(tp1),exp2 = a))))) = Expression.traverseExpTopDown(e, traversingVarOnlyinPow, (cr,false,NONE()));
((e,(_,false,SOME(a)))) = Expression.traverseExpTopDown(e, traversingVarOnlyinPow, (cr,false,NONE()));
DAE.BINARY(operator=DAE.POW(ty=tp1),exp2 = a) = a;
tp = Expression.typeof(e);
(z,_) = Expression.makeZeroExpression(Expression.arrayDimension(tp));
(rhs,asserts) = solve(e,z,inExp3);
Expand Down Expand Up @@ -478,7 +479,7 @@ protected function generateAssert
algorithm
outAsserts := matchcontinue (inExp1,inExp2,inExp3,a,inAsserts)
local
DAE.Exp a,z;
DAE.Exp z;
DAE.Type tp;
list<DAE.Statement> asserts;
String estr,se1,se2,sa;
Expand Down
4 changes: 1 addition & 3 deletions Compiler/BackEnd/SimCodeUtil.mo
Expand Up @@ -4805,7 +4805,6 @@ algorithm
list<tuple<Integer, Integer, BackendDAE.Equation>> jac;
list<tuple<Integer, Integer, SimCode.SimEqSystem>> simJac;
// linear case
/*
case(true,_,_,_,_,BackendDAE.EQSYSTEM(orderedVars=vars,orderedEqs=eqns),BackendDAE.SHARED(knownVars=kv,functionTree=functree),_,_,_)
equation
true = intLt(listLength(otherEqns),10);
Expand Down Expand Up @@ -4839,8 +4838,7 @@ algorithm
// generate other equations
(simequations,uniqueEqIndex,tempvars) = createTornSystemOtherEqns(otherEqns,skipDiscInAlgorithm,isyst,ishared,helpVarInfo,iuniqueEqIndex+1,itempvars,{SimCode.SES_LINEAR(iuniqueEqIndex, false, simVars, beqs, simJac)});
then
(simequations,uniqueEqIndex,tempvars);
*/
(simequations,uniqueEqIndex,tempvars);
// nonliniear case
case(_,_,_,_,_,BackendDAE.EQSYSTEM(orderedVars=vars,orderedEqs=eqns),_,_,_,_)
equation
Expand Down

0 comments on commit 0fda3e2

Please sign in to comment.