===========================================================
      INFORMATION ABOUT THE SORTING ALGORITHMS OF SIMULATION TOOL
      Component.Partition: C:/Ecosim64/REACTOR/experiments/reactor+a+b.partition1/reactor+a+b.partition1.sortinfo.txt
      Date and Time: 15/03/2018 23:39:20.503000
 NOTE:
This file shows the different steps of the simulation tool sorting algorithms.
The terminology used for variable calculation is:
	X: Variable used in equation
	E: Explict variable
	A: Algebraic variable
	L: Variable solved linearly
	O: Calculated as Output of a function or SEQUENTIAL block

===========================================================

*** BEGIN REDUCTION OF EQUATIONS WITH CONSTANT COEFICIENTS***

BOX 1 WITH CONSTANT COEFICIENTS, #Equations: 1
F_optim[1]	J_coste	_IND_	
----------------------- InitDiagonalizeLinearReduct
1	-1	0	
F_optim[1]	J_coste	_IND_	
----------------------- divideRowLinearReduct
1	-1	0	
F_optim[1]	J_coste	_IND_	
----------------------- finalLinearReduct
1	-1	0	
REPLACE EQUATION: 1: "F_optim[1] = J_coste" BY	"F_optim[1] = J_coste"

BOX 2 WITH CONSTANT COEFICIENTS, #Equations: 1
F_optim[2]	x	_IND_	
----------------------- InitDiagonalizeLinearReduct
1	-1	0	
F_optim[2]	x	_IND_	
----------------------- divideRowLinearReduct
1	-1	0	
F_optim[2]	x	_IND_	
----------------------- finalLinearReduct
1	-1	0	
REPLACE EQUATION: 1: "F_optim[2] = x" BY	"F_optim[2] = x"
*** END OF REDUCTION OF EQUATIONS WITH CONSTANT COEFICIENTS ***
Start running the equations sorting algorithms.
VARIABLES:
v0: A
v1: F_optim[1]
v2: F_optim[2]
v5: F_optim[3]'
v7: F_optim[4]'
v9: Fr
v10: J_coste
v11: Q
v13: T'
v15: Tr'
v16: V
v17: Vr
v19: cA'
v20: cB
v21: k
v22: q
v23: x

EQUATIONS:
e3: V = MATH.PI * D * D * L / 4
e4: A = MATH.PI * D * L
e5: Vr = MATH.PI * (D + 2 * dc) * (D + 2 * dc) * L / 4 - MATH.PI * D * D * L / 4
e6: cB = cA0 - cA
e7: x = (cA0 - cA) / cA0
e8: k = 5.967 * exp(-826 / (T + 273.14))
e9: cA' = (q * (cA0 - cA) - V * k * cA) / V
e10: Q = U * A * (T - Tr)
e11: T' = (q * rho * Cp * (Te - T) - V * k * cA * DH - Q) / (V * rho * Cp)
e12: Tr' = (Fr * rhor * Cpr * (Tre - Tr) + Q) / (Vr * rhor * Cpr)
e13: J_coste = -q * (cA0 - cA)
e14: F_optim[1] = J_coste
e15: F_optim[2] = x
e16: F_optim[3]' = MATH.min(T, LiminfT) - LiminfT
e17: F_optim[4]' = MATH.max(T, LimsupT) - LimsupT

INITIAL STATE:
 VAR:| 0| 1| 2| 5| 7| 9|10|11|13|15|16|17|19|20|21|22|23
e  1:|  |  |  |  |  |  |  |  |  |  | X|  |  |  |  |  |  
e  2:| X|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
e  3:|  |  |  |  |  |  |  |  |  |  |  | X|  |  |  |  |  
e  4:|  |  |  |  |  |  |  |  |  |  |  |  |  | X|  |  |  
e  5:|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | X
e  6:|  |  |  |  |  |  |  |  |  |  |  |  |  |  | X|  |  
e  7:|  |  |  |  |  |  |  |  |  |  | X|  | X|  | X| X|  
e  8:| X|  |  |  |  |  |  | X|  |  |  |  |  |  |  |  |  
e  9:|  |  |  |  |  |  |  | X| X|  | X|  |  |  | X| X|  
e 10:|  |  |  |  |  | X|  | X|  | X|  | X|  |  |  |  |  
e 11:|  |  |  |  |  |  | X|  |  |  |  |  |  |  |  | X|  
e 12:|  | X|  |  |  |  | X|  |  |  |  |  |  |  |  |  |  
e 13:|  |  | X|  |  |  |  |  |  |  |  |  |  |  |  |  | X
e 14:|  |  |  | X|  |  |  |  |  |  |  |  |  |  |  |  |  
e 15:|  |  |  |  | X|  |  |  |  |  |  |  |  |  |  |  |  

MAXIMUM TRANSVERSAL:
This algorithm exchanges columns(variables) trying to find a
diagonal of on-null terms, associating each equation to one variable.

OUTPUT MAXIMUM TRANSVERSAL:
 VAR:|16| 0|17|20|23|21|19|11|13|15|10| 1| 2| 5| 7| 9|22
