|
@@ -2,7 +2,11 @@
|
2
|
2
|
|
3
|
3
|
Several encoding and associated utilities are provided in the `jobshop.encodings` package.
|
4
|
4
|
The abstract class `Encoding` provides a common interface for all encodings.
|
5
|
|
-The only requirement for an encoding is to transform it self into a `Schedule`.
|
|
5
|
+The only requirement for an encoding is to be able to transform itself into a `Schedule`.
|
|
6
|
+
|
|
7
|
+The `jobshop.encodings` package contains a `Task` class that allows representing a particular task of a jobshop instance.
|
|
8
|
+A `Task` object contains a pair of integers `(job, task)` that respectively specify the job in which the task appears, and the index of the task in this job.
|
|
9
|
+For instance the task created with `new Task(0, 2)` would represent the third task of the first job.
|
6
|
10
|
|
7
|
11
|
## Schedule
|
8
|
12
|
|
|
@@ -38,7 +42,7 @@ The resource order encoding specifies the order in which each machine will proce
|
38
|
42
|
|
39
|
43
|
Each machine is associated with an array of tasks that specifies the order on which the tasks must be scheduled on the machine.
|
40
|
44
|
|
41
|
|
-For instance, the encoding:
|
|
45
|
+For instance, the (completely fictional) encoding:
|
42
|
46
|
|
43
|
47
|
```
|
44
|
48
|
machine 0: [(0, 1), (1, 0)]
|
|
@@ -46,6 +50,6 @@ For instance, the encoding:
|
46
|
50
|
machine 2: [(1, 2), (0, 2)]
|
47
|
51
|
```
|
48
|
52
|
|
49
|
|
- Specifies that the first machine (machine 0) will first process the second task of the first job `(0, 1)` and only when it is finished can start processing the first task of the second job `(1, 0)`.
|
|
53
|
+ specifies that the first machine (machine 0) will first process the second task of the first job `(0, 1)` and only when it is finished can start processing the first task of the second job `(1, 0)`.
|
50
|
54
|
|
51
|
55
|
Unlike `JobNumbers`, the `ResourceOrder` encoding might represent invalid solutions. In this case, its `toSchedule()` method will return an empty result.
|