|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.mit.ll.group43.surfaceoptimization.dp.factory.cost.CostStrategy
edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.SpotCostStrategy
edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.OneGapSpotCostStrategy
edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.OneGapForceSpotCostStrategy
edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.AllGapsForceSpotCostStrategy
public class AllGapsForceSpotCostStrategy
Solves for the shortest path through the CPS network by implementing the All Gaps Force heuristic. This algorithm considers all gaps in the projected takeoff sequence that the aircraft currently being scheduled could possibly fit into, with respect to its spot ready time and unimpeded taxi time. These gaps may be "forced" to fit the current aircraft in them, which involves rescheduling the last aircraft of the gap so that no runway delay is incurred. The spot release time for the current aircraft that minimizes the additional delay by forcing a gap or scheduling it to take off last is solved for.
Constructor Summary | |
---|---|
AllGapsForceSpotCostStrategy(int cps,
MinimumSeparationCalculator<? extends WeightClass> calc)
|
Method Summary | |
---|---|
int |
adjustTakeOffs(java.util.ArrayList<Aircraft> takeOffSequence,
int startIndex,
int endIndex)
Modifies the given takeoff sequence to not have any conflicts at the runway, and returns the delay caused by this. |
void |
clearBestFields()
Initializes the fields that hold values associated with the current aircraft being placed. |
void |
clearCurrFields()
Initializes the fields that hold values associated with the current predecessor node. |
void |
compareNormalApproach(java.util.ArrayList<Aircraft> normalSequence,
int normalDelay,
int normalRelease)
Determines if the given "normal" sequence, which schedules the current aircraft to take off last, is better than any of the sequences that force gaps. |
void |
computeValues(Aircraft a,
Aircraft b,
Aircraft current,
java.util.ArrayList<Aircraft> takeOffSequence)
Considers what would happen if the current aircraft were scheduled to take off between aircraft a and b. |
int |
earliestGap(java.util.ArrayList<Aircraft> releaseSequence,
Aircraft current,
int limit)
Returns the index of the earliest aircraft it should look at "forcing" (i.e. |
int |
getEdgeWeight(NetworkEdge edge)
Returns the additional delay associated with scheduling the current aircraft according to the All Gaps Force heuristic algorithm for the given edge in the network. |
int |
normalSafePrevTimeBound(java.util.ArrayList<Aircraft> releases,
Aircraft current)
Calculates the "predecessor bound" that should be used when scheduling the current aircraft to take off last in the current projected takeoff sequence. |
void |
scheduleCurrentAircraft(SmartCPSNetworkNode node,
Aircraft current)
Solves for the best schedule where the current aircraft's optimal spot release time is the most recently calculated, when following the previous node currently being considered. |
void |
setBestReleaseSequences(SmartCPSNetworkNode node)
Sets the best release sequence of the given node. |
void |
setOptimalValues(NetworkEdge edge,
int distance)
Sets the optimal values for the current node and its last aircraft, and saves the spot release sequence that corresponds to those values to the node. |
java.util.ArrayList<Aircraft> |
sortedReleases(java.util.ArrayList<Aircraft> sequence)
Returns an ArrayList of cloned aircraft from the given sequence, sorted in order of their optimal spot release time. |
void |
updateBestValues()
Checks the best values found for the current previous node being looked at against the best values found among all previous nodes for the current node whose last aircraft is being scheduled. |
void |
updateCurrValues(java.util.ArrayList<Aircraft> sequence,
int totalDelay,
int release)
Updates the best sequence found so far for this node and its associated values if the given sequence is valid and incurs less delay than the one currently saved, or if there is no currently saved best sequence for this node. |
void |
updateScheduleForSequence(java.util.ArrayList<Aircraft> releases,
Aircraft current)
Solves for the best schedule where the current aircraft's optimal spot release time is the most recently calculated, when following the previous node currently being considered, when basing this optimal schedule on the one given. |
Methods inherited from class edu.mit.ll.group43.surfaceoptimization.dp.factory.cost.OneGapForceSpotCostStrategy |
---|
initializeFirstStage, safePrevTimeBound, 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 |
---|
public AllGapsForceSpotCostStrategy(int cps, MinimumSeparationCalculator<? extends WeightClass> calc)
Method Detail |
---|
public void setOptimalValues(NetworkEdge edge, int distance)
setOptimalValues
in class OneGapForceSpotCostStrategy
edge
- distance
- public void setBestReleaseSequences(SmartCPSNetworkNode node)
node
- public void clearBestFields()
public void clearCurrFields()
public java.util.ArrayList<Aircraft> sortedReleases(java.util.ArrayList<Aircraft> sequence)
sequence
-
public int adjustTakeOffs(java.util.ArrayList<Aircraft> takeOffSequence, int startIndex, int endIndex)
takeOffSequence
- startIndex
- endIndex
-
public void computeValues(Aircraft a, Aircraft b, Aircraft current, java.util.ArrayList<Aircraft> takeOffSequence)
a
- b
- current
- takeOffSequence
- public void updateCurrValues(java.util.ArrayList<Aircraft> sequence, int totalDelay, int release)
sequence
- totalDelay
- release
- public int earliestGap(java.util.ArrayList<Aircraft> releaseSequence, Aircraft current, int limit)
releaseSequence
- current
- limit
-
public void compareNormalApproach(java.util.ArrayList<Aircraft> normalSequence, int normalDelay, int normalRelease)
normalSequence
- normalDelay
- normalRelease
- public void scheduleCurrentAircraft(SmartCPSNetworkNode node, Aircraft current)
node
- current
- public int normalSafePrevTimeBound(java.util.ArrayList<Aircraft> releases, Aircraft current)
releases
- current
-
public void updateScheduleForSequence(java.util.ArrayList<Aircraft> releases, Aircraft current)
releases
- current
- public void updateBestValues()
public int getEdgeWeight(NetworkEdge edge)
getEdgeWeight
in class OneGapForceSpotCostStrategy
edge
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |