Class SimpleLoad
java.lang.Object
com.dna.jopt.member.unit.pnd.load.AbstractLoad
com.dna.jopt.member.unit.pnd.load.simple.SimpleLoad
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSimpleLoad
(String loadId, int loadValue, boolean isRequest, boolean isFuzzyVisit) SimpleLoad
(String loadId, int loadValue, int priority, boolean isRequest, boolean isFuzzyVisit) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Copies the load into a new Object.double
getAdjustedLoadValue
(ILoadCapacity simpleLoadCapacity) Gets the adjusted load value.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, isFlexible, isFuzzyVisit, isRequest, isTimed, setLoad, setSearchIndex
-
Field Details
-
TYPE_NAME
- See Also:
-
-
Constructor Details
-
SimpleLoad
public SimpleLoad(String loadId, int loadValue, int priority, boolean isRequest, boolean isFuzzyVisit) -
SimpleLoad
-
-
Method Details
-
merge
Description copied from interface:ILoad
Merge two loads.- Parameters:
itemTwo
- the item two- Returns:
- the optional
-
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.- Parameters:
cap
- the capacceptedLoadValue
- the accepted load valueresourceArrivalTime
- the resource arrival time- Returns:
- the i 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.- Parameters:
simpleLoadCapacity
- the simple load capacity- Returns:
- the adjusted load value
-
typeName
Description copied from interface:IPNDItem
Gets the type name.- Returns:
- the type name
-
toString
-
copy
Description copied from interface:ILoad
Copies the load into a new Object.- Returns:
- the copied ILoad
-