Class DegradingLoadCapacity
java.lang.Object
com.dna.jopt.member.unit.pnd.capacity.AbstractLoadCapacity
com.dna.jopt.member.unit.pnd.capacity.degrading.DegradingLoadCapacity
- All Implemented Interfaces:
ILoadCapacity,IPNDItem
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDegradingLoadCapacity(String loadCapacityId, int maxCapacityValue, int currentLoad, int capDegradationPerStop, int minimalTotaDegradatedCapacity) -
Method Summary
Modifier and TypeMethodDescriptiondoubleintGetter formaxCapacityValuebridging the constructor parameter name to the serialized field name.doublemerge(ILoadCapacity itemTwo) Merge two capacities.toString()typeName()Gets the type name.visit(ILoad load, IResourceDepot orgResourceDepot, double totalMatchedLeftCapacity, ILogicEntityRoute route, long resourceArrivalTime) The capacity is "visiting" a load.Methods inherited from class com.dna.jopt.member.unit.pnd.capacity.AbstractLoadCapacity
getCurrentLoad, getId, getLoadPickupTime, getMaximalIndividualLoadCapacity, getSearchIndex, setLoadPickupTime, setSearchIndex
-
Field Details
-
TYPE_NAME
- See Also:
-
-
Constructor Details
-
DegradingLoadCapacity
public DegradingLoadCapacity(String loadCapacityId, int maxCapacityValue, int currentLoad, int capDegradationPerStop, int minimalTotaDegradatedCapacity)
-
-
Method Details
-
merge
Description copied from interface:ILoadCapacityMerge two capacities.- Parameters:
itemTwo- the item two- Returns:
- the optional
-
getMaxCapacityValue
public int getMaxCapacityValue()Getter formaxCapacityValuebridging the constructor parameter name to the serialized field name. Without this override Jackson can deserialize the field via the constructor but cannot serialize it, producing awriteOnlyschema entry. -
getCapacityDegradationPerStop
public double getCapacityDegradationPerStop() -
getMinimalTotaDegradatedCapacity
public double getMinimalTotaDegradatedCapacity() -
visit
public VisitLoadCapacityExchangeHelper visit(ILoad load, IResourceDepot orgResourceDepot, double totalMatchedLeftCapacity, ILogicEntityRoute route, long resourceArrivalTime) Description copied from interface:ILoadCapacityThe capacity is "visiting" a load.- Parameters:
load- the load to be visitedorgResourceDepot- the original resource depot before the visittotalMatchedLeftCapacity- the total matched left capacity of the depot beofre visitroute- the route with the resource that is holding the resource depotresourceArrivalTime- the arrivalTime at the load- Returns:
- the visit load capacity exchange helper
-
toString
-
typeName
Description copied from interface:IPNDItemGets the type name.- Returns:
- the type name
-