Changeset 17516 for branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/TestUtils.cs
- Timestamp:
- 04/20/20 16:18:23 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab.Encodings.ScheduleEncoding-3.3/TestUtils.cs
r17226 r17516 29 29 namespace HeuristicLab.Encodings.ScheduleEncoding.Tests { 30 30 public class TestUtils { 31 public static JSM EncodingCreateTestJSM1() {32 JSM Encoding result = new JSMEncoding(0);31 public static JSM CreateTestJSM1() { 32 JSM result = new JSM(0); 33 33 ItemList<Permutation> jsm = result.JobSequenceMatrix; 34 34 for (int i = 0; i < 6; i++) … … 37 37 } 38 38 39 public static JSM EncodingCreateTestJSM2() {40 JSM Encoding result = new JSMEncoding(0);39 public static JSM CreateTestJSM2() { 40 JSM result = new JSM(0); 41 41 ItemList<Permutation> jsm = result.JobSequenceMatrix; 42 42 for (int i = 0; i < 6; i++) … … 46 46 47 47 48 public static PWR EncodingCreateTestPWR1() {49 PWR Encoding result = new PWREncoding();48 public static PWR CreateTestPWR1() { 49 PWR result = new PWR(); 50 50 IntegerVector pwr = new IntegerVector(new int[] { 1, 0, 1, 1, 2, 0, 2, 2, 0 }); 51 51 result.PermutationWithRepetition = pwr; … … 53 53 } 54 54 55 public static PWR EncodingCreateTestPWR2() {56 PWR Encoding result = new PWREncoding();55 public static PWR CreateTestPWR2() { 56 PWR result = new PWR(); 57 57 IntegerVector pwr = new IntegerVector(new int[] { 0, 1, 1, 0, 2, 0, 1, 2, 2 }); 58 58 result.PermutationWithRepetition = pwr; … … 87 87 88 88 public static Schedule CreateTestSchedule1() { 89 Schedule result = DirectScheduleRandomCreator.Apply(new PWR Encoding(3, 3, new TestRandom(new int[] { 1, 0, 1, 1, 2, 0, 2, 2, 0 }, null)), CreateJobData());89 Schedule result = DirectScheduleRandomCreator.Apply(new PWR(3, 3, new TestRandom(new int[] { 1, 0, 1, 1, 2, 0, 2, 2, 0 }, null)), CreateJobData()); 90 90 return result; 91 91 } 92 92 93 93 public static Schedule CreateTestSchedule2() { 94 Schedule result = DirectScheduleRandomCreator.Apply(new PWR Encoding(3, 3, new TestRandom(new int[] { 0, 1, 1, 0, 2, 0, 1, 2, 2 }, null)), CreateJobData());94 Schedule result = DirectScheduleRandomCreator.Apply(new PWR(3, 3, new TestRandom(new int[] { 0, 1, 1, 0, 2, 0, 1, 2, 2 }, null)), CreateJobData()); 95 95 return result; 96 96 } … … 117 117 } 118 118 119 public static bool JSMEncodingEquals(JSM Encoding expected, JSMEncodingactual) {119 public static bool JSMEncodingEquals(JSM expected, JSM actual) { 120 120 if (expected.JobSequenceMatrix.Count != actual.JobSequenceMatrix.Count) 121 121 return false; … … 136 136 } 137 137 138 public static bool PRWEncodingEquals(PWR Encoding expected, PWREncodingactual) {138 public static bool PRWEncodingEquals(PWR expected, PWR actual) { 139 139 if (expected.PermutationWithRepetition.Length != actual.PermutationWithRepetition.Length) 140 140 return false;
Note: See TracChangeset
for help on using the changeset viewer.