gov.nasa.javaGenes.EOSscheduling
Class SqueakyWheelTournamentSwapMutation
java.lang.Object
gov.nasa.javaGenes.core.ChildMaker
gov.nasa.javaGenes.permutation.PermutationChildMaker
gov.nasa.javaGenes.permutation.PermutationOrderMutation
gov.nasa.javaGenes.EOSscheduling.SqueakyWheelTournamentSwapMutation
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable
- Direct Known Subclasses:
- SqueakyWheelPlacedTSM
- public class SqueakyWheelTournamentSwapMutation
- extends PermutationOrderMutation
- See Also:
- Serialized Form
Methods inherited from class gov.nasa.javaGenes.core.ChildMaker |
checkLastResults, checkResults, clearLast, getAndClearLastTabSeparatedResults, getFitnessFunctionNames, getLastTabSeparatedResults, headerFragment, makeChildren, mutate, neverUsed, proportionDown, results, setFitnessFunction, setFitnessFunctionNames, tabSeparatedResults |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
indices
protected int[] indices
legalRange
protected IntegerInterval legalRange
moveForwardIndex
protected int moveForwardIndex
moveBackIndex
protected int moveBackIndex
model
protected EOSModel model
indexDifferenceSum
protected int indexDifferenceSum
backSmallerThanForward
protected int backSmallerThanForward
backLargerThanForward
protected int backLargerThanForward
backSameAsForward
protected int backSameAsForward
SqueakyWheelTournamentSwapMutation
public SqueakyWheelTournamentSwapMutation(EOSModel inModel,
int inNumberOfSwaps,
int tournamentSize)
- Do numberOfSwaps swaps. For each swap
Take n random takeImages. n should generally be fairly large. Swap two of them. They are chosen thusly:
1. The one that most needs to move forward in the permutation, by these criteria (in order)
- unscheduled rather than scheduled
- higher priority
- further back in the permutation
2. The one that can be moved backward in the permutation with maximum effect, by these criteria (in order)
- scheduled rather than unscheduled
- lower priority
- further forward in the permutation
getFirstIndex
protected int getFirstIndex(PermutationEvolvable kid)
- Overrides:
getFirstIndex
in class PermutationOrderMutation
getSecondIndex
protected int getSecondIndex(PermutationEvolvable kid,
int firstIndex)
- Overrides:
getSecondIndex
in class PermutationOrderMutation
calculateOutputMeasures
protected void calculateOutputMeasures(EOSschedulingEvolvable kid)
setUpIndices
protected void setUpIndices(EOSschedulingEvolvable kid)
setUpIndicesFromArray
protected void setUpIndicesFromArray(EOSschedulingEvolvable kid)
- testing purposes only, has no randomization here!
moreDeservingToMoveForward
protected boolean moreDeservingToMoveForward(EOSschedulingEvolvable kid,
int index)
moreDeservingToMoveBack
protected boolean moreDeservingToMoveBack(EOSschedulingEvolvable kid,
int index)
shouldSecondGoForward
protected boolean shouldSecondGoForward(EOSschedulingEvolvable kid,
int firstIndex,
int secondIndex)
subClassMeasures
public java.lang.String subClassMeasures()
- Overrides:
subClassMeasures
in class ChildMaker
toString
public java.lang.String toString()
- Overrides:
toString
in class PermutationOrderMutation