edu.mit.ll.group43.surfaceoptimization.dp.factory.cost
Class LenientAllGapsForceSpotCostStrategy

java.lang.Object
  extended by edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.CostStrategy
      extended by edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.SpotCostStrategy
          extended by edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.OneGapSpotCostStrategy
              extended by edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.OneGapForceSpotCostStrategy
                  extended by edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.AllGapsForceSpotCostStrategy
                      extended by edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.LenientAllGapsForceSpotCostStrategy

public class LenientAllGapsForceSpotCostStrategy
extends AllGapsForceSpotCostStrategy

Cost strategy for the Lenient All Gaps Force algorithm. This algorithm operates in the same way as All Gaps Force, but as it solves the network, it has each node save two sequences that are invalid according to CPS in addition to the one valid sequence each node saves. These invalid sequences are: - The sequence that comes closest to being valid among those that have the lowest total delays - The sequence with the lowest total delay among those that are the closest to being valid sequences Better results may be obtained by considering intermediate sequences that are invalid that could be corrected due to forcing rather than only considering sequences that are valid throughout the optimization.

Author:
William Hawkins

Constructor Summary
LenientAllGapsForceSpotCostStrategy(int cps, MinimumSeparationCalculator<? extends WeightClass> calc)
           
 
Method Summary
 void clearBestFields()
          Resets the fields that keep track of the best sequences and their associated values that include the current aircraft being scheduled.
 void clearCurrFields()
          Resets the fields that keep track of the best sequences and their associated values that include the current aircraft being scheduled, given the previous node currently under consideration.
 void compareNormalApproach(java.util.ArrayList<Aircraft> normalSequence, int normalDelay, int normalRelease)
          Compares scheduling the current aircraft to take off last to the sequences that involve forcing.
 int safePrevTimeBound(CPSNetworkNode optPrevNode, Aircraft current)
          Returns zero as the "predecessor bound" since setting it the same way that other forcing algorithms set it would limit the invalid sequences that it considers.
 void scheduleCurrentAircraft(SmartCPSNetworkNode node, Aircraft current)
          Schedules the current aircraft and determines the best sequences that include it according to the best sequences saved in the previous node currently being considered.
 void setBestReleaseSequences(SmartCPSNetworkNode node)
          Sets the best valid and invalid sequences for the node of the aircraft currently being scheduled.
 void updateBestValues()
          Updates the best recorded values for the aircraft currently being scheduled based on the best values recorded for the previous node currently under consideration.
 void updateCurrValues(java.util.ArrayList<Aircraft> sequence, int totalDelay, int release)
          Tests the given sequence and its associated values against the best recorded values for the previous node currently under consideration.
 
Methods inherited from class edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.AllGapsForceSpotCostStrategy
adjustTakeOffs, computeValues, earliestGap, getEdgeWeight, normalSafePrevTimeBound, setOptimalValues, sortedReleases, updateScheduleForSequence
 
Methods inherited from class edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.OneGapForceSpotCostStrategy
initializeFirstStage, safePrevTimeBound, sortedAlphasSoFar, sortedAlphasSoFar
 
Methods inherited from class edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.OneGapSpotCostStrategy
canFitBefore, earliestRelease, earliestReleaseAfter, earliestReleaseAfter, earliestReleaseBetween, earliestReleaseBetween
 
Methods inherited from class edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.SpotCostStrategy
earliestRelease, earliestRelease
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LenientAllGapsForceSpotCostStrategy

public LenientAllGapsForceSpotCostStrategy(int cps,
                                           MinimumSeparationCalculator<? extends WeightClass> calc)
Method Detail

clearBestFields

public void clearBestFields()
Resets the fields that keep track of the best sequences and their associated values that include the current aircraft being scheduled.

Overrides:
clearBestFields in class AllGapsForceSpotCostStrategy

clearCurrFields

public void clearCurrFields()
Resets the fields that keep track of the best sequences and their associated values that include the current aircraft being scheduled, given the previous node currently under consideration.

Overrides:
clearCurrFields in class AllGapsForceSpotCostStrategy

setBestReleaseSequences

public void setBestReleaseSequences(SmartCPSNetworkNode node)
Sets the best valid and invalid sequences for the node of the aircraft currently being scheduled.

Overrides:
setBestReleaseSequences in class AllGapsForceSpotCostStrategy
Parameters:
node -

safePrevTimeBound

public int safePrevTimeBound(CPSNetworkNode optPrevNode,
                             Aircraft current)
Returns zero as the "predecessor bound" since setting it the same way that other forcing algorithms set it would limit the invalid sequences that it considers.

Overrides:
safePrevTimeBound in class OneGapForceSpotCostStrategy
Parameters:
optPrevNode -
current -
Returns:

scheduleCurrentAircraft

public void scheduleCurrentAircraft(SmartCPSNetworkNode node,
                                    Aircraft current)
Schedules the current aircraft and determines the best sequences that include it according to the best sequences saved in the previous node currently being considered.

Overrides:
scheduleCurrentAircraft in class AllGapsForceSpotCostStrategy
Parameters:
node -
current -

updateBestValues

public void updateBestValues()
Updates the best recorded values for the aircraft currently being scheduled based on the best values recorded for the previous node currently under consideration.

Overrides:
updateBestValues in class AllGapsForceSpotCostStrategy

updateCurrValues

public void updateCurrValues(java.util.ArrayList<Aircraft> sequence,
                             int totalDelay,
                             int release)
Tests the given sequence and its associated values against the best recorded values for the previous node currently under consideration.

Overrides:
updateCurrValues in class AllGapsForceSpotCostStrategy
Parameters:
sequence -
totalDelay -
release -

compareNormalApproach

public void compareNormalApproach(java.util.ArrayList<Aircraft> normalSequence,
                                  int normalDelay,
                                  int normalRelease)
Compares scheduling the current aircraft to take off last to the sequences that involve forcing.

Overrides:
compareNormalApproach in class AllGapsForceSpotCostStrategy
Parameters:
normalSequence -
normalDelay -
normalRelease -