Class TimedLoad

java.lang.Object
com.dna.jopt.member.unit.pnd.load.AbstractLoad
com.dna.jopt.member.unit.pnd.load.timed.TimedLoad
All Implemented Interfaces:
IPNDItem, ILoad, ITimedLoad

public class TimedLoad extends AbstractLoad implements ITimedLoad
  • Field Details

  • Constructor Details

    • TimedLoad

      public TimedLoad(String loadId, int loadValue, int priority, long maxTransportTimeMillis, boolean isRequest, boolean isFuzzyVisit)
    • TimedLoad

      public TimedLoad(String loadId, Duration maxTime, boolean isRequest)
  • Method Details

    • merge

      public Optional<ILoad> merge(ILoad itemTwo)
      Description copied from interface: ILoad
      Merge two loads.
      Specified by:
      merge in interface ILoad
      Parameters:
      itemTwo - the item two
      Returns:
      the optional
    • visited

      public ILoad visited(ILoadCapacity cap, double acceptedLoadValue, long resourceArrivalTime)
      Description copied from interface: ILoad
      After a ILoadCapacity visited a load, the load gets the information, what load value was accepted by the capacity and when the capcity arrived at the load.
      Specified by:
      visited in interface ILoad
      Parameters:
      cap - the cap
      acceptedLoadValue - the accepted load value
      resourceArrivalTime - the resource arrival time
      Returns:
      the i load
    • isTimed

      public boolean isTimed()
      Description copied from interface: ILoad
      Checks if is timed. The goods of a timed load desirably only stays a limited time within a ResourceDepot. If the time between pickup and delivery of timed load is longer that a predefined maximal value, the Optimizer will assign penalty cost.
      Specified by:
      isTimed in interface ILoad
      Overrides:
      isTimed in class AbstractLoad
      Returns:
      true, if is timed
    • getAdjustedLoadValue

      public double getAdjustedLoadValue(ILoadCapacity simpleLoadCapacity)
      Description copied from interface: ILoad
      Gets the adjusted load value. For Loads like UnloadAllLoad the load adjust to the loadValue a capacity is holding. Meaning, to unload all goods from a capacity, the load to be visited simply requests all goods from a capacity.
      Specified by:
      getAdjustedLoadValue in interface ILoad
      Parameters:
      simpleLoadCapacity - the simple load capacity
      Returns:
      the adjusted load value
    • typeName

      @Default public String typeName()
      Description copied from interface: IPNDItem
      Gets the type name.
      Specified by:
      typeName in interface IPNDItem
      Returns:
      the type name
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • copy

      public ILoad copy()
      Description copied from interface: ILoad
      Copies the load into a new Object.
      Specified by:
      copy in interface ILoad
      Returns:
      the copied ILoad
    • getMaxTransportTimeMillis

      public long getMaxTransportTimeMillis()
      Description copied from interface: ITimedLoad
      Gets the maximal desired time for transportation in millis.
      Specified by:
      getMaxTransportTimeMillis in interface ITimedLoad
      Returns:
      the max transport time millis