Class ALPProblem
The ALP consists in scheduling the landing of a fleet of aircraft on one or multiple runways. Each aircraft has a target landing time and a deadline. The objective is to minimize the total deviation from target times (tardiness) while respecting deadlines and runway separation constraints.
Landing times are constrained by:
- The previous aircraft landed on the same runway;
- The minimum separation time between aircraft classes;
- The aircraft’s target and deadline times.
This class implements the Problem interface for states of type ALPState.
It defines the state space, the feasible domain of decisions, the transition function, and the cost function.
Fields:
nbClasses: Number of aircraft classes.nbAircraft: Total number of aircraft.nbRunways: Number of runways available.aircraftClass: Array mapping each aircraft to its class.aircraftTarget: Target landing time of each aircraft.aircraftDeadline: Deadline for each aircraft.classTransitionCost: Minimum separation times between classes.optimal: Optional optimal value if known.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int[]Mapping of each aircraft to its class.final int[]Deadline for each aircraft.final int[]Target landing time for each aircraft.final int[][]Minimum separation times between aircraft classes.static final intUsed to know which aircraft of each class will be next to land.final intTotal number of aircraft.final intNumber of aircraft classes.final intNumber of available runways.Known optimal value, if available. -
Constructor Summary
ConstructorsConstructorDescriptionALPProblem(int nbClasses, int nbAircraft, int nbRunways, int[] aircraftClass, int[] aircraftTarget, int[] aircraftDeadline, int[][] classTransitionCost) Constructs an ALP problem without specifying an optimal value.ALPProblem(int nbClasses, int nbAircraft, int nbRunways, int[] aircraftClass, int[] aircraftTarget, int[] aircraftDeadline, int[][] classTransitionCost, Optional<Double> optimal) Constructs an ALP problem with the specified parameters.ALPProblem(String fname) Constructs an ALP problem by reading from a file. -
Method Summary
Modifier and TypeMethodDescriptionReturns the domain of possible values for a given variable when applied to a specific state.doubleevaluate(int[] solution) Given a solution such thatsolution[i]is the value of the variablex_i, returns the value of this solution and checks if the solution respects the problem's constraints.fromDecision(int value) Restores anALPDecisionfrom its integer representation.intgetArrivalTime(RunwayState[] runwayStates, int aircraft, int runway) Computes the arrival time of an aircraft on a given runway.Returns the initial state of the problem.doubleReturns the initial objective value associated with the initial state.intnbVars()Returns the known optimal value of the problem, if available.inttoDecision(ALPDecision decision) Converts anALPDecisionto its integer representation.toString()transition(ALPState state, Decision decision) Applies a decision to a state, computing the next state according to the problem's transition function.doubletransitionCost(ALPState state, Decision decision) Computes the change in objective value resulting from applying a decision to a given state.
-
Field Details
-
DUMMY
public static final int DUMMY- See Also:
-
nbClasses
public final int nbClassesNumber of aircraft classes. -
nbAircraft
public final int nbAircraftTotal number of aircraft. -
nbRunways
public final int nbRunwaysNumber of available runways. -
aircraftClass
public final int[] aircraftClassMapping of each aircraft to its class. -
aircraftTarget
public final int[] aircraftTargetTarget landing time for each aircraft. -
aircraftDeadline
public final int[] aircraftDeadlineDeadline for each aircraft. -
classTransitionCost
public final int[][] classTransitionCostMinimum separation times between aircraft classes. -
optimal
Known optimal value, if available. -
latestToEarliestAircraftByClass
Used to know which aircraft of each class will be next to land.
-
-
Constructor Details
-
ALPProblem
public ALPProblem(int nbClasses, int nbAircraft, int nbRunways, int[] aircraftClass, int[] aircraftTarget, int[] aircraftDeadline, int[][] classTransitionCost, Optional<Double> optimal) Constructs an ALP problem with the specified parameters.- Parameters:
nbClasses- Number of aircraft classesnbAircraft- Total number of aircraftnbRunways- Number of runwaysaircraftClass- Array mapping aircraft to classaircraftTarget- Target landing timesaircraftDeadline- Deadline timesclassTransitionCost- Minimum separation times between classesoptimal- Optional optimal value
-
ALPProblem
public ALPProblem(int nbClasses, int nbAircraft, int nbRunways, int[] aircraftClass, int[] aircraftTarget, int[] aircraftDeadline, int[][] classTransitionCost) Constructs an ALP problem without specifying an optimal value.- Parameters:
nbClasses- Number of aircraft classesnbAircraft- Total number of aircraftnbRunways- Number of runwaysaircraftClass- Array mapping aircraft to classaircraftTarget- Target landing timesaircraftDeadline- Deadline timesclassTransitionCost- Minimum separation times between classes
-
ALPProblem
Constructs an ALP problem by reading from a file.The file format is expected to provide the number of aircraft, classes, runways, optionally the known optimal value, aircraft target and deadline times, and class separation costs.
- Parameters:
fname- Path to the input file- Throws:
IOException- if the file cannot be read
-
-
Method Details
-
getArrivalTime
Computes the arrival time of an aircraft on a given runway.- Parameters:
runwayStates- The current state of each runwayaircraft- The aircraft to landrunway- The runway index- Returns:
- The computed landing time
-
toDecision
Converts anALPDecisionto its integer representation.- Parameters:
decision- The decision- Returns:
- The integer encoding of the decision
-
fromDecision
Restores anALPDecisionfrom its integer representation.- Parameters:
value- The integer encoding- Returns:
- The decoded decision
-
nbVars
public int nbVars() -
initialState
Description copied from interface:ProblemReturns the initial state of the problem.- Specified by:
initialStatein interfaceProblem<ALPState>- Returns:
- the state representing the starting point of the optimization
-
initialValue
public double initialValue()Description copied from interface:ProblemReturns the initial objective value associated with the initial state.- Specified by:
initialValuein interfaceProblem<ALPState>- Returns:
- the starting value of the objective function
-
domain
Description copied from interface:ProblemReturns the domain of possible values for a given variable when applied to a specific state. -
transition
Description copied from interface:ProblemApplies a decision to a state, computing the next state according to the problem's transition function.- Specified by:
transitionin interfaceProblem<ALPState>- Parameters:
state- the state from which the transition originatesdecision- the decision to apply- Returns:
- the resulting state after applying the decision
-
transitionCost
Description copied from interface:ProblemComputes the change in objective value resulting from applying a decision to a given state.- Specified by:
transitionCostin interfaceProblem<ALPState>- Parameters:
state- the state from which the transition originatesdecision- the decision to apply- Returns:
- the incremental objective cost/value associated with this decision
-
optimalValue
Description copied from interface:ProblemReturns the known optimal value of the problem, if available.Note: This value should correspond to the expected output of the solver. For maximization problems, be careful with negative values.
- Specified by:
optimalValuein interfaceProblem<ALPState>- Returns:
- an
Optionalcontaining the known optimal value, or empty if unknown
-
evaluate
Description copied from interface:ProblemGiven a solution such thatsolution[i]is the value of the variablex_i, returns the value of this solution and checks if the solution respects the problem's constraints.Note: For maximization problems, the returned value is minus the computed value.
- Specified by:
evaluatein interfaceProblem<ALPState>- Parameters:
solution- A solution of the problem.- Returns:
- The value of the input solution
- Throws:
InvalidSolutionException- If the solution does not respect problem's constraints.
-
toString
-