|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsamples.tutorials.lns.lns.RandomTaskNeighborhoodOperator
public class RandomTaskNeighborhoodOperator
A neighborhood operator which fix/unfix task variables randomly
Field Summary | |
---|---|
protected int |
maxSize
|
protected int |
minSize
|
protected Random |
random
|
protected gnu.trove.TIntHashSet |
selected
|
Constructor Summary | |
---|---|
RandomTaskNeighborhoodOperator(int nbRelaxedTasks)
Constructs with a fixed seed. |
|
RandomTaskNeighborhoodOperator(int minNbRelaxedTasks,
int maxNbRelaxedTasks,
long seed)
Constructs with a specified seed and a variable neighborhood size. |
|
RandomTaskNeighborhoodOperator(int nbRelaxedTasks,
long seed)
Constructs with a specified seed. |
Method Summary | |
---|---|
boolean |
restrictNeighborhood(Solution solution)
restrict the search space around the solution by selecting nbRelaxedTasks task variables randomly to let free and by fixing all other task variables to their value in solution |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Random random
protected int minSize
protected int maxSize
protected gnu.trove.TIntHashSet selected
Constructor Detail |
---|
public RandomTaskNeighborhoodOperator(int nbRelaxedTasks)
nbRelaxedTasks
- number of task variables to let freepublic RandomTaskNeighborhoodOperator(int nbRelaxedTasks, long seed)
nbRelaxedTasks
- number of task variables to let freeseed
- random seedpublic RandomTaskNeighborhoodOperator(int minNbRelaxedTasks, int maxNbRelaxedTasks, long seed)
minNbRelaxedTasks
- minimum number of task variables to let freemaxNbRelaxedTasks
- maximum number of task variables to let freeseed
- random seedMethod Detail |
---|
public boolean restrictNeighborhood(Solution solution)
restrictNeighborhood
in interface NeighborhoodOperator
solution
- the solution to build the neighborhood around
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |