Class CoupledRequestFlexLoad

All Implemented Interfaces:
IPNDItem, ILoad

public class CoupledRequestFlexLoad extends RequestFlexLoad
  • Field Details

  • Constructor Details

    • CoupledRequestFlexLoad

      public CoupledRequestFlexLoad(String loadId, int initialLoadValue, boolean initialIsRequest, boolean isFuzzyVisit, int coupledLoadValue, Map<String,List<String>> couplingMap)
    • CoupledRequestFlexLoad

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

      public CoupledRequestFlexLoad(String loadId, int intialLoadValue)
  • Method Details

    • setCoupledDepotMap

      public void setCoupledDepotMap(Map<String,List<String>> couplingMap)
    • getRandomKey

      public String getRandomKey(RandomGenerator rng)
    • getCoupledDepot

      public List<String> getCoupledDepot(String nodeId)
    • hasCoupledLoad

      public boolean hasCoupledLoad()
    • addCoupledDepot

      public void addCoupledDepot(String nodeId, String coupledDepotId)
    • getCoupledLoadValue

      public int getCoupledLoadValue()
    • setCoupledLoadValue

      public void setCoupledLoadValue(int coupledLoadValue)
    • 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 RequestFlexLoad
      Returns:
      the copied ILoad
    • 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 RequestFlexLoad
      Parameters:
      cap - the cap
      acceptedLoadValue - the accepted load value
      resourceArrivalTime - the resource arrival time
      Returns:
      the i load
    • 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 RequestFlexLoad
      Parameters:
      itemTwo - the item two
      Returns:
      the optional
    • typeName

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