Class LogicRouteElementDetailItem
java.lang.Object
com.dna.jopt.member.bucket.route.controller.detail.LogicRouteElementDetailItem
- All Implemented Interfaces:
ILogicRouteElementDetailItem
,Serializable
,Cloneable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.dna.jopt.member.bucket.route.controller.detail.ILogicRouteElementDetailItem
ILogicRouteElementDetailItem.ScheduleStatus
-
Constructor Summary
ConstructorDescriptionLogicRouteElementDetailItem
(IOptimizationElement node, long arrivalTime, long departureTime, long transitionTime, long idleTime, boolean isUnlocatedIdleTime, long whiteSpaceIdleTime, long durationTime, double distance2prevElement, long earlyDeviationMillis, long lateDeviationMillis, int choosenOpeningHoursIndex, int choosenWorkingHoursIndex, String visitorId, ILogicRouteElementDetailItem.ScheduleStatus status, double[] loadChange, double[] curCapacity, INodeDepot depotBeforeVisit, INodeDepot depotAfterVisit, com.dna.jopt.config.types.Position effectivePosition) LogicRouteElementDetailItem
(ZoneId zoneId, long arrivalTime, long departureTime, long transitionTime, long idleTime, boolean isUnlocatedIdleTime, long whiteSpaceIdleTime, long durationTime, double distance2prevElement, long earlyDeviationMillis, long lateDeviationMillis, int chosenOpeningHoursIndex, int chosenWorkingHoursIndex, String visitorId, ILogicRouteElementDetailItem.ScheduleStatus status, double[] curCapacity) -
Method Summary
Modifier and TypeMethodDescriptionstatic ZoneId
long
Gets the arrival time of theResource
at theNode
in milliseconds since UNIX timestamp.int
Gets theindex
of theOpeningHours
from theNode
.int
Gets theindex
of theWorkingHours
of theResource
.long
long
Deprecated.long
Gets the duration between the last location of theResource
to the specificNode
in milliseconds.long
Gets theearlyDeviationMillis
in milliseconds.com.dna.jopt.config.types.Position
Gets theNode
.long
Gets theidle time
that aResource
had to wait since it arrived prior to theOpeningHours
of theNode
in milliseconds.long
Gets thelateDeviationMillis
in milliseconds.double[]
Gets the load change.long
Gets theILogicRouteElementDetailItem.ScheduleStatus
, which either isUNKNOWN, EARLY, IDLE, INTIME
orLATE
.double
Gets the transition distance from the previous location of theResource
to theNode
inmeters
.long
Gets the time that was needed since the lastgeoLocation
, likely aINode
orIPillarNode
in milliseconds.Gets the visitor ID, which is the given name of theResource
.long
Gets thewhite space idle time
in milliseconds which is the time between thesetLocalMaxRouteStartReductionTimePillar
and the normalIWorkingHours
.boolean
Checksunlocated idle time
, which means theidle time
is happening on the way and not at theNode
.void
setArrivalTime
(long arrivalTime) void
setDepartureTime
(long depatureTime) void
setDistance2prevElement
(double distance2prevElement) void
setDurationTime
(long durationTime) void
setIdleTime
(long idleTime) void
setOriginalTransitionTime
(long originalTransitionTime) void
setTransitionTime
(long transitionTime) toString()
-
Constructor Details
-
LogicRouteElementDetailItem
public LogicRouteElementDetailItem(ZoneId zoneId, long arrivalTime, long departureTime, long transitionTime, long idleTime, boolean isUnlocatedIdleTime, long whiteSpaceIdleTime, long durationTime, double distance2prevElement, long earlyDeviationMillis, long lateDeviationMillis, int chosenOpeningHoursIndex, int chosenWorkingHoursIndex, String visitorId, ILogicRouteElementDetailItem.ScheduleStatus status, double[] curCapacity) -
LogicRouteElementDetailItem
public LogicRouteElementDetailItem(IOptimizationElement node, long arrivalTime, long departureTime, long transitionTime, long idleTime, boolean isUnlocatedIdleTime, long whiteSpaceIdleTime, long durationTime, double distance2prevElement, long earlyDeviationMillis, long lateDeviationMillis, int choosenOpeningHoursIndex, int choosenWorkingHoursIndex, String visitorId, ILogicRouteElementDetailItem.ScheduleStatus status, double[] loadChange, double[] curCapacity, INodeDepot depotBeforeVisit, INodeDepot depotAfterVisit, com.dna.jopt.config.types.Position effectivePosition)
-
-
Method Details
-
extractZoneId
-
setArrivalTime
public void setArrivalTime(long arrivalTime) -
setDepartureTime
public void setDepartureTime(long depatureTime) -
setDurationTime
public void setDurationTime(long durationTime) -
setTransitionTime
public void setTransitionTime(long transitionTime) -
setOriginalTransitionTime
public void setOriginalTransitionTime(long originalTransitionTime) -
getOriginalTransitionTime
public long getOriginalTransitionTime()- Specified by:
getOriginalTransitionTime
in interfaceILogicRouteElementDetailItem
-
setDistance2prevElement
public void setDistance2prevElement(double distance2prevElement) -
setIdleTime
public void setIdleTime(long idleTime) -
getScheduleStatus
Description copied from interface:ILogicRouteElementDetailItem
Gets theILogicRouteElementDetailItem.ScheduleStatus
, which either isUNKNOWN, EARLY, IDLE, INTIME
orLATE
. The default isUNKNOWN
.- Specified by:
getScheduleStatus
in interfaceILogicRouteElementDetailItem
- Returns:
- the
Status
-
getVisitorId
Description copied from interface:ILogicRouteElementDetailItem
Gets the visitor ID, which is the given name of theResource
.- Specified by:
getVisitorId
in interfaceILogicRouteElementDetailItem
- Returns:
- the string of the visitor ID
-
getArrivalTime
public long getArrivalTime()Description copied from interface:ILogicRouteElementDetailItem
Gets the arrival time of theResource
at theNode
in milliseconds since UNIX timestamp.- Specified by:
getArrivalTime
in interfaceILogicRouteElementDetailItem
- Returns:
- the long arrival time
-
getChosenOpeningHoursIndex
public int getChosenOpeningHoursIndex()Description copied from interface:ILogicRouteElementDetailItem
Gets theindex
of theOpeningHours
from theNode
.- Specified by:
getChosenOpeningHoursIndex
in interfaceILogicRouteElementDetailItem
- Returns:
- the int chosenOpeningHoursIndex
-
getChosenWorkingHoursIndex
public int getChosenWorkingHoursIndex()Description copied from interface:ILogicRouteElementDetailItem
Gets theindex
of theWorkingHours
of theResource
.- Specified by:
getChosenWorkingHoursIndex
in interfaceILogicRouteElementDetailItem
- Returns:
- the
choosenWorkingHoursIndex
-
getDepatureTime
Deprecated.Description copied from interface:ILogicRouteElementDetailItem
Gets the departure time of theResource
at theNode
in milliseconds since UNIX timestamp.- Specified by:
getDepatureTime
in interfaceILogicRouteElementDetailItem
- Returns:
- the long departure time in milliseconds
-
getDepartureTime
public long getDepartureTime()- Specified by:
getDepartureTime
in interfaceILogicRouteElementDetailItem
-
getLoadChange
public double[] getLoadChange()Description copied from interface:ILogicRouteElementDetailItem
Gets the load change. In case a node is requesting a pickup or delivery, the load change indicates how the load of the node changed after the visitation.- Specified by:
getLoadChange
in interfaceILogicRouteElementDetailItem
- Returns:
- the load change
-
getTransitionTime
public long getTransitionTime()Description copied from interface:ILogicRouteElementDetailItem
Gets the time that was needed since the lastgeoLocation
, likely aINode
orIPillarNode
in milliseconds.- Specified by:
getTransitionTime
in interfaceILogicRouteElementDetailItem
- Returns:
- the long transitionTime in milliseconds
-
getIdleTime
public long getIdleTime()Description copied from interface:ILogicRouteElementDetailItem
Gets theidle time
that aResource
had to wait since it arrived prior to theOpeningHours
of theNode
in milliseconds.If the return number is bigger than 0 the
INode.isWaitOnEarlyArrival()
is set totrue
and theILogicRouteElementDetailItem.ScheduleStatus
will be set toIDLE
. IfINode.isWaitOnEarlyArrival()
would be set tofalse
theILogicRouteElementDetailItem.ScheduleStatus
would be set toEARLY
and the return number would be 0 since theResource
is notidling
.- Specified by:
getIdleTime
in interfaceILogicRouteElementDetailItem
- Returns:
- the long idleTime
-
isUnlocatedIdleTime
public boolean isUnlocatedIdleTime()Description copied from interface:ILogicRouteElementDetailItem
Checksunlocated idle time
, which means theidle time
is happening on the way and not at theNode
. TheResource
will arrive at theNode
when the work is starting. The default value isfalse
.- Specified by:
isUnlocatedIdleTime
in interfaceILogicRouteElementDetailItem
- Returns:
- the boolean of
isUnlocatedIdleTime
-
getWhiteSpaceIdleTime
public long getWhiteSpaceIdleTime()Description copied from interface:ILogicRouteElementDetailItem
Gets thewhite space idle time
in milliseconds which is the time between thesetLocalMaxRouteStartReductionTimePillar
and the normalIWorkingHours
. ThemaxRouteStartReductionTimePillar
can only be used by anIPillarNode
.- Specified by:
getWhiteSpaceIdleTime
in interfaceILogicRouteElementDetailItem
- Returns:
- the
whiteSpaceIdleTime
-
getDurationTime
public long getDurationTime()Description copied from interface:ILogicRouteElementDetailItem
Gets the duration between the last location of theResource
to the specificNode
in milliseconds.- Specified by:
getDurationTime
in interfaceILogicRouteElementDetailItem
- Returns:
- the long duration time
-
getEarlyDeviation
public long getEarlyDeviation()Description copied from interface:ILogicRouteElementDetailItem
Gets theearlyDeviationMillis
in milliseconds.- Specified by:
getEarlyDeviation
in interfaceILogicRouteElementDetailItem
- Returns:
- the
earlyDeviationMillis
-
getLateDeviation
public long getLateDeviation()Description copied from interface:ILogicRouteElementDetailItem
Gets thelateDeviationMillis
in milliseconds.- Specified by:
getLateDeviation
in interfaceILogicRouteElementDetailItem
- Returns:
- the
lateDeviationMillis
-
getTransitionDistance
public double getTransitionDistance()Description copied from interface:ILogicRouteElementDetailItem
Gets the transition distance from the previous location of theResource
to theNode
inmeters
.- Specified by:
getTransitionDistance
in interfaceILogicRouteElementDetailItem
- Returns:
- the double from the previous element
-
getElement
Description copied from interface:ILogicRouteElementDetailItem
Gets theNode
.- Specified by:
getElement
in interfaceILogicRouteElementDetailItem
- Returns:
- the iOptimizationElement
-
getNodeDepotAfterVisit
- Specified by:
getNodeDepotAfterVisit
in interfaceILogicRouteElementDetailItem
-
getNodeDepotBeforeVisit
- Specified by:
getNodeDepotBeforeVisit
in interfaceILogicRouteElementDetailItem
-
getEffectivePosition
public com.dna.jopt.config.types.Position getEffectivePosition()- Specified by:
getEffectivePosition
in interfaceILogicRouteElementDetailItem
-
toString
-