using HeuristicLab.Core; using HeuristicLab.Encodings.IntegerVectorEncoding; using HeuristicLab.Encodings.PermutationEncoding; using HeuristicLab.Encodings.ScheduleEncoding.JobSequenceMatrix; using HeuristicLab.Encodings.ScheduleEncoding.PermutationWithRepetition; namespace HeuristicLab.Encodings.ScheduleEncoding.Tests { public class TestUtils { public static JSMEncoding CreateTestJSM1() { JSMEncoding result = new JSMEncoding(); ItemList jsm = new ItemList(); for (int i = 0; i < 6; i++) jsm.Add(new Permutation(PermutationTypes.Absolute, new int[] { 0, 1, 2, 3, 4, 5 })); result.JobSequenceMatrix = jsm; return result; } public static JSMEncoding CreateTestJSM2() { JSMEncoding result = new JSMEncoding(); ItemList jsm = new ItemList(); for (int i = 0; i < 6; i++) jsm.Add(new Permutation(PermutationTypes.Absolute, new int[] { 5, 4, 3, 2, 1, 0 })); result.JobSequenceMatrix = jsm; return result; } public static PWREncoding CreateTestPWR1() { PWREncoding result = new PWREncoding(); IntegerVector pwr = new IntegerVector(new int[] { 1, 0, 1, 1, 2, 0, 2, 2, 0 }); result.PermutationWithRepetition = pwr; return result; } public static PWREncoding CreateTestPWR2() { PWREncoding result = new PWREncoding(); IntegerVector pwr = new IntegerVector(new int[] { 0, 1, 1, 0, 2, 0, 1, 2, 2 }); result.PermutationWithRepetition = pwr; return result; } } }