Package jobshop.solvers.neighborhood
Class Nowicki.Swap
java.lang.Object
jobshop.solvers.neighborhood.Nowicki.Swap
- Enclosing class:
- Nowicki
Represents a swap of two tasks on the same machine in a ResourceOrder encoding.
Consider the solution in ResourceOrder representation
machine 0 : (0,1) (1,2) (2,2)
machine 1 : (0,2) (2,1) (1,1)
machine 2 : ...
The swap with : t1= (0,2) and t2 = (2,1)
Represent inversion of the two tasks : (0,2) and (2,1)
Applying this swap on the above resource order should result in the following one :
machine 0 : (0,1) (1,2) (2,2)
machine 1 : (2,1) (0,2) (1,1)
machine 2 : ...
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangenerateFrom(ResourceOrder original) Creates a new ResourceOrder order that is the result of performing the swap in the original ResourceOrder.inthashCode()
-
Field Details
-
t1
First task to be swapped. Invariant: this is always the task with the smallest job of the two -
t2
Second task to be swapped
-
-
Constructor Details
-
Swap
Creates a new swap of two tasks.
-
-
Method Details