Class Entity
- All Implemented Interfaces:
IEntity,Serializable,Cloneable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRoute(int index, ILogicEntityRoute logicRoute) Adds aILogicEntityRouteat theindexposition, shifting theRouteat that position to the right and updating allindexesvoidaddRoute(ILogicEntityRoute logicRoute) Adds anILogicEntityRoute.copy()Copies the currentIEntity.exchangeExistingRoutesWithClones(List<ILogicEntityRoute> existingRoutes) exchangeExistingRouteWithClone(ILogicEntityRoute existingRoute) booleanexchangeExistingRouteWithExistingRoute(ILogicEntityRoute existingRouteOrg, ILogicEntityRoute existingRouteReplace) Gets allIOptimizationElementsof theIEntity.getAllRoutesElements(String resourceId) Returns allILogicEntityRoutewithanchorNodes, which are essentiallyIPillarNodesoverwriting the start or end of aRoute.longgetElement(String id) getElement(String id, boolean ignoreStartEnd) com.dna.jopt.framework.firstentitycreation.IEntityArrangerGets theIEntityArranger, responsible for creating a hard constraints freeIEntity.Gets theIEntityInvokedOperatorController.getFirstMatchingRoute(INode node) getFirstMatchingRoute(String nodeId) Returns the firstILogicEntityRoutein which theINodeorIPillarNodewith the inputnodeIdwas found.doubleGets thejoined costwhich is the accumulated sum ofinternal costof allIlogicEntityRoutesof theIEntity.Gets theIJoinedEntityDetailControllerwhich is assessing the times and distances of theILogicEntityRoutes.Gets theIMultiWorkingHoursConstraintControllerwhich controls the costs for violatingIConstraintsorIWorkingHours.Gets all theIOptimizationElementsthat will not be optimized anymore because they are in the past for example.Gets allIOptimizationElementof allILogicEntityRoutes.getRoute(int index) Gets theILogicEntityRouteaccording to theindex.getRouteByResourceAndWorkingHoursIndex(IResource res, int index) intGets the current number ofRoutes.Gets the routeiterator.Gets the wholelistofILogicEntityRoutes.getRoutesContainingElementId(String elementId) getRoutesContainingElementId(String elementId, boolean ignoreStartEnd) getRoutesContainingElementId(String elementId, String visitor, boolean ignoreStartEnd) intGets the number of allIOptimizationElement.intintintGets the total number ofIOptimizationElementswithin theILogicEntityRoutes.intintbooleanbooleanhasResource(String resourceId) booleanpartialCopy(List<ILogicEntityRoute> routes2BeCopied) Returns anIEntityin which only the inputILogicEntityRoutesare actual copies, the rest of theIEntityconsists of references to the originalObject.partialCopyExchangeExistingRoute(ILogicEntityRoute existingRouteOrg, ILogicEntityRoute existingRouteReplace) voidremoveRoute(int index) voidremoveRoute(ILogicEntityRoute remRoute) Removes anILogicEntityRoutefrom anIEntity.voidsetEntityArranger(com.dna.jopt.framework.firstentitycreation.IEntityArranger entityArranger) Sets theIEntityArranger.voidvoidSets theIEntityInvokedOperatorControllerwhich holds information oncost advantageof the last usedOperatoretc.voidsetIsRequestAllRoutesElementDetails(boolean requestAllElementDetails) Sets theresultrequestedvalue of allILogicEntityRoutes.voidsetIsUnassessed(boolean isUnassessed) Sets theunassessedstatus.voidsetJoinedCost(double cost) Sets thejoined costwhich is the accumulated sum ofinternal costof allIlogicEntityRoutesof theIEntity.voidsetJoinedDetailController(IJoinedEntityDetailController joinedDetailController) Sets theIJoinedEntityDetailControllerwhich is assessing the times and distances of theILogicEntityRoutes.voidSets theIMultiWorkingHoursConstraintControllerwhich controls the costs for violatingIConstraintsorIWorkingHours.voidsetRelationShipController(IRelationshipController controller) voidsetRoutes(List<ILogicEntityRoute> routes) Prints the result of theIOptimizationwith the number ofILogicEntityRoute, number ofIOptimizationElement, total time, distance, idle time etc.toString()Returns aStringrepresenting theIEntityobject.toString(boolean showNonSchedudledRoutes) voidInstantiates a newIJoinedEntityDetailControllerand adds the values of allILogicEntityRoutethat were notunassigned.voidAdds the value ofdistance, idle time, productive time, transit timeetc of the inputILogicEntityRouteto theIJoinedEntityDetailControllerof theIEntity.
-
Constructor Details
-
Entity
public Entity()
-
-
Method Details
-
getBuildTimeStamp
public long getBuildTimeStamp()- Specified by:
getBuildTimeStampin interfaceIEntity
-
setIsUnassessed
public void setIsUnassessed(boolean isUnassessed) Description copied from interface:IEntitySets theunassessedstatus.Being marked as
unassessedmeans that thisObjectwill have to go throughassessmentagain. For complete solutions theILogicEntityRoutesand allIEntitieshave to be assessed. When anINodeis shifted from oneRouteto another by anIOperatorthe respectiveRoutesandEntityneed to be marked asunassessedin order to getassessedagain updating theircostssince they might have changed. AnEntityalso needs to be set asunassessedwhenIEntity.setIsRequestAllRoutesElementDetails(boolean)is set totrue. By doing this theRouteswill automatically be set tounassessedsince they need to go through a newassessmentin order to save theILogicRouteElementDetailItem- Specified by:
setIsUnassessedin interfaceIEntity- Parameters:
isUnassessed- the boolean to set
-
isUnassessed
public boolean isUnassessed()Description copied from interface:IEntity- Specified by:
isUnassessedin interfaceIEntity- Returns:
- the set
value
-
setRelationShipController
Description copied from interface:IEntity- Specified by:
setRelationShipControllerin interfaceIEntity- Parameters:
controller- the iRelationshipController to set
-
getRelationshipController
Description copied from interface:IEntity- Specified by:
getRelationshipControllerin interfaceIEntity- Returns:
- details on the relationship
-
setMultiWorkingHoursConstraintController
public void setMultiWorkingHoursConstraintController(IMultiWorkingHoursConstraintController controller) Description copied from interface:IEntitySets theIMultiWorkingHoursConstraintControllerwhich controls the costs for violatingIConstraintsorIWorkingHours.- Specified by:
setMultiWorkingHoursConstraintControllerin interfaceIEntity- Parameters:
controller- the iMultiWorkingHoursConstraintController to set
-
getMultiWorkingHoursConstraintController
Description copied from interface:IEntityGets theIMultiWorkingHoursConstraintControllerwhich controls the costs for violatingIConstraintsorIWorkingHours.- Specified by:
getMultiWorkingHoursConstraintControllerin interfaceIEntity- Returns:
- the
IMultiWorkingHoursConstraintController
-
setJoinedCost
public void setJoinedCost(double cost) Description copied from interface:IEntitySets thejoined costwhich is the accumulated sum ofinternal costof allIlogicEntityRoutesof theIEntity.- Specified by:
setJoinedCostin interfaceIEntity- Parameters:
cost- the double internal costs of the wholeIEntity
-
getJoinedCost
public double getJoinedCost()Description copied from interface:IEntityGets thejoined costwhich is the accumulated sum ofinternal costof allIlogicEntityRoutesof theIEntity.- Specified by:
getJoinedCostin interfaceIEntity- Returns:
- the total of internal costs of the
IEntity
-
getEntityCostAndViolationController
Description copied from interface:IEntity- Specified by:
getEntityCostAndViolationControllerin interfaceIEntity- Returns:
- the
IEntityCostAndViolationController
-
setEntityCostAndViolationController
Description copied from interface:IEntity- Specified by:
setEntityCostAndViolationControllerin interfaceIEntity- Parameters:
controller- the iEntityCostAndViolationController
-
addRoute
Description copied from interface:IEntityAdds anILogicEntityRoute. -
addRoute
Description copied from interface:IEntityAdds aILogicEntityRouteat theindexposition, shifting theRouteat that position to the right and updating allindexes -
removeRoute
Description copied from interface:IEntityRemoves anILogicEntityRoutefrom anIEntity.- Specified by:
removeRoutein interfaceIEntity- Parameters:
remRoute- the route to remove
-
removeRoute
public void removeRoute(int index) Description copied from interface:IEntity- Specified by:
removeRoutein interfaceIEntity- Parameters:
index- the int index
-
setIsRequestAllRoutesElementDetails
public void setIsRequestAllRoutesElementDetails(boolean requestAllElementDetails) Description copied from interface:IEntitySets theresultrequestedvalue of allILogicEntityRoutes. If set totruetheILogicRouteElementDetailItemsare getting saved.- Specified by:
setIsRequestAllRoutesElementDetailsin interfaceIEntity- Parameters:
requestAllElementDetails- the boolean to set
-
getRouteIterator
Description copied from interface:IEntityGets the routeiterator.- Specified by:
getRouteIteratorin interfaceIEntity- Returns:
- the route iterator
-
getRouteCount
public int getRouteCount()Description copied from interface:IEntityGets the current number ofRoutes.- Specified by:
getRouteCountin interfaceIEntity- Returns:
- the route count
- See Also:
-
getUnScheduledRoutesCount
public int getUnScheduledRoutesCount()- Specified by:
getUnScheduledRoutesCountin interfaceIEntity
-
getRoute
Description copied from interface:IEntityGets theILogicEntityRouteaccording to theindex. -
setRoutes
Description copied from interface:IEntitySets the inputILogicEntityRouteas theILogicEntityRoutesof anIEntity. This method should ONLY be used for copy/clone. In addition this method is not adapting the tutorEntity automatically. This has to be done externally. -
getTotalRoutesOptimizableElementsCount
public int getTotalRoutesOptimizableElementsCount()Description copied from interface:IEntityGets the total number ofIOptimizationElementswithin theILogicEntityRoutes.- Specified by:
getTotalRoutesOptimizableElementsCountin interfaceIEntity- Returns:
- the total route element count
-
getTotalRoutesDistinctElementsCount
public int getTotalRoutesDistinctElementsCount()Description copied from interface:IEntityGets the number of allIOptimizationElement.- Specified by:
getTotalRoutesDistinctElementsCountin interfaceIEntity- Returns:
- the number of
Elementsin all theRoute
-
getTotalRoutesDistinctNodesCount
public int getTotalRoutesDistinctNodesCount()- Specified by:
getTotalRoutesDistinctNodesCountin interfaceIEntity
-
getTotalRoutesDistinctPillarsCount
public int getTotalRoutesDistinctPillarsCount()- Specified by:
getTotalRoutesDistinctPillarsCountin interfaceIEntity
-
getTotalRoutesResourceCount
public int getTotalRoutesResourceCount()- Specified by:
getTotalRoutesResourceCountin interfaceIEntity
-
getRoutes
Description copied from interface:IEntityGets the wholelistofILogicEntityRoutes. -
exchangeExistingRouteWithExistingRoute
public boolean exchangeExistingRouteWithExistingRoute(ILogicEntityRoute existingRouteOrg, ILogicEntityRoute existingRouteReplace) Description copied from interface:IEntityReplaces anILogicEntityRoutewith anotherILogicEntityRoutein all theEntities.This is used in
lockdown.- Specified by:
exchangeExistingRouteWithExistingRoutein interfaceIEntity- Parameters:
existingRouteOrg- the iLogicEntityRoute to replaceexistingRouteReplace- the ILogicEntityRoute that will be put in its stead- Returns:
trueif the operation was successful
-
exchangeExistingRouteWithClone
Description copied from interface:IEntity- Specified by:
exchangeExistingRouteWithClonein interfaceIEntity- Parameters:
existingRoute- the iLogicEntityRoute that is replaced with a copy- Returns:
- the cloned
ILogicEntityRoute
-
exchangeExistingRoutesWithClones
public List<ILogicEntityRoute> exchangeExistingRoutesWithClones(List<ILogicEntityRoute> existingRoutes) Description copied from interface:IEntity- Specified by:
exchangeExistingRoutesWithClonesin interfaceIEntity- Parameters:
existingRoutes- the iLogicEntityRoutes that are replaced with a copy- Returns:
- the copied list of the input
-
partialCopy
Description copied from interface:IEntityReturns anIEntityin which only the inputILogicEntityRoutesare actual copies, the rest of theIEntityconsists of references to the originalObject. This shallow copy allows to make modifications to the respectiveRoutesof anIEntitywhile demanding less performance than a full copy.- Specified by:
partialCopyin interfaceIEntity- Parameters:
routes2BeCopied- the iLogicEntityRoutes which are copied- Returns:
- an
Objectcontaining references to the originalIEntitywhile the inputRoutesare copies
-
partialCopyExchangeExistingRoute
public IEntity partialCopyExchangeExistingRoute(ILogicEntityRoute existingRouteOrg, ILogicEntityRoute existingRouteReplace) - Specified by:
partialCopyExchangeExistingRoutein interfaceIEntity
-
copy
Description copied from interface:IEntityCopies the currentIEntity. -
toOverviewResult
Description copied from interface:IEntityPrints the result of theIOptimizationwith the number ofILogicEntityRoute, number ofIOptimizationElement, total time, distance, idle time etc.- Specified by:
toOverviewResultin interfaceIEntity- Returns:
- an overview of the result
-
toString
Description copied from interface:IEntityReturns aStringrepresenting theIEntityobject.Some information is given on the
ILogicEntityRouteslike theproductive timeand theidle time. -
toString
-
getJoinedDetailController
Description copied from interface:IEntityGets theIJoinedEntityDetailControllerwhich is assessing the times and distances of theILogicEntityRoutes.- Specified by:
getJoinedDetailControllerin interfaceIEntity- Returns:
- the
IJoinedEntityDetailController
-
setJoinedDetailController
Description copied from interface:IEntitySets theIJoinedEntityDetailControllerwhich is assessing the times and distances of theILogicEntityRoutes.- Specified by:
setJoinedDetailControllerin interfaceIEntity- Parameters:
joinedDetailController- the iJoinedEntityDetailController to set
-
getRouteViolationSummaries
Description copied from interface:IEntity- Specified by:
getRouteViolationSummariesin interfaceIEntity- Returns:
- the summarized IViolations
-
setEntityArranger
public void setEntityArranger(com.dna.jopt.framework.firstentitycreation.IEntityArranger entityArranger) Description copied from interface:IEntitySets theIEntityArranger.- Specified by:
setEntityArrangerin interfaceIEntity- Parameters:
entityArranger- the iEntityArranger
-
getEntityArranger
public com.dna.jopt.framework.firstentitycreation.IEntityArranger getEntityArranger()Description copied from interface:IEntityGets theIEntityArranger, responsible for creating a hard constraints freeIEntity.- Specified by:
getEntityArrangerin interfaceIEntity- Returns:
- the
IEntityArranger
-
getEntityInvokedOperatorController
Description copied from interface:IEntityGets theIEntityInvokedOperatorController.- Specified by:
getEntityInvokedOperatorControllerin interfaceIEntity- Returns:
- the
IEntityInvokedOperatorControllerwhich holds information oncost advantageof the lastOperatoretc.
-
setEntityInvokedOperatorController
Description copied from interface:IEntitySets theIEntityInvokedOperatorControllerwhich holds information oncost advantageof the last usedOperatoretc.- Specified by:
setEntityInvokedOperatorControllerin interfaceIEntity- Parameters:
opc- the iEntityInvokedOperatorController
-
updateJointEntityBaseValueWithRoute
Description copied from interface:IEntityAdds the value ofdistance, idle time, productive time, transit timeetc of the inputILogicEntityRouteto theIJoinedEntityDetailControllerof theIEntity.- Specified by:
updateJointEntityBaseValueWithRoutein interfaceIEntity- Parameters:
route- the iLogicEntityRoute of which the values should be added
-
updateJointEntityBaseValueWithOwnRoutes
public void updateJointEntityBaseValueWithOwnRoutes()Description copied from interface:IEntityInstantiates a newIJoinedEntityDetailControllerand adds the values of allILogicEntityRoutethat were notunassigned.- Specified by:
updateJointEntityBaseValueWithOwnRoutesin interfaceIEntity
-
getAllEntityElements
Description copied from interface:IEntityGets allIOptimizationElementsof theIEntity.- Specified by:
getAllEntityElementsin interfaceIEntity- Returns:
- all
IOptimizationElements
-
getAllNodes
- Specified by:
getAllNodesin interfaceIEntity
-
getAllResources
- Specified by:
getAllResourcesin interfaceIEntity
-
getAllRoutesElements
Description copied from interface:IEntity- Specified by:
getAllRoutesElementsin interfaceIEntity- Parameters:
resourceId- the string to search for- Returns:
- the search results containing the input
-
getResourceFirstOccurenceAbsoluteIndexMap
- Specified by:
getResourceFirstOccurenceAbsoluteIndexMapin interfaceIEntity
-
getFirstMatchingRoute
Description copied from interface:IEntityReturns the firstILogicEntityRoutein which theINodeorIPillarNodewith the inputnodeIdwas found.- Specified by:
getFirstMatchingRoutein interfaceIEntity- Parameters:
nodeId- the string Id of theNodeto look for.- Returns:
- the
Routein which theNodeorPillarwas found.
-
getRoutesByResource
- Specified by:
getRoutesByResourcein interfaceIEntity
-
getRouteByResourceAndWorkingHoursIndex
- Specified by:
getRouteByResourceAndWorkingHoursIndexin interfaceIEntity
-
getAnchoredRoutes
Description copied from interface:IEntityReturns allILogicEntityRoutewithanchorNodes, which are essentiallyIPillarNodesoverwriting the start or end of aRoute.- Specified by:
getAnchoredRoutesin interfaceIEntity- Returns:
- the list of
RouteswithanchorNodes
-
getFirstMatchingRoute
Description copied from interface:IEntity- Specified by:
getFirstMatchingRoutein interfaceIEntity- Parameters:
node- the iNode to look for- Returns:
- the first found
Routecontaining theNode
-
hasResource
Description copied from interface:IEntity- Specified by:
hasResourcein interfaceIEntity- Parameters:
resourceId- the stringIdto search for- Returns:
trueif aResourcecontaining thisIdexists
-
hasNode
Description copied from interface:IEntity -
getRoutesContainingElementId
- Specified by:
getRoutesContainingElementIdin interfaceIEntity
-
getRoutesContainingElementId
public List<ILogicEntityRoute> getRoutesContainingElementId(String elementId, boolean ignoreStartEnd) - Specified by:
getRoutesContainingElementIdin interfaceIEntity
-
getRoutesContainingElementId
public Optional<ILogicEntityRoute> getRoutesContainingElementId(String elementId, String visitor, boolean ignoreStartEnd) - Specified by:
getRoutesContainingElementIdin interfaceIEntity
-
getNoneOptimizableElements
Description copied from interface:IEntityGets all theIOptimizationElementsthat will not be optimized anymore because they are in the past for example.- Specified by:
getNoneOptimizableElementsin interfaceIEntity- Returns:
- the list of
noneOptimizableElements
-
getOptimizableElements
Description copied from interface:IEntityGets allIOptimizationElementof allILogicEntityRoutes.- Specified by:
getOptimizableElementsin interfaceIEntity- Returns:
- all
optimizable Elements
-
getElement
- Specified by:
getElementin interfaceIEntity
-
getElement
- Specified by:
getElementin interfaceIEntity
-