Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/24/11 14:23:19 (13 years ago)
Author:
jhelm
Message:

#1329: Added DirectSchedule-Classes for optimization with the direct-schedule encoding.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding.Tests/TestUtils.cs

    r6406 r6475  
    3939      return result;
    4040    }
     41
     42
     43    public static ItemList<Job> CreateJobData() {
     44      Job j1 = new Job(0, 0);
     45      j1.Tasks = new ItemList<Task> {
     46        new Task (0, 0, j1.Index, 1),
     47        new Task (1, 1, j1.Index, 2),
     48        new Task (2, 2, j1.Index, 1)
     49      };
     50
     51      Job j2 = new Job(1, 0);
     52      j2.Tasks = new ItemList<Task> {
     53        new Task (3, 2, j2.Index, 2),
     54        new Task (4, 1, j2.Index, 1),
     55        new Task (5, 0, j2.Index, 2)
     56      };
     57
     58      Job j3 = new Job(2, 0);
     59      j3.Tasks = new ItemList<Task> {
     60        new Task (6, 0, j3.Index, 1),
     61        new Task (7, 2, j3.Index, 2),
     62        new Task (8, 1, j3.Index, 1)
     63      };
     64
     65      return new ItemList<Job> { j1, j2, j3 };
     66    }
     67
     68    public static Schedule CreateTestSchedule1() {
     69      Schedule result = DirectScheduleRandomCreator.Apply(3, 3, new PWREncoding(3, 3, new TestRandom(new int[] { 1, 0, 1, 1, 2, 0, 2, 2, 0 }, null)), CreateJobData());
     70      return result;
     71    }
     72
     73    public static Schedule CreateTestSchedule2() {
     74      Schedule result = DirectScheduleRandomCreator.Apply(3, 3, new PWREncoding(3, 3, new TestRandom(new int[] { 0, 1, 1, 0, 2, 0, 1, 2, 2 }, null)), CreateJobData());
     75      return result;
     76    }
    4177  }
    4278}
Note: See TracChangeset for help on using the changeset viewer.