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

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
Direct Known Subclasses:
AllGapsSpotCostStrategy, OneGapForceSpotCostStrategy

public class OneGapSpotCostStrategy
extends SpotCostStrategy

The spot cost strategy for the One Gap algorithm, which compares scheduling the current aircraft to take off between the last two projected takeoffs, if it can fit, against scheduling it to take off last.

Author:
William Hawkins

Constructor Summary
OneGapSpotCostStrategy(int cps, MinimumSeparationCalculator<? extends WeightClass> calc)
           
 
Method Summary
 boolean canFitBefore(int earlyReleaseBound, Aircraft lastReleased, Aircraft lastTakeOff)
          Determines if lastReleased can take off before lastTakeOff, given that it can leave the spot no earlier than earlyReleaseBound, without increasing the spot delay of lastTakeOff or incurring any delay at the runway.
 int earliestRelease(NetworkEdge edge)
          Determines the earliest time at which the last aircraft of the target node of the given network edge can be released from the spot.
 int earliestReleaseAfter(CPSNetworkNode optPrevNode, Aircraft leader, Aircraft follower)
          Determines the earliest time at which follower can be released so that it takes off after leader without incurring any runway delay, with respect to the predecessor bound according to the given previous node.
 int earliestReleaseAfter(int predBound, Aircraft leader, Aircraft follower)
          Determines the earliest time at which follower can be released so that it takes off after leader without incurring any runway delay, with respect to the given predecessor bound.
 int earliestReleaseBetween(CPSNetworkNode optPrevNode, Aircraft a, Aircraft b, Aircraft lastReleased)
          Determines the earliest time at which lastReleased can be released from the spot to take off between aircraft a and b without increasing the spot delay of b or incurring any delay at the runway.
 int earliestReleaseBetween(int predBound, Aircraft a, Aircraft b, Aircraft lastReleased)
          Determines the earliest time at which lastReleased can be released from the spot to take off between aircraft a and b without increasing the spot delay of b or incurring any delay at the runway.
 java.util.ArrayList<Aircraft> sortedAlphasSoFar(NetworkEdge edge)
          Returns a list of aircraft sorted in order of when they are predicted to take off, based on their optimal spot release times.
 
Methods inherited from class edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.SpotCostStrategy
earliestRelease, earliestRelease, getEdgeWeight, initializeFirstStage, setOptimalValues
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneGapSpotCostStrategy

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

sortedAlphasSoFar

public java.util.ArrayList<Aircraft> sortedAlphasSoFar(NetworkEdge edge)
Returns a list of aircraft sorted in order of when they are predicted to take off, based on their optimal spot release times.

Parameters:
edge -
Returns:

canFitBefore

public boolean canFitBefore(int earlyReleaseBound,
                            Aircraft lastReleased,
                            Aircraft lastTakeOff)
Determines if lastReleased can take off before lastTakeOff, given that it can leave the spot no earlier than earlyReleaseBound, without increasing the spot delay of lastTakeOff or incurring any delay at the runway.

Parameters:
earlyReleaseBound -
lastReleased -
lastTakeOff -
Returns:

earliestReleaseAfter

public int earliestReleaseAfter(int predBound,
                                Aircraft leader,
                                Aircraft follower)
Determines the earliest time at which follower can be released so that it takes off after leader without incurring any runway delay, with respect to the given predecessor bound.

Parameters:
predBound -
leader -
follower -
Returns:

earliestReleaseAfter

public int earliestReleaseAfter(CPSNetworkNode optPrevNode,
                                Aircraft leader,
                                Aircraft follower)
Determines the earliest time at which follower can be released so that it takes off after leader without incurring any runway delay, with respect to the predecessor bound according to the given previous node.

Parameters:
optPrevNode -
leader -
follower -
Returns:

earliestReleaseBetween

public int earliestReleaseBetween(CPSNetworkNode optPrevNode,
                                  Aircraft a,
                                  Aircraft b,
                                  Aircraft lastReleased)
Determines the earliest time at which lastReleased can be released from the spot to take off between aircraft a and b without increasing the spot delay of b or incurring any delay at the runway. Returns -1 if lastReleased cannot be fit between a and b while following these constraints.

Parameters:
optPrevNode - Optimal previous node in the network for lastReleased.
a -
b -
lastReleased -
Returns:

earliestReleaseBetween

public int earliestReleaseBetween(int predBound,
                                  Aircraft a,
                                  Aircraft b,
                                  Aircraft lastReleased)
Determines the earliest time at which lastReleased can be released from the spot to take off between aircraft a and b without increasing the spot delay of b or incurring any delay at the runway. Returns -1 if lastReleased cannot be fit between a and b while following these constraints.

Parameters:
predBound -
a -
b -
lastReleased -
Returns:

earliestRelease

public int earliestRelease(NetworkEdge edge)
Determines the earliest time at which the last aircraft of the target node of the given network edge can be released from the spot. Considers the gap between the last two takeoffs in the current projected takeoff sequence and tries to fit the current aircraft into it. Failing that, it sends it as early as it can to minimize how long it takes off after the last projected takeoff time, while respecting the optimal spot release time of this aircraft's direct predecessor in the CPS spot release sequence.

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