Class AbstractLoad

java.lang.Object
com.dna.jopt.member.unit.pnd.load.AbstractLoad
All Implemented Interfaces:
IPNDItem, ILoad
Direct Known Subclasses:
MixedFlexLoad, SimpleLoad, TimedLoad, UnloadAllLoad

public abstract class AbstractLoad extends Object implements ILoad
  • Constructor Details

    • AbstractLoad

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

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

    • setSearchIndex

      public void setSearchIndex(int searchIndex)
      Description copied from interface: IPNDItem
      Sets the search index.
      Specified by:
      setSearchIndex in interface IPNDItem
      Parameters:
      searchIndex - the new search index
    • getSearchIndex

      public int getSearchIndex()
      Description copied from interface: IPNDItem
      Gets the search index.
      Specified by:
      getSearchIndex in interface IPNDItem
      Returns:
      the search index
    • setLoad

      public void setLoad(double loadValue, boolean isRequest)
      Description copied from interface: ILoad
      Sets the load and the request status of the load.
      Specified by:
      setLoad in interface ILoad
      Parameters:
      loadValue - the load value
      isRequest - the is request
    • isFlexible

      public boolean isFlexible()
      Description copied from interface: ILoad
      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.
      Specified by:
      isFlexible in interface ILoad
      Returns:
      true, if is flexible
      See Also:
    • 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
      Returns:
      true, if is timed
    • isFuzzyVisit

      public boolean isFuzzyVisit()
      Description copied from interface: ILoad
      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.
      Specified by:
      isFuzzyVisit in interface ILoad
      Returns:
      true, if is fuzzy visit
    • getId

      public String getId()
      Description copied from interface: IPNDItem
      Gets the id of the PNDItem
      Specified by:
      getId in interface IPNDItem
      Returns:
      the id
    • getPriority

      public int getPriority()
      Description copied from interface: ILoad
      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.
      Specified by:
      getPriority in interface ILoad
      Returns:
      the priority
    • getLoadValue

      public double getLoadValue()
      Description copied from interface: ILoad
      Gets the current load value. The load value is always a positive value. ILoad.isRequest() defines if a load is a supply or a request.
      Specified by:
      getLoadValue in interface ILoad
      Returns:
      the load value
    • isRequest

      public boolean isRequest()
      Description copied from interface: ILoad
      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.
      Specified by:
      isRequest in interface ILoad
      Returns:
      true, if is request