JOpt.SDK
Interface IResource

All Superinterfaces:
IDistanceMatrixEntry
All Known Subinterfaces:
ICapacityResource, IGeoResource
All Known Implementing Classes:
CapacityResource

public interface IResource
extends IDistanceMatrixEntry

resources are required to execute a schedule as returned by the optimization. A resource can be a vehicle, an employee or an abstract working unit. A resource has different attributes like timely availability, skills, capacity


Method Summary
 void addPermittedNodeType(java.lang.String nodeType)
           
 boolean checkNodeTypePermission(java.lang.String nodeType)
          check if the current resource is allowed visit a given nodeType
 double getAvgSpeed()
           
 IDailyBreak getDailyBreak()
           
 java.util.HashMap getDailyWorkingHours()
          INTERNAL USE ONLY
 double getMaxDailyHours()
           
 double getMaxDistance()
           
 double getMaxHours()
           
 double getMaxWeeklyHours()
           
 java.lang.String[] getPermittedNodeTypes()
           
 java.lang.String getResourceId()
           
 double getTimeMatrixFactor()
           
 void setAvgSpeed(double avgSpeed)
           
 void setCost(double fixCost, double perHourCost, double perKilometerCost)
          Define specific cost for each vehicle.
 void setDailyBreak(IDailyBreak dailyBreak)
          Add a daily break to this resource.
 void setDailyWorkingHours(java.util.HashMap dailyWorkingHours)
          INTERNAL USE ONLY
 void setMaxDailyHours(double maxDailyHours)
           
 void setMaxDistance(double maxDistance)
           
 void setMaxHours(double maxHours)
           
 void setMaxWeeklyHours(double maxWeeklyHours)
           
 void setResourceId(java.lang.String resourceId)
           
 void setServiceTimePointer(java.util.HashMap serviceTimePointer)
          INTERNAL USE ONLY
 void setTimeMatrixFactor(double timeFactor)
           
 void setWorkingHours(IWorkingHours[] workingHours)
           
 
Methods inherited from interface JOpt.SDK.IDistanceMatrixEntry
getDistMatrixId, setDistMatrixId
 

Method Detail

setResourceId

public void setResourceId(java.lang.String resourceId)
Parameters:
resourceId - set the resource's unique Id

getResourceId

public java.lang.String getResourceId()
Returns:
get the resource's unique Id

setMaxHours

public void setMaxHours(double maxHours)
Parameters:
maxHours - the maximum hours [h] a route can take

getMaxHours

public double getMaxHours()
Returns:
the maximum hours [h] a route can take

setMaxDistance

public void setMaxDistance(double maxDistance)
Parameters:
maxDistance - the maximum distance [km] a route can take

getMaxDistance

public double getMaxDistance()
Returns:
the maximum distance [km] a route can take

addPermittedNodeType

public void addPermittedNodeType(java.lang.String nodeType)
Parameters:
nodeType - (optional) one of a list of nodeTypes the resource is allowed to visit.

getPermittedNodeTypes

public java.lang.String[] getPermittedNodeTypes()

checkNodeTypePermission

public boolean checkNodeTypePermission(java.lang.String nodeType)
check if the current resource is allowed visit a given nodeType

Parameters:
nodeType -
Returns:
boolean indicating whether the current resource is allowed visit a given nodeType

setAvgSpeed

public void setAvgSpeed(double avgSpeed)
Parameters:
avgSpeed - the average speed of the resource in m/s (applies if no time matrix is provided)

getAvgSpeed

public double getAvgSpeed()
Returns:
the average speed of the resource in m/s (applies if no time matrix is provided)

setTimeMatrixFactor

public void setTimeMatrixFactor(double timeFactor)
Parameters:
timeFactor - 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:
timeFactor that affects 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.

setCost

public void setCost(double fixCost,
                    double perHourCost,
                    double perKilometerCost)
Define specific cost for each vehicle. As JOpt is a least cost router it will always try to prefer the most cost effective vehicles before others.

Parameters:
fixCost -
perHourCost -
perKilometerCost -

setMaxDailyHours

public void setMaxDailyHours(double maxDailyHours)
Parameters:
maxDailyHours - applies only in WEEKLY mode and defines when the resource will have to make a break until the next business day

getMaxDailyHours

public double getMaxDailyHours()

setMaxWeeklyHours

public void setMaxWeeklyHours(double maxWeeklyHours)
Parameters:
maxWeeklyHours - applies only in WEEKLY mode and defines when the resource will have to make a break until the next business week

getMaxWeeklyHours

public double getMaxWeeklyHours()
Returns:
maxWeeklyHours applies only in WEEKLY mode and defines when the resource will have to make a break until the next business week

setDailyWorkingHours

public void setDailyWorkingHours(java.util.HashMap dailyWorkingHours)
INTERNAL USE ONLY


getDailyWorkingHours

public java.util.HashMap getDailyWorkingHours()
INTERNAL USE ONLY


setWorkingHours

public void setWorkingHours(IWorkingHours[] workingHours)

setServiceTimePointer

public void setServiceTimePointer(java.util.HashMap serviceTimePointer)
INTERNAL USE ONLY


setDailyBreak

public void setDailyBreak(IDailyBreak dailyBreak)
Add a daily break to this resource. Daily breaks define a timespan in which the resource will be allowed to make a break

Parameters:
dailyBreak -

getDailyBreak

public IDailyBreak getDailyBreak()
Returns:
the daily break object