Download fulltext - DiVA Portal

Transcript
model. Constraints with conditions are added only after its condition has been evaluated true.
For example, the constraint
if (fm == 0) p1.u - p2.u = p1.i * rAct;
would be added only if the condition (fm == 0) is true, that is we have chosen to run the
algorithm on the no-fault model. For each added constraint, the variables used are sent to a
variable manager. A variable is added to the list of structural model variables if it fulfils the
following conditions:
a) It is not a known variable. Only unknown variables are stored in the structural model.
b) It is not a failure mode variable.
c) It is not already in the list. The same variable typically exists in various constraints.
Finally, a structural model matrix in the form of a two dimensional array is created.
5.2 Implementation of structural algorithms
Algorithm 1 and Algorithm 2 has been implemented in the structural algorithm module. Each
actual algorithm is hosted in a separate class, and the structural model in another. The
algorithm class controls execution, and its primary function (method in java terminology)
takes a structural model as input. As it removes one equation at the time, a new structural
model is created for each case. When execution terminates, the MSO sets are returned as a list
of lists of integers, where the integers represent equation numbers.
In every iteration, the algorithm needs to know which equations that are parts of the
overdetermined part M+. As described above, this can be accomplished by finding a maximal
matching and looking for alternating paths. One maximal matching is to select the edges on
the diagonal of a structural matrix model. A diagonal should be interpreted in a broad sense.
An example of a diagonal in a non-square matrix is presented in Figure 5.1.
Figure 5.1 - A diagonal in a non-square matrix
Thus the problem of finding a maximal matching can be transformed into the problem of rearranging the order of equations in such a way that the diagonal is non zero. Then a maximal
matching is found. To find the order of equations that gives the minimal number of zeros in a
matrix is a non trivial problem. To solve this, a FORTRAN implementation of an algorithm
known as Algorithm 575 by I. S. Duff (1981) has been used. FORTRAN routines can be called
from java via the Java Native Interface. The call is directed to a C proxy program, which
passes the request on to the FORTRAN routine. The FORTRAN routine returns an array indicating
23