Class SimpleLoadCapacity

java.lang.Object
com.dna.jopt.member.unit.pnd.capacity.AbstractLoadCapacity
com.dna.jopt.member.unit.pnd.capacity.simple.SimpleLoadCapacity
All Implemented Interfaces:
ILoadCapacity, IPNDItem

public class SimpleLoadCapacity extends AbstractLoadCapacity
  • Field Details

  • Constructor Details

    • SimpleLoadCapacity

      public SimpleLoadCapacity(String loadCapacityId, int maxCapacityValue, int currentLoad)
  • Method Details

    • merge

      public Optional<ILoadCapacity> merge(ILoadCapacity itemTwo)
      Description copied from interface: ILoadCapacity
      Merge two capacities.
      Parameters:
      itemTwo - the item two
      Returns:
      the optional
    • visit

      public VisitLoadCapacityExchangeHelper visit(ILoad load, IResourceDepot orgResourceDepot, double totalMatchedLeftCapacity, ILogicEntityRoute route, long resourceArrivalTime)
      Description copied from interface: ILoadCapacity
      The capacity is "visiting" a load.
      Parameters:
      load - the load to be visited
      orgResourceDepot - the original resource depot before the visit
      totalMatchedLeftCapacity - the total matched left capacity of the depot beofre visit
      route - the route with the resource that is holding the resource depot
      resourceArrivalTime - the arrivalTime at the load
      Returns:
      the visit load capacity exchange helper
    • 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