public class MixedFlexLoad extends AbstractLoad implements ILoad
A restock node is like a supply node that can supply as much as necessary to completely fill up a truck.
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_NAME
The Constant TYPE_NAME.
|
Constructor and Description |
---|
MixedFlexLoad(String loadId)
Instantiates a new MixedFlexLoad.
|
MixedFlexLoad(String loadId,
int initialLoadValue,
boolean isInitialRequest)
Instantiates a new MixedFlexLoad.
|
MixedFlexLoad(String loadId,
int initialLoadValue,
boolean initialIsRequest,
boolean isFuzzyVisit) |
Modifier and Type | Method and Description |
---|---|
ILoad |
copy()
Copies the load into a new Object.
|
double |
getAdjustedLoadValue(ILoadCapacity simpleLoadCapacity)
Gets the adjusted load value.
|
boolean |
isFlexible()
Checks if is flexible.
|
Optional<ILoad> |
merge(ILoad itemTwo)
Merge two loads.
|
String |
toString() |
String |
typeName()
Gets the type name.
|
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. |
getId, getLoadValue, getPriority, getSearchIndex, isFuzzyVisit, isRequest, isTimed, setLoad, setSearchIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLoadValue, getPriority, isFuzzyVisit, isRequest, isTimed, setLoad
getId, getSearchIndex, setSearchIndex
public static final String TYPE_NAME
public MixedFlexLoad(String loadId)
loadId
- the load idpublic MixedFlexLoad(String loadId, int initialLoadValue, boolean isInitialRequest)
loadId
- the load idinitialLoadValue
- the initial load valueisInitialRequest
- the is initial requestpublic MixedFlexLoad(String loadId, int initialLoadValue, boolean initialIsRequest, boolean isFuzzyVisit)
public Optional<ILoad> merge(ILoad itemTwo)
ILoad
public ILoad visited(ILoadCapacity cap, double acceptedLoadValue, long resourceArrivalTime)
ILoad
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.public double getAdjustedLoadValue(ILoadCapacity simpleLoadCapacity)
ILoad
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.getAdjustedLoadValue
in interface ILoad
simpleLoadCapacity
- the simple load capacity@Value.Default public String typeName()
IPNDItem
public boolean isFlexible()
ILoad
isFlexible
in interface ILoad
isFlexible
in class AbstractLoad
MixedFlexLoad
,
SupplyFlexLoad
,
RequestFlexLoad
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.