1 | using HeuristicLab.Core;
|
---|
2 | using HeuristicLab.Encodings.IntegerVectorEncoding;
|
---|
3 | using HeuristicLab.Encodings.PermutationEncoding;
|
---|
4 | using HeuristicLab.Encodings.ScheduleEncoding.JobSequenceMatrix;
|
---|
5 | using HeuristicLab.Encodings.ScheduleEncoding.PermutationWithRepetition;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.Encodings.ScheduleEncoding.Tests {
|
---|
8 | public class TestUtils {
|
---|
9 | public static JSMEncoding CreateTestJSM1() {
|
---|
10 | JSMEncoding result = new JSMEncoding();
|
---|
11 | ItemList<Permutation> jsm = new ItemList<Permutation>();
|
---|
12 | for (int i = 0; i < 6; i++)
|
---|
13 | jsm.Add(new Permutation(PermutationTypes.Absolute, new int[] { 0, 1, 2, 3, 4, 5 }));
|
---|
14 | result.JobSequenceMatrix = jsm;
|
---|
15 | return result;
|
---|
16 | }
|
---|
17 |
|
---|
18 | public static JSMEncoding CreateTestJSM2() {
|
---|
19 | JSMEncoding result = new JSMEncoding();
|
---|
20 | ItemList<Permutation> jsm = new ItemList<Permutation>();
|
---|
21 | for (int i = 0; i < 6; i++)
|
---|
22 | jsm.Add(new Permutation(PermutationTypes.Absolute, new int[] { 5, 4, 3, 2, 1, 0 }));
|
---|
23 | result.JobSequenceMatrix = jsm;
|
---|
24 | return result;
|
---|
25 | }
|
---|
26 |
|
---|
27 |
|
---|
28 | public static PWREncoding CreateTestPWR1() {
|
---|
29 | PWREncoding result = new PWREncoding();
|
---|
30 | IntegerVector pwr = new IntegerVector(new int[] { 1, 0, 1, 1, 2, 0, 2, 2, 0 });
|
---|
31 | result.PermutationWithRepetition = pwr;
|
---|
32 | return result;
|
---|
33 | }
|
---|
34 |
|
---|
35 | public static PWREncoding CreateTestPWR2() {
|
---|
36 | PWREncoding result = new PWREncoding();
|
---|
37 | IntegerVector pwr = new IntegerVector(new int[] { 0, 1, 1, 0, 2, 0, 1, 2, 2 });
|
---|
38 | result.PermutationWithRepetition = pwr;
|
---|
39 | return result;
|
---|
40 | }
|
---|
41 | }
|
---|
42 | }
|
---|