Package com.dna.jopt.member.bucket.route
Interface ILogicEntityRoute
- All Superinterfaces:
Cloneable,Serializable
- All Known Implementing Classes:
LogicEntityRoute
This Interface provides the methods to get information about certain
Route IOptimizationElements like the
INodes, the IResource,
getting the IDutyHours and much more.
IEntityInvokedOperatorController- Since:
- 08/08/2018
- Version:
- 13/02/2020
- Author:
- DNA
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAllToNoneOptimizableElements(List<IOptimizationElement> routeOptimizableElements) booleanaddAllToOptimizableElements(int index, List<? extends IOptimizationElement> addList) booleanaddAllToOptimizableElements(List<? extends IOptimizationElement> addList) booleanvoidaddFlag(LogicEntityRouteFlag flag) voidvoidaddOptimizableElement(IOptimizationElement element, int index) voidaddOptionalOptimizableElement(IOptimizationElement optionalElement) voidaddRoutePillar(IPillarNode pillar) voidaddRoutePillar(IPillarNode pillar, int index) voidaddRoutePillars(List<IPillarNode> pillars) voidvoidvoidvoidcopy()getConnectionHook(String toId) Gets theIResourcethat is visiting thisRoute.intlonglonggetElement(String id, boolean ignoreStartEnd) getFlags()doubledoubleGets theListIteratorfor theNoneOptimizableElements.Gets theListIteratorfor theoptimizable Elements.getOptimizableElementsSubList(int fromIndex, int toIndex) longlonglonglongMap<Class<? extends IQualification>,IQualification> Returns theLogicEntityRoute.currentRouteDutyHoursof thisLogicEntityRoute.intgetRouteOptimizableElement(int index) intGets theIOptimizationElementwhere theRoutestarts.longGets theRoutestart time in milliseconds since 01.01.1970.longGets theIOptimizationElementwhere theRoutewill end.longdoubleGets the unique route resource ident.booleanbooleanbooleanbooleanbooleanhasSameElementsStructure(ILogicEntityRoute compareRoute) booleanhasSameElementsStructureIgnorePillars(ILogicEntityRoute compareRoute, boolean doIgnorePillars) voidvoidinitRouteWorkingHours(IDutyHours fakeHours) booleanReturns whetherLogicEntityRoute.getCurrentWorkingHours()is closed or not.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidintnumNodes()longputEffectivePillarLatestArrivalOffset(IPillarNode p, Long valueMillis) booleanremoveAllFromOptimizableElements(List<? extends IOptimizationElement> removeList) booleanremoveOptimizableElement(int index) removeRoutePillar(int index) removeRoutePillar(IPillarNode pillar) voidremoveRoutePillars(List<IPillarNode> pillars) voidsetAdditionalRouteStartOffset(Optional<Long> offsetMillisOpt) voidsetCurrentVisitingResource(IResource res, int workingHourIndex) voidsetCurrentVisitingResourceWorkingHoursIndex(int index) voidsetEffectivePillarLatestArrivalMap(Map<String, Long> effectivePillarLatestArrivalMap) voidsetEffectivePillarLatestArrivalOffsetMap(Map<String, Long> effectivePillarLatestArrivalOffsetMap) voidsetFirstGeoElementWithinRoute(IOptimizationElement firstGeoLocationElementWithinRoute) voidsetIsInactive(boolean isInactive) voidsetIsLockedDown(boolean isLockedDown) voidsetIsScheduled(boolean isScheduled) voidsetIsUnassessed(boolean isUnassessed) voidsetLastGeoElementWithinRoute(IOptimizationElement lastGeoLocationElementWithinRoute) voidsetLastLockdownStopTime(Optional<Long> lastLockdownStopTime) voidvoidsetRequestElementDetails(boolean requestDetails) Setsresult requestedresulting in theILogicRouteElementDetailItembeing saved and being accessable afterwards.voidsetRouteClusterController(IClusterController routeClusterController) voidvoidsetRouteId(int routeId) voidvoidsetRouteOptimizableElements(List<IOptimizationElement> elements) Sets theIOptimizationElements.This method should NOT used directly only together with copy.voidvoidsetRoutePillars(List<IPillarNode> pillars) voidsetRouteStart(IOptimizationElement startItem) SetsIOptimizationElementwhere the route will start.voidsetRouteTermination(IOptimizationElement terminationItem) Sets theIOptimizationElementwhere theRoutewill end.toString()
-
Method Details
-
getOptimizableElementIterator
ListIterator<IOptimizationElement> getOptimizableElementIterator()Gets theListIteratorfor theoptimizable Elements.- Returns:
- the iterator
-
getNoneOptimizableElementIterator
ListIterator<IOptimizationElement> getNoneOptimizableElementIterator()Gets theListIteratorfor theNoneOptimizableElements.- Returns:
- the iterator
-
getRouteOptimizableElement
- Parameters:
index- the int index- Returns:
- the Element
-
getRouteOptimizableElements
List<IOptimizationElement> getRouteOptimizableElements()- Returns:
- the list of
Elements
-
setRouteOptimizableElements
Sets theIOptimizationElements.This method should NOT used directly only together with copy.- Parameters:
elements- the new route elements
-
getCurrentVisitingResource
IResource getCurrentVisitingResource()Gets theIResourcethat is visiting thisRoute.- Returns:
- the object
IResource
-
getCurrentVisitingResourceWorkingHoursIndex
int getCurrentVisitingResourceWorkingHoursIndex()- Returns:
- the index
-
getRouteTermination
IOptimizationElement getRouteTermination()Gets theIOptimizationElementwhere theRoutewill end.If
Routetermination has not been overwritten it will be at the location of theIResourceor at anone night stay Node. IfRoute terminationhas been overwritten it will be at theanchorNode.- Returns:
- the
Elementwhere theRouteterminates
-
setRouteTermination
Sets theIOptimizationElementwhere theRoutewill end.- Parameters:
terminationItem- the iOptimizationElement
-
getRouteStart
IOptimizationElement getRouteStart()Gets theIOptimizationElementwhere theRoutestarts.- Returns:
- the start of the
Route
-
setRouteStart
SetsIOptimizationElementwhere the route will start.- Parameters:
startItem- the iOptimizationElement where the route has to start
-
getRouteStartTime
long getRouteStartTime()Gets theRoutestart time in milliseconds since 01.01.1970.- Returns:
- the milliseconds since
Routestart
-
addOptimizableElement
- Parameters:
element- iOptimizationElement to add
-
addOptimizableElement
-
removeOptimizableElement
-
removeOptimizableElement
-
setCurrentVisitingResource
-
removeAllFromOptimizableElements
-
getRouteCostAndViolationController
ILogicRouteCostAndViolationController getRouteCostAndViolationController() -
getRouteElementsDetailController
ILogicRouteElementDetailController getRouteElementsDetailController() -
getJoinedDetailController
IJoinedRouteDetailController getJoinedDetailController() -
toString
String toString() -
getRouteId
int getRouteId() -
getRouteOptimizableElementCount
int getRouteOptimizableElementCount() -
isUnassessed
boolean isUnassessed() -
setIsUnassessed
void setIsUnassessed(boolean isUnassessed) -
getOptimizableElementsSubList
-
addAllToOptimizableElements
-
addAllToOptimizableElements
-
copy
ILogicEntityRoute copy() -
setCurrentVisitingResourceWorkingHoursIndex
void setCurrentVisitingResourceWorkingHoursIndex(int index) -
setRouteId
void setRouteId(int routeId) -
clearOptimizableElements
void clearOptimizableElements() -
clearNoneOptimizableElements
void clearNoneOptimizableElements() -
isLastOptimizableElementInRoute
-
isFirstOptimizableElementInRoute
-
addRoutePillar
-
hasRoutePillars
boolean hasRoutePillars() -
getRoutePillars
List<IPillarNode> getRoutePillars() -
getRouteDutyHours
IDutyHours getRouteDutyHours()Returns theLogicEntityRoute.currentRouteDutyHoursof thisLogicEntityRoute.- Returns:
- the
LogicEntityRoute.currentRouteDutyHours
-
initRouteWorkingHours
void initRouteWorkingHours() -
setRoutePillars
-
setRequestElementDetails
void setRequestElementDetails(boolean requestDetails) Setsresult requestedresulting in theILogicRouteElementDetailItembeing saved and being accessable afterwards. This will seen by the cost assessor. After one request theILogicEntityRouteautomatically is set back to no request.- Parameters:
requestDetails- the boolean whether theILogicRouteElementDetailItemshould be saved
-
isRequestElementDetails
boolean isRequestElementDetails() -
isFinalized
boolean isFinalized() -
getRouteNoneOptimizableElements
List<IOptimizationElement> getRouteNoneOptimizableElements() -
setRouteNoneOptimizableElements
-
addAllToNoneOptimizableElements
-
addRoutePillars
-
getRouteStopTime
long getRouteStopTime() -
removeRoutePillar
-
getEffectiveRouteStartTime
long getEffectiveRouteStartTime() -
getEffectiveRouteStopTime
long getEffectiveRouteStopTime() -
getMaxWorkingHours
double getMaxWorkingHours() -
getMaxDistanceKilometer
double getMaxDistanceKilometer() -
addRoutePillar
-
setEffectivePillarLatestArrivalMap
-
getPillarLatestEffectiveArrival
-
isScheduled
boolean isScheduled() -
setIsScheduled
void setIsScheduled(boolean isScheduled) -
removeRoutePillars
-
clearRoutePillars
void clearRoutePillars() -
setRouteCostAndViolationController
-
addOptionalOptimizableElement
-
hasSameElementsStructure
-
setRouteOptionalOptimizableElements
-
getRouteOptionalOptimizableElements
List<IOptimizationElement> getRouteOptionalOptimizableElements() -
addAllToOptionalOptimizableElements
-
hasSameElementsStructureIgnorePillars
boolean hasSameElementsStructureIgnorePillars(ILogicEntityRoute compareRoute, boolean doIgnorePillars) -
removeRoutePillar
-
isClosedRoute
boolean isClosedRoute()Returns whetherLogicEntityRoute.getCurrentWorkingHours()is closed or not.- Returns:
- boolean, default value
false. ReturnstrueifIWorkingHours.isClosedRoute()has been set totrueby usingIWorkingHours.setIsClosedRoute(boolean).
-
markAsToBeRemoved
void markAsToBeRemoved() -
isMarkedToBeRemoved
boolean isMarkedToBeRemoved() -
getRouteTimeMillis
long getRouteTimeMillis() -
getMaxRouteStartReductionTimeMillis
-
getMaxRouteStartReductionTimeMillisPillar
-
isReductionTimeIncludedInWorkingTime
-
isReductionTimeOnlyUsedForDriving
-
isReductionTimeOnlyUsedForDrivingPillar
-
getFlexTimeMillis
-
getMaxPillarAfterHoursTime
-
getTotalRouteDistanceMeter
double getTotalRouteDistanceMeter() -
getMaxFreePostWorkDrivingTerminationTimeMillis
-
hasOverriddenRouteStart
boolean hasOverriddenRouteStart() -
hasOverriddenRouteTermination
boolean hasOverriddenRouteTermination() -
initRouteWorkingHours
-
getPillarLatestEffectiveOffsetArrival
-
putEffectivePillarLatestArrivalOffset
-
getPillarEffectiveLatestArrivalMinusStartMillis
-
getPillarLatestEffectiveArrivalOffsetCorrected
-
setEffectivePillarLatestArrivalOffsetMap
-
getEffectivePillarLatestArrivalOffsetMap
-
clearOptionalOptimizableElements
void clearOptionalOptimizableElements() -
getQualifications
Map<Class<? extends IQualification>,IQualification> getQualifications() -
addFlag
-
getFlags
List<LogicEntityRouteFlag> getFlags() -
setFirstGeoElementWithinRoute
-
setLastGeoElementWithinRoute
-
getFirstGeoElementWithinRoute
IOptimizationElement getFirstGeoElementWithinRoute() -
getLastGeoElementWithinRoute
IOptimizationElement getLastGeoElementWithinRoute() -
getAllElements
List<IOptimizationElement> getAllElements() -
setIsInactive
void setIsInactive(boolean isInactive) -
isInactive
boolean isInactive() -
setIsLockedDown
void setIsLockedDown(boolean isLockedDown) -
isLockedDown
boolean isLockedDown() -
getLoadController
ILoadController getLoadController() -
setLoadController
-
getResourceDepot
Optional<IResourceDepot> getResourceDepot() -
getEffectivePillarLatestArrivalMap
-
getRouteOptimizableElementsIncludingSubsequentNodes
List<IOptimizationElement> getRouteOptimizableElementsIncludingSubsequentNodes() -
removeAllFromOptimizableElementsInlcudingSubsequentNodes
boolean removeAllFromOptimizableElementsInlcudingSubsequentNodes(List<IOptimizationElement> removeList) -
getRouteClusterController
IClusterController getRouteClusterController() -
setRouteClusterController
-
getRouteStartShiftMillisHook
-
getConnectionHook
-
isOnlyApplyFreePostWorkDrivingOnOvertime
-
getElement
-
hasNode
-
getLastLockdownStopTime
-
setLastLockdownStopTime
-
setAdditionalRouteStartOffset
-
getAdditionalRouteStartOffset
-
getAllNodes
Set<IOptimizationElement> getAllNodes() -
numNodes
int numNodes() -
getUniqueRouteResourceIdent
String getUniqueRouteResourceIdent()Gets the unique route resource ident. This is as unique as the RouteId. However, when only a detail-item of a node is present, the UniqueRouteResourceIdent can be calculated from it what allows identification without knowing the whole solution.- Returns:
- the unique route resource ident.
-