Changeset 15533 for branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/OptimalPolynomialAssignment.cs
- Timestamp:
- 12/18/17 14:38:18 (6 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/CFSAP/HeuristicLab.Problems.Scheduling.CFSAP/3.3/OptimalPolynomialAssignment.cs
r15532 r15533 26 26 27 27 namespace HeuristicLab.Problems.Scheduling.CFSAP { 28 public static class Optimal Assignment {28 public static class OptimalPolynomialAssignment { 29 29 30 30 public static int[] MakeAssignment(Permutation order, IntMatrix processingTimes, ItemList<IntMatrix> setupTimes, out int T) { … … 33 33 int[,,] weights = new int[2, 2 * N, 2 * N]; 34 34 int[,] graph = new int[2, N]; 35 int[,] prevPath = new int[2, N + 1]; 36 int[] optimalAssignment = new int[N]; 35 int[,] prevPath = new int[2, N + 1]; //Only for optimal assignment evaluation 36 int[] optimalAssignment = new int[N]; //Only for optimal assignment evaluation 37 37 38 38 //Calculate weights in the graph 39 for (int S = 0; S < N; S++) { //Starting point of the arc40 for (int sM = 0; sM < 2; sM++) { 39 for (int S = 0; S < N; S++) { //Starting point of the arc 40 for (int sM = 0; sM < 2; sM++) { //Starting point machine 41 41 int eM = sM == 0 ? 1 : 0; 42 42 weights[sM, S, S + 1] = 0; … … 87 87 if (newT < T) { 88 88 T = newT; 89 optimalAssignment = MakeAssign ement(S, SM, prevPath, order);89 optimalAssignment = MakeAssignment(S, SM, prevPath, order); 90 90 } 91 91 } … … 104 104 } 105 105 106 private static int[] MakeAssign ement(int start, int startMach, int[,] prevPath, Permutation order) {106 private static int[] MakeAssignment(int start, int startMach, int[,] prevPath, Permutation order) { 107 107 var N = order.Length; 108 108 int[] assignment = Enumerable.Repeat(-1, N).ToArray();
Note: See TracChangeset
for help on using the changeset viewer.