Changeset e4faaeb in OpenModelica
- Timestamp:
- 2020-05-04T14:12:55+02:00 (4 years ago)
- Children:
- 0e9f9fe9
- Parents:
- b201452
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OMCompiler/Compiler/BackEnd/BackendDAECreate.mo
rb201452 re4faaeb 227 227 //remove alias from extVarArray 228 228 extVarsOut := BackendVariable.deleteVars(extAliasVars,extVars); 229 extVarsOut := removeExtAliasBinding(extVarsOut,repl); 229 230 230 231 //replace in equations … … 237 238 oRemEqs := listReverse(oRemEqs); 238 239 end getExternalObjectAlias; 240 241 242 protected function removeExtAliasBinding "Removes the binding of an external variable if the binding cref ist already detected as an alias variable. 243 author: Waurich TUD 2020-05" 244 input BackendDAE.Variables extVarsIn; 245 input BackendVarTransform.VariableReplacements repl; 246 output BackendDAE.Variables extVarsOut; 247 protected 248 list<BackendDAE.Var> varLst,extVarLst; 249 DAE.ComponentRef cref; 250 algorithm 251 varLst := BackendVariable.varList(extVarsIn); 252 extVarLst := {}; 253 for var in varLst loop 254 var := matchcontinue(var) 255 case (BackendDAE.VAR(bindExp = SOME(DAE.CREF(componentRef=cref)))) 256 algorithm 257 if BackendVarTransform.hasReplacement(repl,cref) then 258 var.bindExp := NONE(); 259 end if; 260 then var; 261 else var; 262 end matchcontinue; 263 extVarLst := var::extVarLst; 264 end for; 265 extVarsOut := BackendVariable.listVar(extVarLst); 266 end removeExtAliasBinding; 239 267 240 268 protected function getExternalObjectAlias3 "Gets the alias var and sim var for the given alias equation and adds a replacement rule
Note: See TracChangeset
for help on using the changeset viewer.