Class SimpleLoad

java.lang.Object
com.dna.jopt.member.unit.pnd.load.AbstractLoad
com.dna.jopt.member.unit.pnd.load.simple.SimpleLoad
All Implemented Interfaces:
IPNDItem, ILoad

public class SimpleLoad extends AbstractLoad
  • Field Details

  • Constructor Details

    • SimpleLoad

      public SimpleLoad(String loadId, int loadValue, int priority, boolean isRequest, boolean isFuzzyVisit)
    • SimpleLoad

      public SimpleLoad(String loadId, int loadValue, boolean isRequest, boolean isFuzzyVisit)
  • Method Details

    • merge

      public Optional<ILoad> merge(ILoad itemTwo)
      Description copied from interface: ILoad
      Merge two loads.
      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.
      Parameters:
      cap - the cap
      acceptedLoadValue - the accepted load value
      resourceArrivalTime - the resource arrival time
      Returns:
      the i load
    • 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.
      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.
      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.
      Returns:
      the copied ILoad