JOpt.SDK
Interface ICapacityResource
- All Superinterfaces:
- IDistanceMatrixEntry, IGeoResource, IResource
- All Known Implementing Classes:
- CapacityResource
- public interface ICapacityResource
- extends IGeoResource
ICapacityResource provide access to the CapacityResource. Capacitated Resources are required to execute an optimization.
A resource can be a vehicle, an employee or an abstract working unit.
addCapacity
public void addCapacity(double capacity)
- Parameters:
capacity - an arbitrary capacity vector for this resource. This
vector will be matched with the corresponding load vector of a visited node during the
optimization run.
getCapacity
public double[] getCapacity()
- Returns:
- the capacity vector
setInitialLoad
public void setInitialLoad(double[] initialLoad)
- Parameters:
initialLoad - set up an initial loadvector (eg. initial load when leaving the depot)
getInitialLoad
public double[] getInitialLoad()
- Returns:
- initial load
setMaxHours
public void setMaxHours(double maxTimeHours)
getMaxHours
public double getMaxHours()
- Returns:
- the maximum time a that a route may take for this resource
setMaxDistance
public void setMaxDistance(double maxDistanceKilometers)
getMaxDistance
public double getMaxDistance()
- Returns:
- the maximum distance a that a route may have for this resource
addPermittedNodeType
public void addPermittedNodeType(java.lang.String nodeType)
- Parameters:
nodeType - a node type that a resources is allowed to visit. This is only in effect if one has defined
node types for some of the nodes before. Otherwise node types are ignored.- See Also:
INode.setType()
getPermittedNodeTypes
public java.lang.String[] getPermittedNodeTypes()
- Returns:
- a list of permitted node types
checkNodeTypePermission
public boolean checkNodeTypePermission(java.lang.String nodeType)
- Parameters:
nodeType -
- Returns:
- true if the resource holds the permission to visit the given nodeType
setAvgSpeed
public void setAvgSpeed(double avgSpeed)
- Parameters:
avgSpeed - the average speed for this resource. This is only in effect when no timeMatrix has been defined. Otherwise the timeFactor
is the effective value.- See Also:
setTimeMatrixFactor()
getAvgSpeed
public double getAvgSpeed()
- Returns:
- the average speed of this resource
setTimeMatrixFactor
public void setTimeMatrixFactor(double timeFactor)
- Parameters:
timeFactor - the factor to affect the average driving times given in the timeMatrix.
If not set the time factor is set to 1.0 by default.
remark: Is in effect only in case a timeMatrix has been defined.
getTimeMatrixFactor
public double getTimeMatrixFactor()
- Returns:
- the timeFactor of that resource
setCost
public void setCost(double fixCost,
double perHourCost,
double perKilometerCost)
- Parameters:
perKilometerCost - the cost the vehicle will cause with each kilometerperHourCost - the cost the vehicle will cause with each hourfixCost - the fix cost the vehicle will cause when it is scheduled
setMaxDailyHours
public void setMaxDailyHours(double maxDailyHours)
- Parameters:
maxDailyHours - the maximum hours a resource is allowed to work each day
getMaxDailyHours
public double getMaxDailyHours()
- Returns:
- the maximum hours a resource is allowed to work each day
setMaxWeeklyHours
public void setMaxWeeklyHours(double maxWeeklyHours)
- Parameters:
maxWeeklyHours - the maximum hours a resource is allowed to work each week
getMaxWeeklyHours
public double getMaxWeeklyHours()
- Returns:
- the maximum hours a resource is allowed to work each days
setDailyWorkingHours
public void setDailyWorkingHours(java.util.HashMap dailyWorkingHours)
- Parameters:
dailyWorkingHours - the current daily working hours. Used by JOpt only
getDailyWorkingHours
public java.util.HashMap getDailyWorkingHours()
- Returns:
- the current working Hours