public class Entity extends Object implements IEntity
Constructor and Description |
---|
Entity() |
public long getBuildTimeStamp()
getBuildTimeStamp
in interface IEntity
public void setIsUnassessed(boolean isUnassessed)
IEntity
unassessed
status.
Being marked as unassessed
means that this Object
will have to go through
assessment
again. For complete solutions the ILogicEntityRoutes
and all IEntities
have to be assessed. When an INode
is shifted from one Route
to another by an IOperator
the respective Routes
and Entity
need to be marked as unassessed
in order to get assessed
again updating
their costs
since they might have changed. An Entity
also needs to be set as
unassessed
when IEntity.setIsRequestAllRoutesElementDetails(boolean)
is set to true
. By doing this the Routes
will automatically be set to unassessed
since
they need to go through a new assessment
in order to save the ILogicRouteElementDetailItem
setIsUnassessed
in interface IEntity
isUnassessed
- the boolean to setpublic boolean isUnassessed()
IEntity
isUnassessed
in interface IEntity
value
public void setRelationShipController(IRelationshipController controller)
IEntity
setRelationShipController
in interface IEntity
controller
- the iRelationshipController to setpublic IRelationshipController getRelationshipController()
IEntity
getRelationshipController
in interface IEntity
public void setMultiWorkingHoursConstraintController(IMultiWorkingHoursConstraintController controller)
IEntity
IMultiWorkingHoursConstraintController
which controls the costs for violating
IConstraints
or IWorkingHours
.setMultiWorkingHoursConstraintController
in interface IEntity
controller
- the iMultiWorkingHoursConstraintController to setpublic IMultiWorkingHoursConstraintController getMultiWorkingHoursConstraintController()
IEntity
IMultiWorkingHoursConstraintController
which controls the costs for violating
IConstraints
or IWorkingHours
.getMultiWorkingHoursConstraintController
in interface IEntity
IMultiWorkingHoursConstraintController
public void setJoinedCost(double cost)
IEntity
joined cost
which is the accumulated sum of internal cost
of all
IlogicEntityRoutes
of the IEntity
.setJoinedCost
in interface IEntity
cost
- the double internal costs of the whole IEntity
public double getJoinedCost()
IEntity
joined cost
which is the accumulated sum of internal cost
of all
IlogicEntityRoutes
of the IEntity
.getJoinedCost
in interface IEntity
IEntity
public IEntityCostAndViolationController getEntityCostAndViolationController()
IEntity
getEntityCostAndViolationController
in interface IEntity
IEntityCostAndViolationController
public void setEntityCostAndViolationController(IEntityCostAndViolationController controller)
IEntity
setEntityCostAndViolationController
in interface IEntity
controller
- the iEntityCostAndViolationControllerpublic void addRoute(ILogicEntityRoute logicRoute)
IEntity
ILogicEntityRoute
.public void addRoute(int index, ILogicEntityRoute logicRoute)
IEntity
ILogicEntityRoute
at the index
position, shifting the Route
at
that position to the right and updating all indexes
public void removeRoute(ILogicEntityRoute remRoute)
IEntity
ILogicEntityRoute
from an IEntity
.removeRoute
in interface IEntity
remRoute
- the route to removepublic void removeRoute(int index)
IEntity
removeRoute
in interface IEntity
index
- the int indexpublic void setIsRequestAllRoutesElementDetails(boolean requestAllElementDetails)
IEntity
resultrequested
value of
all ILogicEntityRoutes
. If set to true
the ILogicRouteElementDetailItems
are getting saved.setIsRequestAllRoutesElementDetails
in interface IEntity
requestAllElementDetails
- the boolean to setpublic ListIterator<ILogicEntityRoute> getRouteIterator()
IEntity
iterator
.getRouteIterator
in interface IEntity
public int getRouteCount()
IEntity
Routes
.getRouteCount
in interface IEntity
IEntity.addRoute(ILogicEntityRoute)
public ILogicEntityRoute getRoute(int index)
IEntity
ILogicEntityRoute
according to the index
.public void setRoutes(List<ILogicEntityRoute> routes)
IEntity
ILogicEntityRoute
as the ILogicEntityRoutes
of an IEntity
. 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.public int getTotalRoutesOptimizableElementsCount()
IEntity
IOptimizationElements
within the ILogicEntityRoutes
.getTotalRoutesOptimizableElementsCount
in interface IEntity
public int getTotalRoutesDistinctElementsCount()
IEntity
IOptimizationElement
.getTotalRoutesDistinctElementsCount
in interface IEntity
Elements
in all the Route
public List<ILogicEntityRoute> getRoutes()
IEntity
list
of ILogicEntityRoutes
.public boolean exchangeExistingRouteWithExistingRoute(ILogicEntityRoute existingRouteOrg, ILogicEntityRoute existingRouteReplace)
IEntity
ILogicEntityRoute
with another ILogicEntityRoute
in all the Entities
.
This is used in lockdown
.
exchangeExistingRouteWithExistingRoute
in interface IEntity
existingRouteOrg
- the iLogicEntityRoute to replaceexistingRouteReplace
- the ILogicEntityRoute that will be put in its steadtrue
if the operation was successfulpublic ILogicEntityRoute exchangeExistingRouteWithClone(ILogicEntityRoute existingRoute)
IEntity
exchangeExistingRouteWithClone
in interface IEntity
existingRoute
- the iLogicEntityRoute that is replaced with a copyILogicEntityRoute
public List<ILogicEntityRoute> exchangeExistingRoutesWithClones(List<ILogicEntityRoute> existingRoutes)
IEntity
exchangeExistingRoutesWithClones
in interface IEntity
existingRoutes
- the iLogicEntityRoutes that are replaced with a copypublic IEntity partialCopy(List<ILogicEntityRoute> routes2BeCopied)
IEntity
IEntity
in which only the input ILogicEntityRoutes
are actual copies, the rest of the IEntity
consists of references to the original
Object
. This shallow copy allows to make modifications to the respective Routes
of an IEntity
while demanding less performance than a full copy.partialCopy
in interface IEntity
routes2BeCopied
- the iLogicEntityRoutes which are copiedObject
containing references to the original IEntity
while the input
Routes
are copiespublic IEntity partialCopyExchangeExistingRoute(ILogicEntityRoute existingRouteOrg, ILogicEntityRoute existingRouteReplace)
partialCopyExchangeExistingRoute
in interface IEntity
public String toOverviewResult()
IEntity
IOptimization
with
the number of ILogicEntityRoute
, number of IOptimizationElement
, total time,
distance, idle time etc.toOverviewResult
in interface IEntity
public String toString()
IEntity
String
representing the IEntity
object.
Some information is given on the ILogicEntityRoutes
like the
productive time
and the idle time
.
public String toString(boolean showNonSchedudledRoutes)
public IJoinedEntityDetailController getJoinedDetailController()
IEntity
IJoinedEntityDetailController
which is assessing the times and distances of
the ILogicEntityRoutes
.getJoinedDetailController
in interface IEntity
IJoinedEntityDetailController
public void setJoinedDetailController(IJoinedEntityDetailController joinedDetailController)
IEntity
IJoinedEntityDetailController
which is assessing the times and distances of
the ILogicEntityRoutes
.setJoinedDetailController
in interface IEntity
joinedDetailController
- the iJoinedEntityDetailController to setpublic List<IViolationSummary> getRouteViolationSummaries()
IEntity
getRouteViolationSummaries
in interface IEntity
public void setEntityArranger(com.dna.jopt.framework.firstentitycreation.IEntityArranger entityArranger)
IEntity
IEntityArranger
.setEntityArranger
in interface IEntity
entityArranger
- the iEntityArrangerpublic com.dna.jopt.framework.firstentitycreation.IEntityArranger getEntityArranger()
IEntity
IEntityArranger
, responsible for creating a hard constraints free IEntity
.getEntityArranger
in interface IEntity
IEntityArranger
public IEntityInvokedOperatorController getEntityInvokedOperatorController()
IEntity
IEntityInvokedOperatorController
.getEntityInvokedOperatorController
in interface IEntity
IEntityInvokedOperatorController
which holds information on cost
advantage
of the last Operator
etc.public void setEntityInvokedOperatorController(IEntityInvokedOperatorController opc)
IEntity
IEntityInvokedOperatorController
which holds information on cost
advantage
of the last used Operator
etc.setEntityInvokedOperatorController
in interface IEntity
opc
- the iEntityInvokedOperatorControllerpublic void updateJointEntityBaseValueWithRoute(ILogicEntityRoute route)
IEntity
distance, idle time, productive time, transit time
etc of the input
ILogicEntityRoute
to the IJoinedEntityDetailController
of the IEntity
.updateJointEntityBaseValueWithRoute
in interface IEntity
route
- the iLogicEntityRoute of which the values should be addedpublic void updateJointEntityBaseValueWithOwnRoutes()
IEntity
IJoinedEntityDetailController
and adds the values of all ILogicEntityRoute
that were not unassigned
.updateJointEntityBaseValueWithOwnRoutes
in interface IEntity
public List<IOptimizationElement> getAllEntityElements()
IEntity
IOptimizationElements
of the IEntity
.getAllEntityElements
in interface IEntity
IOptimizationElements
public List<IOptimizationElement> getAllRoutesElements(String resourceId)
IEntity
getAllRoutesElements
in interface IEntity
resourceId
- the string to search forpublic Map<IResource,Integer> getResourceFirstOccurenceAbsoluteIndexMap()
getResourceFirstOccurenceAbsoluteIndexMap
in interface IEntity
public Optional<ILogicEntityRoute> getFirstMatchingRoute(String nodeId)
IEntity
ILogicEntityRoute
in which the INode
or IPillarNode
with the input nodeId
was found.getFirstMatchingRoute
in interface IEntity
nodeId
- the string Id of the Node
to look for.Route
in which the Node
or Pillar
was found.public List<ILogicEntityRoute> getRoutesByResource(IResource res)
getRoutesByResource
in interface IEntity
public List<ILogicEntityRoute> getAnchoredRoutes()
IEntity
ILogicEntityRoute
with anchorNodes
, which are essentially IPillarNodes
overwriting the start or end of a Route
.getAnchoredRoutes
in interface IEntity
Routes
with anchorNodes
public Optional<ILogicEntityRoute> getFirstMatchingRoute(INode node)
IEntity
getFirstMatchingRoute
in interface IEntity
node
- the iNode to look forRoute
containing the Node
public boolean hasResource(String resourceId)
IEntity
hasResource
in interface IEntity
resourceId
- the string Id
to search fortrue
if a Resource
containing this Id
existspublic List<ILogicEntityRoute> getRoutesContainingElementId(String elementId)
getRoutesContainingElementId
in interface IEntity
public List<ILogicEntityRoute> getRoutesContainingElementId(String elementId, boolean ignoreStartEnd)
getRoutesContainingElementId
in interface IEntity
public Optional<ILogicEntityRoute> getRoutesContainingElementId(String elementId, String visitor, boolean ignoreStartEnd)
getRoutesContainingElementId
in interface IEntity
public List<IOptimizationElement> getNoneOptimizableElements()
IEntity
IOptimizationElements
that will not be optimized
anymore because they are in the past for example.getNoneOptimizableElements
in interface IEntity
noneOptimizableElements
public List<IOptimizationElement> getOptimizableElements()
IEntity
IOptimizationElement
of all ILogicEntityRoutes
.getOptimizableElements
in interface IEntity
optimizable Elements
public Optional<IOptimizationElement> getElement(String id)
getElement
in interface IEntity
public Optional<IOptimizationElement> getElement(String id, boolean ignoreStartEnd)
getElement
in interface IEntity
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.