e  1:| X|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
e  2:|  | X|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
e  3:|  |  | X|  |  |  |  |  |  |  |  |  |  |  |  |  |  
e  4:|  |  |  | X|  |  |  |  |  |  |  |  |  |  |  |  |  
e  5:|  |  |  |  | X|  |  |  |  |  |  |  |  |  |  |  |  
e  6:|  |  |  |  |  | X|  |  |  |  |  |  |  |  |  |  |  
e  7:| X|  |  |  |  | X| X|  |  |  |  |  |  |  |  |  | X
e  8:|  | X|  |  |  |  |  | X|  |  |  |  |  |  |  |  |  
e  9:| X|  |  |  |  | X|  | X| X|  |  |  |  |  |  |  | X
e 10:|  |  | X|  |  |  |  | X|  | X|  |  |  |  |  | X|  
e 11:|  |  |  |  |  |  |  |  |  |  | X|  |  |  |  |  | X
e 12:|  |  |  |  |  |  |  |  |  |  | X| X|  |  |  |  |  
e 13:|  |  |  |  | X|  |  |  |  |  |  |  | X|  |  |  |  
e 14:|  |  |  |  |  |  |  |  |  |  |  |  |  | X|  |  |  
e 15:|  |  |  |  |  |  |  |  |  |  |  |  |  |  | X|  |  

BLT ALGORITHM:
A Block Lower Triangularisation(BLT) is applied. The tool exchanges
files (equations) and columns(variables) trying to obtain a lower
triangular matrix (LTM).
If the LTM is found the equation system is explicit (e.g. variable v(i)
is calculated by equation e(j)).
If necessary, the tool manipulates symbolically the equation to solve 
each equation for the corresponding variable.
If the LTM is not found there are algebraic loops in the equations system.
Next output matrix represents each algebraic loop separated by dotted lines.

OUTPUT BLT:
 VAR:|16| 0|17|20|23|21|19|11|13|15|10| 1| 2| 5| 7
e  3:| E|  |  |  |  |  |  |  |  |  |  |  |  |  |  
e  4:|  | E|  |  |  |  |  |  |  |  |  |  |  |  |  
e  5:|  |  | E|  |  |  |  |  |  |  |  |  |  |  |  
e  6:|  |  |  | E|  |  |  |  |  |  |  |  |  |  |  
e  7:|  |  |  |  | E|  |  |  |  |  |  |  |  |  |  
e  8:|  |  |  |  |  | E|  |  |  |  |  |  |  |  |  
e  9:| X|  |  |  |  | X| E|  |  |  |  |  |  |  |  
e 10:|  | X|  |  |  |  |  | E|  |  |  |  |  |  |  
e 11:| X|  |  |  |  | X|  | X| E|  |  |  |  |  |  
e 12:|  |  | X|  |  |  |  | X|  | E|  |  |  |  |  
e 13:|  |  |  |  |  |  |  |  |  |  | E|  |  |  |  
e 14:|  |  |  |  |  |  |  |  |  |  | X| E|  |  |  
e 15:|  |  |  |  | X|  |  |  |  |  |  |  | E|  |  
e 16:|  |  |  |  |  |  |  |  |  |  |  |  |  | E|  
e 17:|  |  |  |  |  |  |  |  |  |  |  |  |  |  | E


TEARING ALGORITHM:
This algorithm tries to solve the algebraic loops (boxes). In case the box
is linear the tool will solve it by using a linear solver for the variables
inside this box (variables marked as L).
If the box is not linear, the algebraic box has to be torn by selecting
the minimum set of algebraic variables which can solve the box (variables
marked as A). Other box variables are solved explicitly (marked as E).
For certain systems the tool cannot find a correct solution.

OUTPUT TEARING:
 VAR:|16| 0|17|20|23|21|19|11|13|15|10| 1| 2| 5| 7
e  3:| E|  |  |  |  |  |  |  |  |  |  |  |  |  |  
e  4:|  | E|  |  |  |  |  |  |  |  |  |  |  |  |  
e  5:|  |  | E|  |  |  |  |  |  |  |  |  |  |  |  
e  6:|  |  |  | E|  |  |  |  |  |  |  |  |  |  |  
e  7:|  |  |  |  | E|  |  |  |  |  |  |  |  |  |  
e  8:|  |  |  |  |  | E|  |  |  |  |  |  |  |  |  
e  9:| X|  |  |  |  | X| E|  |  |  |  |  |  |  |  
e 10:|  | X|  |  |  |  |  | E|  |  |  |  |  |  |  
e 11:| X|  |  |  |  | X|  | X| E|  |  |  |  |  |  
e 12:|  |  | X|  |  |  |  | X|  | E|  |  |  |  |  
e 13:|  |  |  |  |  |  |  |  |  |  | E|  |  |  |  
e 14:|  |  |  |  |  |  |  |  |  |  | X| E|  |  |  
e 15:|  |  |  |  | X|  |  |  |  |  |  |  | E|  |  
e 16:|  |  |  |  |  |  |  |  |  |  |  |  |  | E|  
e 17:|  |  |  |  |  |  |  |  |  |  |  |  |  |  | E

SORTING ALGORITHMS FINISHED PROPERLY !!




