public interface IResource extends IBasicResource, IOptimizationElement
resources
are required to execute a schedule as returned by the IOptimization
. A resource
can be a vehicle, an employee or
an abstract working unit. A resource has different attributes like timely availability, skills
and capacity.
Implementation example:
// Define the working hours
List<IWorkingHours> workingHours = new ArrayList<IWorkingHours>();
workingHours.add(
new WorkingHours(
ZonedDateTime.of(2020, MAY.getValue(), 6, 8, 0, 0, 0, ZoneId.of("Europe/Berlin")),
ZonedDateTime.of(2020, MAY.getValue(), 6, 17, 0, 0, 0, ZoneId.of("Europe/Berlin"))));
Duration maxWorkingTime = Duration.ofHours(13);
Quantity<Length> maxDistanceKmW = Quantities.getQuantity(1200.0, KILO(METRE));
// Define the resource
CapacityResource rep1 =
new CapacityResource("Jack", 50.775346, 6.083887, maxWorkingTime, maxDistanceKmW, workingHours);
rep1.setCost(0, 1, 1);
// Adding a (optional) qualification to the resource:
IQualification typeQualification = new TypeQualification();
((TypeQualification) typeQualification).addType("plumbing");
rep1.addQualification(typeQualification);
this.addElement(rep1);
IOptimizationElement.OptimizationElementFlavour
Modifier and Type | Method and Description |
---|---|
void |
addCapacity(double capacity)
Deprecated.
Sets the amount a
Resource can carry of a specific good.
Several goods can be defined of which each a limited amount can be carried. |
void |
addConstraint(IResourceLevelConstraint constraint)
Adds an
IConstraint to the Resource so it
can only give service to the Nodes that have the appropriate IQualification . |
double |
getAverageCO2EmissionFactor()
Gets the average CO2 emission factor.
|
double[] |
getCapacity()
Gets the capacity of goods a
Resource can carry. |
double[] |
getCapacityDegradationPerStop()
Gets the capacity degradation per stop.
|
double |
getConnectionTimeEfficiencyFactor()
Sets the
CapacityResource.getConnectionTimeEfficiencyFactor() , the default value is
1.0 . |
List<IResourceLevelConstraint> |
getConstraints()
Gets the
IConstraint from the Resource that
it is limited to. |
double[] |
getInitialLoad()
Gets the amount of a good that is already being carried by the
Resource . |
Optional<javax.measure.Quantity<javax.measure.quantity.Length>> |
getMaxDrivingDistanceFirstNode()
Gets the maximal distance that the
Resource needs to drive to the first Node . |
Optional<javax.measure.Quantity<javax.measure.quantity.Length>> |
getMaxDrivingDistanceLastNode()
Gets the maximal distance that the
Resource needs to drive to the last Node . |
Optional<Duration> |
getMaxDrivingTimeFirstNode()
Gets the maximal driving time that the
Resource is supposed to drive to the first
Node . |
Optional<Duration> |
getMaxDrivingTimeLastNode()
Gets the maximal driving time that the
Resource is supposed to drive to the last Node . |
Optional<Long> |
getMaxFreePostWorkDrivingTerminationTimeMillis()
Gets the amount of time in milliseconds that the
Resource can be expected to drive home
to its starting location in its free time. |
Optional<Long> |
getMaxPillarAfterHoursTime()
Gets the
maximal pillar after hours time in milliseconds. |
Optional<Long> |
getMaxRouteStartReductionTimeMillis()
Gets the maximum time which the
Resource can be expected to drive to the first Node in its private time. |
Optional<Long> |
getMaxRouteStartReductionTimeMillisPillar()
Gets the
route start reduction time for IPillarNode in milliseconds. |
int |
getMaxStaysOutInRow()
Gets maximum number of
overnight stays the Resource can do in a row. |
int |
getMaxTotalStaysOut()
Gets the
Resources maximum number of overnight stays , the default value is -1. |
double[] |
getMinimalDegratedCapacity()
Gets the minimal degrated capacity.
|
int |
getMinRecoverHours()
Gets the number of defined working hours (often days) between two
overnight stays . |
double |
getOverallVisitDurationEfficiencyFactor()
Gets the overall visit duration efficiency factor.
|
Optional<IResourceDepot> |
getResourceDepot()
Gets the resource depot.
|
Optional<Duration> |
getStayOutCycle()
Gets the
stay out cycle within which the maximum number of overnight stays are
allowed and within which the the minimum recovery time (days without overnight
stays ) has to be observed. |
Optional<LocalDate> |
getStayOutCycleStart()
Gets the starting day of the
stay out cycle within which the maximum number of overnight stays are allowed and within which the the minimum recovery time (days
without overnight stays ) has to be observed. |
double |
getStayOutPolicyMinDistance()
Gets the distance threshold to be able to use an
overnight stay in meter. |
double |
getStayOutPolicyMinTime()
Gets the return time threshold that needs to be surpassed to be able to use an
overnight
stay in seconds. |
javax.measure.Quantity<javax.measure.quantity.Length> |
getStayOutPolicyReturnDistance()
Gets the distance threshold that needs to be surpassed in order to be able to use an
overnight stay as Quantity Length . |
Duration |
getStayOutPolicyReturnTime()
Gets the time threshold that needs to be surpassed in order to be able to use an
overnight stay as Duration . |
Optional<Boolean> |
isOnlyApplyFreePostWorkDrivingOnOvertime() |
Optional<Boolean> |
isReductionTimeIncludedInWorkingTime()
Checks whether the
route start reduction time is included in the WorkingHours . |
Optional<Boolean> |
isReductionTimeOnlyUsedForDriving()
Checks whether the potentially set
route start reduction time can only be used for
driving, not for working. |
Optional<Boolean> |
isReductionTimeOnlyUsedForDrivingPillar()
Checks if a
route start reduction time for IPillarNode has been set. |
boolean |
isStayOutPolicyReturnDistanceActive()
Checks whether the
Resource needs to be further away from its starting location
than the set threshold to be able to use an overnight stay . |
boolean |
isStayOutPolicyReturnTimeActive()
Checks whether the
Resource needs to take longer to return to her starting
location than the set threshold to be able to use an overnight stay . |
void |
setAverageCO2EmissionFactor(double emissionFactor)
Sets the average CO2 emission-factor.
|
void |
setCapacity(double[] capacity)
Sets the amount a
Resource can carry of a specific good. |
void |
setCapacity(double[] capacity,
double[] minDegratedCapacity,
double[] capacityDegPerStop)
Sets the capacity.
|
void |
setCapacityDegradationPerStop(double[] capacityDegPerStop)
Sets the capacity degradation per stop.
|
void |
setConnectionTimeEfficiencyFactor(double connectionTimeEfficiencyFactor)
Sets connectionTimeEfficiencyFactor, the default value is
1.0 . |
void |
setInitialLoad(double[] initialLoad)
Sets the the amount of a good that is already being carried by the
Resource . |
void |
setMaxDrivingDistanceFirstNode(javax.measure.Quantity<javax.measure.quantity.Length> maxDistance)
Sets the maximal distance that the
Resource needs to drive to the first Node . |
void |
setMaxDrivingDistanceLastNode(javax.measure.Quantity<javax.measure.quantity.Length> maxDistance)
Sets the maximal distance that the
Resource needs to drive to the last Node . |
void |
setMaxDrivingTimeFirstNode(Duration maxTime)
Sets the maximal driving time that the
Resource is supposed to drive to the first
Node . |
void |
setMaxDrivingTimeLastNode(Duration maxTime)
Sets the maximal driving time that the
Resource is supposed to drive to the last Node . |
boolean |
setMaxFlexPreWorkingHoursDrvingTime(Duration preWorkTime)
Deprecated.
please use
setMaxRouteStartReductionTime(Duration, boolean) instead |
void |
setMaxFreePostWorkDrivingTerminationTime(Duration nonPenalizedDrivingHomeOnOwnTimeDuration)
Sets the amount of time that the
Resource can be expected to drive home to its starting
location in its free time. |
void |
setMaxFreePostWorkDrivingTerminationTime(Duration nonPenalizedDrivingHomeOnOwnTimeDuration,
boolean onlyApplyOnOvertime)
Sets the local max free post work driving termination time.
|
boolean |
setMaxPillarAfterHoursTime(Duration maxPillarEndOverTime)
Sets the amount of time after
WorkingHours within which a IPillarNode can be set. |
boolean |
setMaxRouteStartReductionTime(Duration maxRouteStartReductionTime,
boolean isOnlyUsedForDriving)
Sets the maximum time which the
Resource can be expected to drive to the first Node in its private time. |
boolean |
setMaxRouteStartReductionTimePillar(Duration maxRouteStartReductionTime,
boolean isOnlyUsedForDriving)
Sets the
route start reduction time for IPillarNode . |
void |
setMinimalDegratedCapacity(double[] minDegratedCapacity)
Sets the minimal degrated capacity.
|
boolean |
setOverallVisitDurationEfficiencyFactor(double factor)
Sets the overall visit duration efficiency factor.
|
void |
setReductionTimeIsIncludedInWorkingTime(boolean isIncludedInTotalWorkingTime)
Sets whether the
route start reduction time is included in the WorkingHours . |
void |
setResourceDepot(IResourceDepot depot)
Sets the resource depot.
|
void |
setStayOutCycleDefinition(Duration cycle,
LocalDate cycleStart)
Sets the
Duration of the cycle within which the maximum number of overnight
stays are allowed and within which the minimum recovery time (WorkingHours
without overnight stays ) has to be observed. |
void |
setStayOutPolicy(double minDistanceMeter,
double minTimeSeconds)
Deprecated.
Please use
setStayOutPolicy(Quantity, Duration) instead. |
void |
setStayOutPolicy(javax.measure.Quantity<javax.measure.quantity.Length> minDistanceForStayOut,
Duration minTimeForStayOut)
Sets the minimal distance and time the
Resource needs to be away from its starting
location to be able to a overnight stay . |
void |
setStayOutPolicyActive(boolean stayOutPolicyActive)
Deprecated.
please use the above mentioned methods instead
|
void |
setStayOutPolicyReturnDistance(javax.measure.Quantity<javax.measure.quantity.Length> minDistanceForStayOut)
Sets the minimal distance a
Resource needs to be away from his starting
location in order to be able to use an overnight stay . |
void |
setStayOutPolicyReturnDistanceActive(boolean stayOutPolicyReturnDistanceActive)
Sets whether the
Resource needs to be further away from its starting location
than the set threshold to be able to use an overnight stay . |
void |
setStayOutPolicyReturnTime(Duration minTimeForStayOut)
Sets the minimal time a
Resource would need to return to her starting location
to be able to use an overnight stay . |
void |
setStayOutPolicyReturnTimeActive(boolean stayOutPolicyReturnTimeActive)
Sets whether the
Resource needs to take longer to return to her starting
location than the set threshold to be able to use an overnight stay . |
void |
setStaysOut(int totalStays,
int staysInRow,
int minRecoverHours)
Sets the
total stays , the stays in a row and the minimum recovery time
of a stay out cycle . |
addQualification, getAcceptableOverdistanceMeter, getAcceptableOvertimeSeconds, getAverageSpeed, getAvgSpeed, getDestinationDistMatrixId, getDestinationLatitude, getDestinationLongitude, getDestinationPosition, getFixCost, getFlexTimeMillis, getMaxDistance, getMaxHours, getMaxWorkingDistance, getMaxWorkingTime, getPerHourCost, getPerKilometerCost, getQualifications, getSkillEfficiencyFactor, getStrictOverdistanceLimitMeter, getStrictOvertimeLimitSeconds, hasAlternateDestination, isEmptyAtEndOfRoute, resetAcceptableOvertime, setAcceptableOverdistance, setAcceptableOvertime, setAcceptableOvertimeSeconds, setAlternateDestination, setAvgSpeed, setAvgSpeed, setCost, setDestinationLatitude, setDestinationLongitude, setDestinationPosition, setFixCost, setFlexTime, setMaxDistance, setMaxHours, setMaxWorkingDistance, setMaxWorkingTime, setPerHourCost, setPerKilometerCost, setSkillEfficiencyFactor, setStrictOverdistanceLimit, setStrictOvertimeLimit
forceSetId, getConstraintAliasId, getDistMatrixId, getDutyHours, getExtraInfo, getFlavour, getId, getLatitude, getLocationId, getLongitude, getNodeConnection, getNodeConnectionKeySet, getNodeConnections, getPosition, getPreferredHoursInteractionController, hasRealGeoLocation, putNodeConnection, putNodeConnectionFromElement, removeNodeConnection, setConstraintAliasId, setDistMatrixId, setDutyHours, setExtraInfo, setId, setLatitude, setLocationId, setLongitude, setPosition
compareTo
double[] getCapacity()
Resource
can carry.
For more information please see addCapacity(double)
.
void addCapacity(double capacity)
Resource
can carry of a specific good.
Several goods can be defined of which each a limited amount can be carried.
capacity
- the double capacity to be addedvoid setInitialLoad(double[] initialLoad)
Resource
.
For more information please see addCapacity(double)
. If no capacity is defined, it
is assumed, the initial load equals the maximal capacity.
initialLoad
- the double List initialLoadvoid setCapacity(double[] capacity)
Resource
can carry of a specific good.
Several goods can be defined of which each a limited amount can be carried.
capacity
- the new capacityvoid setCapacity(double[] capacity, double[] minDegratedCapacity, double[] capacityDegPerStop)
capacity
- the capacityminDegratedCapacity
- the min degrated capacitycapacityDegPerStop
- the capacity deg per stopdouble[] getInitialLoad()
Resource
.
For more information please see addCapacity(double)
.
int getMaxTotalStaysOut()
Resources
maximum number of overnight stays
, the default value is -1.
In order to be able to do an overnight stay
, IWorkingHours.setIsAvailableForStay(boolean)
and INode.setIsStayNode(boolean)
have to be true
.int getMaxStaysOutInRow()
overnight stays
the Resource
can do in a row. The
default value is -1. In order to be able to do an overnight stay
, IWorkingHours.setIsAvailableForStay(boolean)
and INode.setIsStayNode(boolean)
have to be true
.int getMinRecoverHours()
overnight stays
. The
default value is 1. In order to be able to do an overnight stay
, IWorkingHours.setIsAvailableForStay(boolean)
and INode.setIsStayNode(boolean)
have to be true
.Optional<Duration> getStayOutCycle()
stay out cycle
within which the maximum number of overnight stays
are
allowed and within which the the minimum recovery time
(days without overnight
stays
) has to be observed. The stay out cycle
of this method is valid for all the
WorkingHours
of the Resource
.
For more information please see IWorkingHours.setLocalStayOutCycleDefinition(Duration,
LocalDate)
. The linked local stay out cycle
is only valid for the WorkingHours
it has been set tough.
Optional
if no stay out cycle
has been
definedOptional<LocalDate> getStayOutCycleStart()
stay out cycle
within which the maximum number of overnight stays
are allowed and within which the the minimum recovery time
(days
without overnight stays
) has to be observed. The stay out cycle
of this method
is valid for all the WorkingHours
of the Resource
. *
For more information please see IWorkingHours.setLocalStayOutCycleDefinition(Duration,
LocalDate)
. The linked local stay out cycle
is only valid for the WorkingHours
it has been set tough.
Optional
if no stay out cycle has
been defined
void setStayOutPolicy(javax.measure.Quantity<javax.measure.quantity.Length> minDistanceForStayOut, Duration minTimeForStayOut)
Resource
needs to be away from its starting
location to be able to a overnight stay
. If this threshold is not surpassed the Resource
has to return home and start from there the next day. This is treated as a hard constraint
.minDistanceForStayOut
- the Quantity<Length>
minimal distance from the starting
locationminTimeForStayOut
- the duration it would take to reach the starting locationvoid setStayOutPolicyReturnTimeActive(boolean stayOutPolicyReturnTimeActive)
Resource
needs to take longer to return to her starting
location
than the set threshold to be able to use an overnight stay
.stayOutPolicyReturnTimeActive
- the boolean whether the return time threshold is activesetStayOutPolicy(Quantity, Duration)
void setStayOutPolicyReturnDistanceActive(boolean stayOutPolicyReturnDistanceActive)
Resource
needs to be further away from its starting location
than the set threshold to be able to use an overnight stay
.stayOutPolicyReturnDistanceActive
- the boolean whether the return distance threshold is
activesetStayOutPolicy(Quantity, Duration)
boolean isStayOutPolicyReturnTimeActive()
Resource
needs to take longer to return to her starting
location
than the set threshold to be able to use an overnight stay
.setStayOutPolicy(Quantity, Duration)
boolean isStayOutPolicyReturnDistanceActive()
Resource
needs to be further away from its starting location
than the set threshold to be able to use an overnight stay
.setStayOutPolicy(Quantity, Duration)
void setStayOutPolicyReturnTime(Duration minTimeForStayOut)
Resource
would need to return to her starting location
to be able to use an overnight stay
. If this threshold is not surpassed the Resource
has to return home and start from there the next day.minTimeForStayOut
- the duration threshold within which the Resource is not allowed to use
an overnight staysetStayOutPolicy(Quantity, Duration)
void setStayOutPolicyReturnDistance(javax.measure.Quantity<javax.measure.quantity.Length> minDistanceForStayOut)
Resource
needs to be away from his starting
location
in order to be able to use an overnight stay
. If this threshold is not
surpassed the Resource
has to return home and start from there the next day.minDistanceForStayOut
- the quantity length threshold for an overnight staysetStayOutPolicy(Quantity, Duration)
double getConnectionTimeEfficiencyFactor()
CapacityResource.getConnectionTimeEfficiencyFactor()
, the default value is
1.0
. Depending on the vehicle in use the driving time may in- or decrease.
For example: Assuming a connection that has a base time of 20 minutes, a ConnectionTimeEfficiencyFactor of 0.5 would lead to a reduced time of 20*05 = 10 minutes.
void setConnectionTimeEfficiencyFactor(double connectionTimeEfficiencyFactor)
1.0
. The input must be >= 0
, otherwise an IllegalStateException
is thrown.connectionTimeEfficiencyFactor
- double to be set@Deprecated boolean setMaxFlexPreWorkingHoursDrvingTime(Duration preWorkTime)
setMaxRouteStartReductionTime(Duration, boolean)
insteadpreWorkTime
- the duration time a resource can be expected to drive to the first node on
its own timeOptional<Long> getMaxRouteStartReductionTimeMillis()
Resource
can be expected to drive to the first Node
in its private time. The route start reduction time
affects all the WorkingHours
of that Resource
.
The route start reduction time
is valid for all WorkingHours
of a Resource
. For more information please see setMaxRouteStartReductionTime(Duration,
boolean)
. If a route start reduction time
has to be valid for only one set of WorkingHours
please use the local
method IWorkingHours.setLocalMaxRouteStartReductionTime(Duration,
boolean)
.
Optional<Boolean> isReductionTimeIncludedInWorkingTime()
route start reduction time
is included in the WorkingHours
.
The default value is false
. If false
and setMaxRouteStartReductionTime(Duration, boolean)
is set to true
the driving time to
the first Node
has to be done in the Resources
private time.
The route start reduction time
is valid for all WorkingHours
of a Resource
. For more information please see setMaxRouteStartReductionTime(Duration,
boolean)
. If a route start reduction time
has to be valid for only one set of WorkingHours
please use the local
method IWorkingHours.setLocalMaxRouteStartReductionTime(Duration,
boolean)
.
Optional<Boolean> isReductionTimeOnlyUsedForDriving()
route start reduction time
can only be used for
driving, not for working. Per default this is set to true
. In this case the route start reduction time
is valid for all WorkingHours
of that Resource
.
The route start reduction time
is valid for all WorkingHours
of a Resource
. For more information please see setMaxRouteStartReductionTime(Duration,
boolean)
. If a route start reduction time
has to be valid for only one set of WorkingHours
please use the local
method IWorkingHours.setLocalMaxRouteStartReductionTime(Duration,
boolean)
.
Optional<Long> getMaxRouteStartReductionTimeMillisPillar()
route start reduction time
for IPillarNode
in milliseconds.
The route start reduction time
is valid for all WorkingHours
of a Resource
. For more information please see setMaxRouteStartReductionTime(Duration,
boolean)
. If a route start reduction time
has to be valid for only one set of WorkingHours
please use the local
method IWorkingHours.setLocalMaxRouteStartReductionTime(Duration,
boolean)
.
Optional<Boolean> isReductionTimeOnlyUsedForDrivingPillar()
route start reduction time
for IPillarNode
has been set.
For more information please see setMaxRouteStartReductionTimePillar(Duration,
boolean)
. For a method that only affects a specific set of WorkingHours
please see
IWorkingHours.setLocalMaxRouteStartReductionTimePillar(Duration,
boolean)
.
boolean setMaxRouteStartReductionTime(Duration maxRouteStartReductionTime, boolean isOnlyUsedForDriving)
Resource
can be expected to drive to the first Node
in its private time.
If the OpeningHours
of a Node
and the WorkingHours
of a Resource
start at 8 the driving time is an hour and the Resource
's route start
reduction time
is 30 Minutes the Resource
will start driving towards the Node
at 7.30 (outside of its WorkingHours
) and arrive there at 8.30.
The Boolean
defines whether the route start reduction time
can only be used
for driving or not and is usually set to true
. The Resource
can not work in the
route start reduction time
in that case.
The route start reduction time
is valid for all WorkingHours
of a Resource
. If a route start reduction time
has to be valid for only one set of WorkingHours
please use the local method IWorkingHours.setLocalMaxRouteStartReductionTime(Duration,
boolean)
maxRouteStartReductionTime
- the duration time the resource has to drive to work on its
own timeisOnlyUsedForDriving
- if the route start reduction time can only be used for drivingboolean setMaxRouteStartReductionTimePillar(Duration maxRouteStartReductionTime, boolean isOnlyUsedForDriving)
route start reduction time
for IPillarNode
. Overwrites the set route start reduction
time
that is valid for INodes
and sets the new value for Pillars
. If no route start reduction time
has been set, sets the new value for Pillars
only.
The Boolean
defines whether the route start reduction time
can only be used
for driving or not and is usually set to true
.
For more information please see setMaxRouteStartReductionTime(Duration, boolean)
.
maxRouteStartReductionTime
- the duration time the resource has to drive to work on its
own timeisOnlyUsedForDriving
- if the route start reduction time can only be used for drivingvoid setReductionTimeIsIncludedInWorkingTime(boolean isIncludedInTotalWorkingTime)
route start reduction time
is included in the WorkingHours
.
The default value is false
. If false
and setMaxRouteStartReductionTime(Duration, boolean)
is set to true
the driving time to
the first Node
has to be done in the Resources
private time.
For more information on route start reduction time
please see the link above.
isIncludedInTotalWorkingTime
- the boolean whether reduction time is included in the
WorkingHoursboolean setMaxPillarAfterHoursTime(Duration maxPillarEndOverTime)
WorkingHours
within which a IPillarNode
can be set. The Resources
have to visit this
Pillar
even tough it is outside of WorkingHours
.
This method sets the same time for all WorkingHours
. If you want to set the time for
a specific set of WorkingHours
please use IWorkingHours.setLocalMaxPillarAfterHoursTime(Duration)
.
maxPillarEndOverTime
- the duration after WorkingHours within which a Pillar still has to
be given serviceOptional<Long> getMaxPillarAfterHoursTime()
maximal pillar after hours time
in milliseconds.
For more information please see setMaxPillarAfterHoursTime(Duration)
.
void setStaysOut(int totalStays, int staysInRow, int minRecoverHours)
total stays
, the stays in a row
and the minimum recovery time
of a stay out cycle
. The minimum recovery time
is counted in number of WorkingHours
, which often but not necessarily are days.
For more information on stay out cycle
that is valid for all WorkingHours
of
a Resource
please see setStayOutCycleDefinition(Duration, LocalDate)
. For the
local
method that only affects specific WorkingHours
please see IWorkingHours.setLocalStayOutCycleDefinition(Duration,
LocalDate)
.
totalStays
- the int for maximum stays outstaysInRow
- the int for maximum stays out in rowminRecoverHours
- the int for minimum number of hours at base before new stay out is
allowedvoid setStayOutCycleDefinition(Duration cycle, LocalDate cycleStart)
Duration
of the cycle within which the maximum number of overnight
stays
are allowed and within which the minimum recovery time
(WorkingHours
without overnight stays
) has to be observed. The minimum recovery time
is
counted in number of WorkingHours
, which often but not
necessarily are days.
Without setting the cycle the maximal number of overnight stays
will not be
refreshed and count for the full duration of the WorkingHours
. The cycle is applied to
all WorkingHours
of the Resource
throughout the Optimization
.
If the cycle should only be applied to specific WorkingHours
so it can change
depending on the dates or days in the week (i.e. no overnight stays
on Fridays please
use IWorkingHours.setLocalStayOutCycleDefinition(Duration,
LocalDate)
.
cycle
- the duration of the cyclecycleStart
- the localDate day of the cycle startvoid setStayOutPolicyActive(boolean stayOutPolicyActive)
Sets both
setStayOutPolicyReturnDistanceActive(boolean)
and
setStayOutPolicyReturnTimeActive(boolean)
to true
.
For more information please see setStayOutPolicy(Quantity, Duration)
.
stayOutPolicyActive
- the boolean whether the return distance and the return time
threshold are active@Deprecated void setStayOutPolicy(double minDistanceMeter, double minTimeSeconds)
setStayOutPolicy(Quantity, Duration)
instead.Sets the minimal distance in meter
and time in seconds
the Resource
would need to return to his starting location which makes it eligible to do an overnight
stay
.
minDistanceMeter
- the double distance threshold to be set in meterminTimeSeconds
- the double time threshold to be set in secondsdouble getStayOutPolicyMinDistance()
overnight stay
in meter.
For more information please see setStayOutPolicy(Quantity, Duration)
.
double getStayOutPolicyMinTime()
overnight
stay
in seconds.
For more information please see setStayOutPolicy(Quantity, Duration)
.
Optional<Long> getMaxFreePostWorkDrivingTerminationTimeMillis()
Resource
can be expected to drive home
to its starting location in its free time.
For more information please see setMaxFreePostWorkDrivingTerminationTime(Duration)
.
void setMaxFreePostWorkDrivingTerminationTime(Duration nonPenalizedDrivingHomeOnOwnTimeDuration)
Resource
can be expected to drive home to its starting
location in its free time.
If returning from the last Node
to the starting location takes 1 hour and the freePostWorkDrivingTerminationTime
is set to 40 minutes, those 40 minutes of the drive home
are considered private time.
This method sets the free post work driving
for all the WorkingHours
of the
Resource
. If different times hove to be set for specific WorkingHours
please
use IWorkingHours.setLocalMaxFreePostWorkDrivingTerminationTime(Duration)
nonPenalizedDrivingHomeOnOwnTimeDuration
- the duration of the drive home that has to be
done in the free timevoid setMaxFreePostWorkDrivingTerminationTime(Duration nonPenalizedDrivingHomeOnOwnTimeDuration, boolean onlyApplyOnOvertime)
nonPenalizedDrivingHomeOnOwnTimeDuration
- the non penalized driving home on own time durationonlyApplyOnOvertime
- the only apply on overtimeOptional<Boolean> isOnlyApplyFreePostWorkDrivingOnOvertime()
Duration getStayOutPolicyReturnTime()
overnight stay
as Duration
.setStayOutPolicy(Quantity, Duration)
javax.measure.Quantity<javax.measure.quantity.Length> getStayOutPolicyReturnDistance()
overnight stay
as Quantity
Length
.setStayOutPolicy(Quantity, Duration)
void addConstraint(IResourceLevelConstraint constraint)
IConstraint
to the Resource
so it
can only give service to the Nodes
that have the appropriate IQualification
.
Used by UKPostCode
.
constraint
- the iResourceLevelConstraint to which it will be limitedList<IResourceLevelConstraint> getConstraints()
IConstraint
from the Resource
that
it is limited to.
For more information please see addConstraint(IResourceLevelConstraint)
.
void setMaxDrivingDistanceFirstNode(javax.measure.Quantity<javax.measure.quantity.Length> maxDistance)
Resource
needs to drive to the first Node
.maxDistance
- the quantity length maximal distance to the first NodeOptional<javax.measure.Quantity<javax.measure.quantity.Length>> getMaxDrivingDistanceFirstNode()
Resource
needs to drive to the first Node
.setMaxDrivingDistanceFirstNode(Quantity)
void setMaxDrivingDistanceLastNode(javax.measure.Quantity<javax.measure.quantity.Length> maxDistance)
Resource
needs to drive to the last Node
.maxDistance
- the quantity length maximal distanceOptional<javax.measure.Quantity<javax.measure.quantity.Length>> getMaxDrivingDistanceLastNode()
Resource
needs to drive to the last Node
.setMaxDrivingDistanceLastNode(Quantity)
void setMaxDrivingTimeFirstNode(Duration maxTime)
Resource
is supposed to drive to the first
Node
.maxTime
- the duration maximal timeOptional<Duration> getMaxDrivingTimeFirstNode()
Resource
is supposed to drive to the first
Node
.setMaxDrivingTimeFirstNode(Duration)
void setMaxDrivingTimeLastNode(Duration maxTime)
Resource
is supposed to drive to the last Node
.maxTime
- the duration maximal timeOptional<Duration> getMaxDrivingTimeLastNode()
Resource
is supposed to drive to the last Node
.setMaxDrivingDistanceLastNode(Quantity)
void setResourceDepot(IResourceDepot depot)
depot
- the new resource depotOptional<IResourceDepot> getResourceDepot()
double getOverallVisitDurationEfficiencyFactor()
boolean setOverallVisitDurationEfficiencyFactor(double factor)
factor
- the factordouble[] getMinimalDegratedCapacity()
double[] getCapacityDegradationPerStop()
void setMinimalDegratedCapacity(double[] minDegratedCapacity)
minDegratedCapacity
- the new minimal degrated capacityvoid setCapacityDegradationPerStop(double[] capacityDegPerStop)
capacityDegPerStop
- the new capacity degradation per stopvoid setAverageCO2EmissionFactor(double emissionFactor)
emissionFactor
- the new average CO2 emission factordouble getAverageCO2EmissionFactor()
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.