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.


Method Summary
 void addCapacity(double capacity)
           
 void addPermittedNodeType(java.lang.String nodeType)
           
 boolean checkNodeTypePermission(java.lang.String nodeType)
           
 double getAvgSpeed()
           
 double[] getCapacity()
           
 java.util.HashMap getDailyWorkingHours()
           
 double[] getInitialLoad()
           
 double getMaxDailyHours()
           
 double getMaxDistance()
           
 double getMaxHours()
           
 double getMaxWeeklyHours()
           
 java.lang.String[] getPermittedNodeTypes()
           
 double getTimeMatrixFactor()
           
 void setAvgSpeed(double avgSpeed)
           
 void setCost(double fixCost, double perHourCost, double perKilometerCost)
           
 void setDailyWorkingHours(java.util.HashMap dailyWorkingHours)
           
 void setInitialLoad(double[] initialLoad)
           
 void setMaxDailyHours(double maxDailyHours)
           
 void setMaxDistance(double maxDistanceKilometers)
           
 void setMaxHours(double maxTimeHours)
           
 void setMaxWeeklyHours(double maxWeeklyHours)
           
 void setTimeMatrixFactor(double timeFactor)
           
 
Methods inherited from interface JOpt.SDK.IGeoResource
getLatitude, getLongitude, setLatitude, setLongitude
 
Methods inherited from interface JOpt.SDK.IResource
getResourceId, setResourceId
 
Methods inherited from interface JOpt.SDK.IDistanceMatrixEntry
getDistMatrixId, setDistMatrixId
 

Method Detail

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 kilometer
perHourCost - the cost the vehicle will cause with each hour
fixCost - 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