Class AbstractResourceDepot
java.lang.Object
com.dna.jopt.member.unit.pnd.depot.AbstractGenericDepot<ILoadCapacity>
com.dna.jopt.member.unit.pnd.depot.resource.AbstractResourceDepot
- All Implemented Interfaces:
IResourceDepot
- Direct Known Subclasses:
SimpleResourceDepot
public abstract class AbstractResourceDepot
extends AbstractGenericDepot<ILoadCapacity>
implements IResourceDepot
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractResourceDepot
(String depotId, double maximalTotalCapacity) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the.void
addAndUpdate
(List<ILoadCapacity> loadCapacities, int arraySize) Adds the and update.void
addToCurrentTotalMatchLoad
(double addMatchLoad) double
calculateMatchLoad
(String itemId, double loadValue) Calculate match load.double
Gets the current total matched load.int
getEmtpyAtEndOfRouteFactor
(String loadId) Gets the emtpy at end of route factor.getLoadCapacityBySearchIndex
(int index) Gets the load capacity by search index.double
Gets the maximal total capacity.int
getPerKilometerCostFactor
(String loadId) Gets the per kilometer cost factor.int
Gets the search array size.double
inverseCalculateMatchLoad
(String itemId, double matchedloadValue) Inverse calculate match load.void
invokeSearchArray
(String[] loadIds) Invoke search array.mergeItem
(ILoadCapacity itemOne, ILoadCapacity itemTwo) void
setCapacityUnitMap
(Map<String, Double> capacityUnitMap) Sets the capacity unit map.void
setEmptyAtEndOfRouteFactorMap
(Map<String, Integer> emptyEndOfRouteFactorMap) Methods inherited from class com.dna.jopt.member.unit.pnd.depot.AbstractGenericDepot
add, add, get, getDepotId, getItems, postAdd, remove, replace, setItems
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.depot.resource.IResourceDepot
add, add, createWith, get, getDepotId, getItems, remove, typeName, visit
-
Constructor Details
-
AbstractResourceDepot
-
-
Method Details
-
invokeSearchArray
Description copied from interface:IResourceDepot
Invoke search array.- Specified by:
invokeSearchArray
in interfaceIResourceDepot
- Parameters:
loadIds
- the load ids
-
getSearchArraySize
public int getSearchArraySize()Description copied from interface:IResourceDepot
Gets the search array size.- Specified by:
getSearchArraySize
in interfaceIResourceDepot
- Returns:
- the search array size
-
addAndUpdate
Description copied from interface:IResourceDepot
Adds the and update.- Specified by:
addAndUpdate
in interfaceIResourceDepot
- Parameters:
loadCapacities
- the load capacitiesarraySize
- the array size
-
getLoadCapacityBySearchIndex
Description copied from interface:IResourceDepot
Gets the load capacity by search index.- Specified by:
getLoadCapacityBySearchIndex
in interfaceIResourceDepot
- Parameters:
index
- the index- Returns:
- the load capacity by search index
-
getCurrentTotalMatchedLoad
public double getCurrentTotalMatchedLoad()Description copied from interface:IResourceDepot
Gets the current total matched load.- Specified by:
getCurrentTotalMatchedLoad
in interfaceIResourceDepot
- Returns:
- the current total matched load
-
addToCurrentTotalMatchLoad
public void addToCurrentTotalMatchLoad(double addMatchLoad) -
calculateMatchLoad
Description copied from interface:IResourceDepot
Calculate match load.- Specified by:
calculateMatchLoad
in interfaceIResourceDepot
- Parameters:
itemId
- the item idloadValue
- the load value- Returns:
- the double
-
inverseCalculateMatchLoad
Description copied from interface:IResourceDepot
Inverse calculate match load.- Specified by:
inverseCalculateMatchLoad
in interfaceIResourceDepot
- Parameters:
itemId
- the item idmatchedloadValue
- the matchedload value- Returns:
- the double
-
getMaximalTotalCapacity
public double getMaximalTotalCapacity()Description copied from interface:IResourceDepot
Gets the maximal total capacity.- Specified by:
getMaximalTotalCapacity
in interfaceIResourceDepot
- Returns:
- the maximal total capacity
-
add
Description copied from interface:IResourceDepot
Adds the.- Specified by:
add
in interfaceIResourceDepot
- Parameters:
loadId
- the load idcapacityFactor
- the capacity factor
-
getCapacityUnitMap
-
setCapacityUnitMap
Description copied from interface:IResourceDepot
Sets the capacity unit map.- Specified by:
setCapacityUnitMap
in interfaceIResourceDepot
- Parameters:
capacityUnitMap
- the capacity unit map
-
getEmptyAtEndOfRouteFactorMap
-
setEmptyAtEndOfRouteFactorMap
-
getEmtpyAtEndOfRouteFactor
Description copied from interface:IResourceDepot
Gets the emtpy at end of route factor.- Specified by:
getEmtpyAtEndOfRouteFactor
in interfaceIResourceDepot
- Parameters:
loadId
- the id- Returns:
- the emtpy at end of route factor
-
getPerKilometerCostFactorMap
-
getPerKilometerCostFactor
Description copied from interface:IResourceDepot
Gets the per kilometer cost factor.- Specified by:
getPerKilometerCostFactor
in interfaceIResourceDepot
- Parameters:
loadId
- the load id- Returns:
- the per kilometer cost factor
-
mergeItem
- Specified by:
mergeItem
in classAbstractGenericDepot<ILoadCapacity>
-