Skip to content

Commit 40199da

Browse files
author
Jens Frenkel
committed
- move add dummy state to SimCodeUtil
- remove BinTree from BackendDAE - BackendDAE.Value -> Integer - BackendDAE.Key -> DAE.ComponentRef - remove unused code git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12983 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent b2972fc commit 40199da

17 files changed

+666
-1297
lines changed

Compiler/BackEnd/BackendDAE.mo

Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -357,35 +357,6 @@ uniontype Assignments "Assignments of variables to equations and vice versa are
357357

358358
end Assignments;
359359

360-
public
361-
uniontype BinTree "Generic Binary tree implementation
362-
- Binary Tree"
363-
record TREENODE
364-
Option<TreeValue> value "value ; Value" ;
365-
Option<BinTree> leftSubTree "leftSubTree ; left subtree" ;
366-
Option<BinTree> rightSubTree "rightSubTree ; right subtree" ;
367-
end TREENODE;
368-
369-
end BinTree;
370-
371-
public
372-
uniontype TreeValue "Each node in the binary tree can have a value associated with it.
373-
- Tree Value"
374-
record TREEVALUE
375-
Key key "Key" ;
376-
String str;
377-
Integer hash;
378-
Value value "Value" ;
379-
end TREEVALUE;
380-
381-
end TreeValue;
382-
383-
public
384-
type Key = .DAE.ComponentRef "A key is a Component Reference";
385-
386-
public
387-
type Value = Integer "- Value" ;
388-
389360
public
390361
uniontype IndexType
391362
record ABSOLUTE "produce incidence matrix with absolute indexes" end ABSOLUTE;
@@ -506,42 +477,42 @@ end StateOrder;
506477
public
507478
uniontype StrongComponent
508479
record SINGLEEQUATION
509-
Value eqn;
510-
Value var;
480+
Integer eqn;
481+
Integer var;
511482
end SINGLEEQUATION;
512483

513484
record EQUATIONSYSTEM
514-
list<Value> eqns;
515-
list<Value> vars "be carefule with states, this are solved for der(x)";
485+
list<Integer> eqns;
486+
list<Integer> vars "be carefule with states, this are solved for der(x)";
516487
Option<list<tuple<Integer, Integer, Equation>>> jac;
517488
JacobianType jacType;
518489
end EQUATIONSYSTEM;
519490

520491
record MIXEDEQUATIONSYSTEM
521492
StrongComponent condSystem;
522-
list<Value> disc_eqns;
523-
list<Value> disc_vars;
493+
list<Integer> disc_eqns;
494+
list<Integer> disc_vars;
524495
end MIXEDEQUATIONSYSTEM;
525496

526497
record SINGLEARRAY
527-
Value eqn;
528-
list<Value> vars "be carefule with states, this are solved for der(x)";
498+
Integer eqn;
499+
list<Integer> vars "be carefule with states, this are solved for der(x)";
529500
end SINGLEARRAY;
530501

531502
record SINGLEALGORITHM
532-
Value eqn;
533-
list<Value> vars "be carefule with states, this are solved for der(x)";
503+
Integer eqn;
504+
list<Integer> vars "be carefule with states, this are solved for der(x)";
534505
end SINGLEALGORITHM;
535506

536507
record SINGLECOMPLEXEQUATION
537-
Value eqn;
538-
list<Value> vars "be carefule with states, this are solved for der(x)";
508+
Integer eqn;
509+
list<Integer> vars "be carefule with states, this are solved for der(x)";
539510
end SINGLECOMPLEXEQUATION;
540511

541512
record TORNSYSTEM
542-
list<Value> tearingvars;
543-
list<Value> residualequations;
544-
list<tuple<Value,list<Value>>> otherEqnVarTpl "list of tuples of indexes for Equation and Variable solved in the equation, in the order they have to be solved";
513+
list<Integer> tearingvars;
514+
list<Integer> residualequations;
515+
list<tuple<Integer,list<Integer>>> otherEqnVarTpl "list of tuples of indexes for Equation and Variable solved in the equation, in the order they have to be solved";
545516
Boolean linear;
546517
end TORNSYSTEM;
547518

@@ -556,8 +527,6 @@ uniontype DivZeroExpReplace "- Should the division operator replaced by a operat
556527
record ONLY_VARIABLES " for expressions with variable variables(no parameters)" end ONLY_VARIABLES;
557528
end DivZeroExpReplace;
558529

559-
public constant BinTree emptyBintree=TREENODE(NONE(),NONE(),NONE()) " Empty binary tree " ;
560-
561530

562531
public
563532
type SymbolicJacobian = tuple< BackendDAE, // symbolic equation system

Compiler/BackEnd/BackendDAECreate.mo

Lines changed: 108 additions & 260 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)