Package org.ddolib.examples.alp
Class ALPDecision
java.lang.Object
org.ddolib.examples.alp.ALPDecision
Represents a decision in the Aircraft Landing Problem (ALP).
This decision consists of assigning an aircraft of a given class to a specific runway. The actual aircraft chosen is determined by:
- The
state: the number of remaining aircraft of that class. - The
problem: an ordered list (by target arrival time) of aircraft per class. - The remaining aircraft count acts as the index into the ordered list to select the specific aircraft.
Instances of this class are immutable with respect to their aircraftClass and runway values.
Equality and hash code are defined based on these two fields.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionintThe class of the aircraft being assigned.intThe runway to which the aircraft is assigned. -
Constructor Summary
ConstructorsConstructorDescriptionALPDecision(int aircraftClass, int runway) Constructs a new decision assigning an aircraft of the given class to the given runway. -
Method Summary
-
Field Details
-
aircraftClass
public int aircraftClassThe class of the aircraft being assigned. -
runway
public int runwayThe runway to which the aircraft is assigned.
-
-
Constructor Details
-
ALPDecision
public ALPDecision(int aircraftClass, int runway) Constructs a new decision assigning an aircraft of the given class to the given runway.- Parameters:
aircraftClass- the class of the aircraftrunway- the runway number
-
-
Method Details
-
equals
Checks whether this decision is equal to another object. Two decisions are equal if they have the same aircraft class and runway. -
hashCode
public int hashCode()Computes the hash code of this decision based on the aircraft class and runway.
-