Class AbstractLoad
java.lang.Object
com.dna.jopt.member.unit.pnd.load.AbstractLoad
- Direct Known Subclasses:
MixedFlexLoad
,SimpleLoad
,TimedLoad
,UnloadAllLoad
-
Constructor Summary
ConstructorDescriptionAbstractLoad
(String loadId, int loadValue, boolean isRequest, boolean isFuzzyVisit) AbstractLoad
(String loadId, int loadValue, int priority, boolean isRequest, boolean isFuzzyVisit) -
Method Summary
Modifier and TypeMethodDescriptiongetId()
Gets the id of the PNDItemdouble
Gets the current load value.int
Gets the priority.int
Gets the search index.boolean
Checks if is flexible.boolean
Checks if is fuzzy visit.boolean
Checks if is request.boolean
isTimed()
Checks if is timed.void
setLoad
(double loadValue, boolean isRequest) Sets the load and the request status of the load.void
setSearchIndex
(int searchIndex) Sets the search index.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.dna.jopt.member.unit.pnd.load.ILoad
copy, getAdjustedLoadValue, merge, visited
-
Constructor Details
-
AbstractLoad
-
AbstractLoad
public AbstractLoad(String loadId, int loadValue, int priority, boolean isRequest, boolean isFuzzyVisit)
-
-
Method Details
-
setSearchIndex
public void setSearchIndex(int searchIndex) Description copied from interface:IPNDItem
Sets the search index.- Specified by:
setSearchIndex
in interfaceIPNDItem
- Parameters:
searchIndex
- the new search index
-
getSearchIndex
public int getSearchIndex()Description copied from interface:IPNDItem
Gets the search index.- Specified by:
getSearchIndex
in interfaceIPNDItem
- Returns:
- the search index
-
setLoad
public void setLoad(double loadValue, boolean isRequest) Description copied from interface:ILoad
Sets the load and the request status of the load. -
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
- Returns:
- true, if is flexible
- See Also:
-
isTimed
public boolean isTimed()Description copied from interface:ILoad
Checks if is timed. The goods of a timed load desirably only stays a limited time within a ResourceDepot. If the time between pickup and delivery of timed load is longer that a predefined maximal value, the Optimizer will assign penalty cost. -
isFuzzyVisit
public boolean isFuzzyVisit()Description copied from interface:ILoad
Checks if is fuzzy visit. A fuzzy visit means, the load accepts only partial load exchange. If the load is a request, the capacity is allowed to drop a value of goods that is smaller as the desired value of the load. If the load is a supply, the capacity is allowed to pick up less of the goods the load wants to supply.- Specified by:
isFuzzyVisit
in interfaceILoad
- Returns:
- true, if is fuzzy visit
-
getId
Description copied from interface:IPNDItem
Gets the id of the PNDItem -
getPriority
public int getPriority()Description copied from interface:ILoad
Gets the priority. For example: When visiting multiple supply loads in the same NodeDepot, it can happen that after the first load is evaluated, the ResourceDepot is not accepting anymore loads to avoid overloading. The lower priority loads therefore are more likely getting violated.- Specified by:
getPriority
in interfaceILoad
- Returns:
- the priority
-
getLoadValue
public double getLoadValue()Description copied from interface:ILoad
Gets the current load value. The load value is always a positive value.ILoad.isRequest()
defines if a load is a supply or a request.- Specified by:
getLoadValue
in interfaceILoad
- Returns:
- the load value
-
isRequest
public boolean isRequest()Description copied from interface:ILoad
Checks if is request. A request means the load wants to get goods from aILoadCapacity
. If request is false, the load automatically supplies goods to a capacity.
-