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
ConstructorsModifierConstructorDescriptionprotectedAbstractResourceDepot(String depotId, double maximalTotalCapacity) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the.voidaddAndUpdate(List<ILoadCapacity> loadCapacities, int arraySize) Adds the and update.voidaddToCurrentTotalMatchLoad(double addMatchLoad) doublecalculateMatchLoad(String itemId, double loadValue) Calculate match load.doubleGets the current total matched load.intgetEmtpyAtEndOfRouteFactor(String loadId) Gets the emtpy at end of route factor.getLoadCapacityBySearchIndex(int index) Gets the load capacity by search index.doubleGets the maximal total capacity.intgetPerKilometerCostFactor(String loadId) Gets the per kilometer cost factor.intGets the search array size.doubleinverseCalculateMatchLoad(String itemId, double matchedloadValue) Inverse calculate match load.voidinvokeSearchArray(String[] loadIds) Invoke search array.mergeItem(ILoadCapacity itemOne, ILoadCapacity itemTwo) voidsetCapacityUnitMap(Map<String, Double> capacityUnitMap) Sets the capacity unit map.voidsetEmptyAtEndOfRouteFactorMap(Map<String, Integer> emptyEndOfRouteFactorMap) Methods inherited from class com.dna.jopt.member.unit.pnd.depot.AbstractGenericDepot
add, add, get, getDepotId, getItems, postAdd, remove, replace, setItemsMethods 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.depot.resource.IResourceDepot
add, add, createWith, get, getDepotId, getItems, remove, typeName, visit
-
Constructor Details
-
AbstractResourceDepot
-
-
Method Details
-
invokeSearchArray
Description copied from interface:IResourceDepotInvoke search array.- Specified by:
invokeSearchArrayin interfaceIResourceDepot- Parameters:
loadIds- the load ids
-
getSearchArraySize
public int getSearchArraySize()Description copied from interface:IResourceDepotGets the search array size.- Specified by:
getSearchArraySizein interfaceIResourceDepot- Returns:
- the search array size
-
addAndUpdate
Description copied from interface:IResourceDepotAdds the and update.- Specified by:
addAndUpdatein interfaceIResourceDepot- Parameters:
loadCapacities- the load capacitiesarraySize- the array size
-
getLoadCapacityBySearchIndex
Description copied from interface:IResourceDepotGets the load capacity by search index.- Specified by:
getLoadCapacityBySearchIndexin interfaceIResourceDepot- Parameters:
index- the index- Returns:
- the load capacity by search index
-
getCurrentTotalMatchedLoad
public double getCurrentTotalMatchedLoad()Description copied from interface:IResourceDepotGets the current total matched load.- Specified by:
getCurrentTotalMatchedLoadin interfaceIResourceDepot- Returns:
- the current total matched load
-
addToCurrentTotalMatchLoad
public void addToCurrentTotalMatchLoad(double addMatchLoad) -
calculateMatchLoad
Description copied from interface:IResourceDepotCalculate match load.- Specified by:
calculateMatchLoadin interfaceIResourceDepot- Parameters:
itemId- the item idloadValue- the load value- Returns:
- the double
-
inverseCalculateMatchLoad
Description copied from interface:IResourceDepotInverse calculate match load.- Specified by:
inverseCalculateMatchLoadin interfaceIResourceDepot- Parameters:
itemId- the item idmatchedloadValue- the matchedload value- Returns:
- the double
-
getMaximalTotalCapacity
public double getMaximalTotalCapacity()Description copied from interface:IResourceDepotGets the maximal total capacity.- Specified by:
getMaximalTotalCapacityin interfaceIResourceDepot- Returns:
- the maximal total capacity
-
add
Description copied from interface:IResourceDepotAdds the.- Specified by:
addin interfaceIResourceDepot- Parameters:
loadId- the load idcapacityFactor- the capacity factor
-
getCapacityUnitMap
-
setCapacityUnitMap
Description copied from interface:IResourceDepotSets the capacity unit map.- Specified by:
setCapacityUnitMapin interfaceIResourceDepot- Parameters:
capacityUnitMap- the capacity unit map
-
getEmptyAtEndOfRouteFactorMap
-
setEmptyAtEndOfRouteFactorMap
-
getEmtpyAtEndOfRouteFactor
Description copied from interface:IResourceDepotGets the emtpy at end of route factor.- Specified by:
getEmtpyAtEndOfRouteFactorin interfaceIResourceDepot- Parameters:
loadId- the id- Returns:
- the emtpy at end of route factor
-
getPerKilometerCostFactorMap
-
getPerKilometerCostFactor
Description copied from interface:IResourceDepotGets the per kilometer cost factor.- Specified by:
getPerKilometerCostFactorin interfaceIResourceDepot- Parameters:
loadId- the load id- Returns:
- the per kilometer cost factor
-
mergeItem
- Specified by:
mergeItemin classAbstractGenericDepot<ILoadCapacity>
-