Class SupplyFlexLoad

All Implemented Interfaces:
IPNDItem, ILoad

public class SupplyFlexLoad extends MixedFlexLoad
  • Field Details

  • Constructor Details

    • SupplyFlexLoad

      public SupplyFlexLoad(String loadId, int initialLoadValue, boolean initialIsRequest, boolean isFuzzyVisit)
    • SupplyFlexLoad

      public SupplyFlexLoad(String loadId, int initialLoadValue, boolean isFuzzyVisit)
    • SupplyFlexLoad

      public SupplyFlexLoad(String loadId, int intialLoadValue)
    • SupplyFlexLoad

      public SupplyFlexLoad(String loadId)
  • Method Details

    • merge

      public Optional<ILoad> merge(ILoad itemTwo)
      Description copied from interface: ILoad
      Merge two loads.
      Specified by:
      merge in interface ILoad
      Overrides:
      merge in class MixedFlexLoad
      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.
      Specified by:
      visited in interface ILoad
      Overrides:
      visited in class MixedFlexLoad
      Parameters:
      cap - the cap
      acceptedLoadValue - the accepted load value
      resourceArrivalTime - the resource arrival time
      Returns:
      the i load
    • 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
      Overrides:
      isRequest in class AbstractLoad
      Returns:
      true, if is request
    • typeName

      @Default public String typeName()
      Description copied from interface: IPNDItem
      Gets the type name.
      Specified by:
      typeName in interface IPNDItem
      Overrides:
      typeName in class MixedFlexLoad
      Returns:
      the type name
    • copy

      public ILoad copy()
      Description copied from interface: ILoad
      Copies the load into a new Object.
      Specified by:
      copy in interface ILoad
      Overrides:
      copy in class MixedFlexLoad
      Returns:
      the copied ILoad