Class DegradingLoadCapacity

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

public class DegradingLoadCapacity extends AbstractLoadCapacity
  • Field Details

  • Constructor Details

    • DegradingLoadCapacity

      public DegradingLoadCapacity(String loadCapacityId, int maxCapacityValue, int currentLoad, int capDegradationPerStop, int minimalTotaDegradatedCapacity)
  • 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
    • getCapacityDegradationPerStop

      public double getCapacityDegradationPerStop()
    • getMinimalTotaDegradatedCapacity

      public double getMinimalTotaDegradatedCapacity()
    • 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
    • toString

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

      @Default public String typeName()
      Description copied from interface: IPNDItem
      Gets the type name.
      Returns:
      the type name