Class AbstractLoad
java.lang.Object
com.dna.jopt.member.unit.pnd.load.AbstractLoad
- Direct Known Subclasses:
MixedFlexLoad,SimpleLoad,TimedLoad,UnloadAllLoad
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractLoad(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 PNDItemdoubleGets the current load value.intGets the priority.intGets the search index.booleanChecks if is flexible.booleanChecks if is fuzzy visit.booleanChecks if is request.booleanisTimed()Checks if is timed.voidsetLoad(double loadValue, boolean isRequest) Sets the load and the request status of the load.voidsetSearchIndex(int searchIndex) Sets the search index.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:IPNDItemSets the search index.- Specified by:
setSearchIndexin interfaceIPNDItem- Parameters:
searchIndex- the new search index
-
getSearchIndex
public int getSearchIndex()Description copied from interface:IPNDItemGets the search index.- Specified by:
getSearchIndexin interfaceIPNDItem- Returns:
- the search index
-
setLoad
public void setLoad(double loadValue, boolean isRequest) Description copied from interface:ILoadSets the load and the request status of the load. -
isFlexible
public boolean isFlexible()Description copied from interface:ILoadChecks 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:
isFlexiblein interfaceILoad- Returns:
- true, if is flexible
- See Also:
-
isTimed
public boolean isTimed()Description copied from interface:ILoadChecks 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:ILoadChecks 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:
isFuzzyVisitin interfaceILoad- Returns:
- true, if is fuzzy visit
-
getId
Description copied from interface:IPNDItemGets the id of the PNDItem -
getPriority
public int getPriority()Description copied from interface:ILoadGets 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:
getPriorityin interfaceILoad- Returns:
- the priority
-
getLoadValue
public double getLoadValue()Description copied from interface:ILoadGets 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:
getLoadValuein interfaceILoad- Returns:
- the load value
-
isRequest
public boolean isRequest()Description copied from interface:ILoadChecks 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.
-