Interface ILoad

All Superinterfaces:
IPNDItem
All Known Subinterfaces:
ITimedLoad
All Known Implementing Classes:
AbstractLoad, MixedFlexLoad, RequestFlexLoad, SimpleLoad, SupplyFlexLoad, TimedLoad, TimedSupplyFlexLoad, UnloadAllLoad

public interface ILoad extends IPNDItem
The Interface ILoad. An ILoad need to be part of an INodeDepot.
Since:
Jul 30, 2020
Version:
Jul 30, 2020
Author:
jrich
See Also:
  • Method Details

    • merge

      Optional<ILoad> merge(ILoad itemTwo)
      Merge two loads.
      Parameters:
      itemTwo - the item two
      Returns:
      the optional
    • isRequest

      boolean isRequest()
      Checks if is request. A request means the load wants to get goods from a ILoadCapacity. If request is false, the load automatically supplies goods to a capacity.
      Returns:
      true, if is request
    • visited

      ILoad visited(ILoadCapacity cap, double acceptedLoadValue, long resourceArrivalTime)
      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
    • getLoadValue

      double getLoadValue()
      Gets the current load value. The load value is always a positive value. isRequest() defines if a load is a supply or a request.
      Returns:
      the load value
    • getAdjustedLoadValue

      double getAdjustedLoadValue(ILoadCapacity simpleLoadCapacity)
      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
    • isFuzzyVisit

      boolean isFuzzyVisit()
      Checks if is fuzzy visit. A fuzzy visit means, the load accepts only partial load exchange. If the load is a request, the capacity is allowed to drop a value of goods that is smaller as the desired value of the load. If the load is a supply, the capacity is allowed to pick up less of the goods the load wants to supply.
      Returns:
      true, if is fuzzy visit
    • getPriority

      int getPriority()
      Gets the priority. For example: When visiting multiple supply loads in the same NodeDepot, it can happen that after the first load is evaluated, the ResourceDepot is not accepting anymore loads to avoid overloading. The lower priority loads therefore are more likely getting violated.
      Returns:
      the priority
    • isFlexible

      boolean isFlexible()
      Checks if is flexible. A flexible load, can adjust itself based on Optimization. Depending on the other customer nodes, flexible loads are able to compensate for potential over- or underloading of a ResourceDepot.
      Returns:
      true, if is flexible
      See Also:
    • isTimed

      boolean isTimed()
      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.
      Returns:
      true, if is timed
    • copy

      ILoad copy()
      Copies the load into a new Object.
      Returns:
      the copied ILoad
    • setLoad

      void setLoad(double loadValue, boolean isRequest)
      Sets the load and the request status of the load.
      Parameters:
      loadValue - the load value
      isRequest - the is request