Class MixedFlexLoad
java.lang.Object
com.dna.jopt.member.unit.pnd.load.AbstractLoad
com.dna.jopt.member.unit.pnd.load.flexload.MixedFlexLoad
- Direct Known Subclasses:
RequestFlexLoad
,SupplyFlexLoad
,TimedSupplyFlexLoad
The Class RestockLoad. Load as much items as possible from a restock-node. Usually, this makes
sense in a delivery problem. Between different deliveries a resource can restock its load.
A restock node is like a supply node that can supply as much as necessary to completely fill up a truck.
- Since:
- Jul 22, 2020
- Version:
- Jul 22, 2020
- Author:
- jrich
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMixedFlexLoad
(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) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Copies the load into a new Object.double
getAdjustedLoadValue
(ILoadCapacity simpleLoadCapacity) Gets the adjusted load value.boolean
Checks if is flexible.Merge two loads.toString()
typeName()
Gets the type name.visited
(ILoadCapacity cap, double acceptedLoadValue, long resourceArrivalTime) After aILoadCapacity
visited a load, the load gets the information, what load value was accepted by the capacity and when the capcity arrived at the load.Methods inherited from class com.dna.jopt.member.unit.pnd.load.AbstractLoad
getId, getLoadValue, getPriority, getSearchIndex, isFuzzyVisit, isRequest, isTimed, setLoad, setSearchIndex
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.dna.jopt.member.unit.pnd.load.ILoad
getLoadValue, getPriority, isFuzzyVisit, isRequest, isTimed, setLoad
Methods inherited from interface com.dna.jopt.member.unit.pnd.IPNDItem
getId, getSearchIndex, setSearchIndex
-
Field Details
-
TYPE_NAME
The Constant TYPE_NAME.- See Also:
-
-
Constructor Details
-
MixedFlexLoad
Instantiates a new MixedFlexLoad.- Parameters:
loadId
- the load id
-
MixedFlexLoad
Instantiates a new MixedFlexLoad.- Parameters:
loadId
- the load idinitialLoadValue
- the initial load valueisInitialRequest
- the is initial request
-
MixedFlexLoad
public MixedFlexLoad(String loadId, int initialLoadValue, boolean initialIsRequest, boolean isFuzzyVisit)
-
-
Method Details
-
merge
Description copied from interface:ILoad
Merge two loads. -
visited
Description copied from interface:ILoad
After aILoadCapacity
visited a load, the load gets the information, what load value was accepted by the capacity and when the capcity arrived at the load. -
getAdjustedLoadValue
Description copied from interface:ILoad
Gets the adjusted load value. For Loads likeUnloadAllLoad
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.- Specified by:
getAdjustedLoadValue
in interfaceILoad
- Parameters:
simpleLoadCapacity
- the simple load capacity- Returns:
- the adjusted load value
-
toString
-
typeName
Description copied from interface:IPNDItem
Gets the type name. -
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 interfaceILoad
- Overrides:
isFlexible
in classAbstractLoad
- Returns:
- true, if is flexible
- See Also:
-
copy
Description copied from interface:ILoad
Copies the load into a new Object.
-