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

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
Direct Known Subclasses:
AGOGFSpotCostStrategy, AllGapsForceSpotCostStrategy

public class OneGapForceSpotCostStrategy
extends OneGapSpotCostStrategy

Spot cost strategy for the One Gap Force algorithm. This algorithm considers the last gap in the projected take off sequence, and determines whether forcing this gap or scheduling the current aircraft to take off last incurs the least additional delay.

Author:
William Hawkins

Constructor Summary
OneGapForceSpotCostStrategy(int cps, MinimumSeparationCalculator<? extends WeightClass> calc)
           
 
Method Summary
 int getEdgeWeight(NetworkEdge edge)
          Returns the additional delay associated with the given edge that is given by the One Gap Force algorithm.
 void initializeFirstStage(java.util.ArrayList<java.util.TreeSet<CPSNetworkNode>> network)
          Initializes the first stage of the CPS network so that nodes in subsequent stages can be solved for.
 int safePrevTimeBound(java.util.ArrayList<Aircraft> releaseSequence, Aircraft current)
          Computes the earliest time at which current can be released, with respect to its release sequence predecessors.
 int safePrevTimeBound(CPSNetworkNode prevNode, Aircraft current)
          Computes the earliest time at which current can be released, with respect to its release sequence predecessors in the spot release sequence of the given previous node.
 void setOptimalValues(NetworkEdge edge, int distance)
          Sets the optimal values for the node being solved for as well as its last aircraft.
 java.util.ArrayList<Aircraft> sortedAlphasSoFar(java.util.ArrayList<Aircraft> sequence)
          Returns a list of aircraft cloned from the given release sequence, sorted by runway ready time.
 java.util.ArrayList<Aircraft> sortedAlphasSoFar(NetworkEdge edge)
          Returns a list of aircraft cloned from the release sequence of the source node of the given edge, sorted by runway ready time.
 
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

OneGapForceSpotCostStrategy

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

setOptimalValues

public void setOptimalValues(NetworkEdge edge,
                             int distance)
Sets the optimal values for the node being solved for as well as its last aircraft.

Overrides:
setOptimalValues in class SpotCostStrategy
Parameters:
edge -
distance -

sortedAlphasSoFar

public java.util.ArrayList<Aircraft> sortedAlphasSoFar(NetworkEdge edge)
Returns a list of aircraft cloned from the release sequence of the source node of the given edge, sorted by runway ready time.

Overrides:
sortedAlphasSoFar in class OneGapSpotCostStrategy
Parameters:
edge -
Returns:

sortedAlphasSoFar

public java.util.ArrayList<Aircraft> sortedAlphasSoFar(java.util.ArrayList<Aircraft> sequence)
Returns a list of aircraft cloned from the given release sequence, sorted by runway ready time.

Parameters:
sequence -
Returns:

safePrevTimeBound

public int safePrevTimeBound(CPSNetworkNode prevNode,
                             Aircraft current)
Computes the earliest time at which current can be released, with respect to its release sequence predecessors in the spot release sequence of the given previous node. WARNING: Should always be compared with current's spot ready time since this method will return zero if none of the aircraft already placed in the release sequence can follow current.

Parameters:
prevNode -
current -
Returns:

safePrevTimeBound

public int safePrevTimeBound(java.util.ArrayList<Aircraft> releaseSequence,
                             Aircraft current)
Computes the earliest time at which current can be released, with respect to its release sequence predecessors. WARNING: Should always be compared with current's spot ready time since this method will return zero if none of the aircraft already placed in the release sequence can follow current.

Parameters:
releaseSequence -
current -
Returns:

initializeFirstStage

public void initializeFirstStage(java.util.ArrayList<java.util.TreeSet<CPSNetworkNode>> network)
Initializes the first stage of the CPS network so that nodes in subsequent stages can be solved for.

Overrides:
initializeFirstStage in class SpotCostStrategy
Parameters:
network -

getEdgeWeight

public int getEdgeWeight(NetworkEdge edge)
Returns the additional delay associated with the given edge that is given by the One Gap Force algorithm.

Overrides:
getEdgeWeight in class SpotCostStrategy
Parameters:
edge -
Returns: