/// <summary> /// Identifies SCC in DSM (read chapter 3.2.2 in reference [2]), this information is passed back in the object array vClus. /// </summary> /// <param name="DSM"></param> /// <returns></returns> private static List <Cluster> Decompose(DesignStructureMatrix DSM) { DesignStructureMatrix DSMt = DesignStructureMatrix.Build.Dense(DSM.ColumnCount, DSM.ColumnCount); DesignStructureMatrix DSMmul = DesignStructureMatrix.Build.DenseIdentity(DSM.ColumnCount, DSM.ColumnCount); for (int c = 0; c < DSM.ColumnCount; c++) { DSMmul = DSM * DSMmul; DSMmul.ReplaceGreaterthanWith(1, 1); DSMt = DSMt + DSMmul; } DSMt = DSMt.PointwiseMultiply(DSMt.Transpose()); DSMt.ReplaceGreaterthanWith(1, 1); return(GatherClusters(DSMt)); }
/// <summary> /// Identifies the sequence for the Dsm for which its contents become all feed forward. /// The method is described in detail in reference [2] chapter 3.2.3.2. /// </summary> /// <param name="DSM"></param> /// <returns></returns> private static List <int> SequenceDsm(DesignStructureMatrix DSM) { int[] sequencedDSM = new int[DSM.ColumnCount]; DesignStructureMatrix E0 = DesignStructureMatrix.Build.Dense(DSM.ColumnCount, 1, 1); int nLoc = 0; while (nLoc < DSM.ColumnCount) { DesignStructureMatrix PE0 = DSM * E0; List <int> locations = PE0.Column(0).FindLocations(1); for (int l = 0; l < locations.Count; l++) { sequencedDSM[nLoc] = locations[l]; nLoc++; } E0 = PE0; E0.ReplaceLessthanWith(2, 0); E0.ReplaceGreaterthanWith(1, 1); } return(sequencedDSM.ToList()); }