Class PDPTWState

java.lang.Object
org.ddolib.examples.layered.pdptw.PDPTWState

public class PDPTWState extends Object
State representation for the Pickup and Delivery Problem with Time Windows (PDPTW).
  • Constructor Summary

    Constructors
    Constructor
    Description
    PDPTWState(BitSet current, BitSet openToVisit, BitSet allToVisit, int minContent, int maxContent, double minCurrentTime, double maxCurrentTime)
    Builds a PDPTW state with interval-valued content/time information.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    printInterval(double min, double max)
    Formats a possibly imprecise value as either a single number, when min and max are equal, or as an interval [min;max] otherwise.
    printInterval(int min, int max)
    Formats a possibly imprecise value as either a single number, when min and max are equal, or as an interval [min;max] otherwise.
    singleton(int singletonValue)
    Builds a singleton BitSet containing only the given value.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PDPTWState

      public PDPTWState(BitSet current, BitSet openToVisit, BitSet allToVisit, int minContent, int maxContent, double minCurrentTime, double maxCurrentTime)
      Builds a PDPTW state with interval-valued content/time information.
      Parameters:
      current - current node(s)
      openToVisit - currently reachable unvisited nodes
      allToVisit - all remaining unvisited nodes
      minContent - lower bound on vehicle load
      maxContent - upper bound on vehicle load
      minCurrentTime - lower bound on current time
      maxCurrentTime - upper bound on current time
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • singleton

      public BitSet singleton(int singletonValue)
      Builds a singleton BitSet containing only the given value.
      Parameters:
      singletonValue - the value to set in the returned set
      Returns:
      a new BitSet with only singletonValue set
    • printInterval

      public String printInterval(double min, double max)
      Formats a possibly imprecise value as either a single number, when min and max are equal, or as an interval [min;max] otherwise.
      Parameters:
      min - the lower bound of the value
      max - the upper bound of the value
      Returns:
      the formatted value
    • printInterval

      public String printInterval(int min, int max)
      Formats a possibly imprecise value as either a single number, when min and max are equal, or as an interval [min;max] otherwise.
      Parameters:
      min - the lower bound of the value
      max - the upper bound of the value
      Returns:
      the formatted value
    • toString

      public String toString()
      Overrides:
      toString in class Object