public interface IEntity extends Cloneable, Serializable
Entity
contains all ILogicEntityRoute
, IResource
, INode
etc.
of a current IOptimization
.
This interface provides methods to add or remove Routes
, get the costs getJoinedCost()
, get the first matching Route
of a Node
etc.
ListIterator<ILogicEntityRoute> getRouteIterator()
iterator
.void addRoute(ILogicEntityRoute logicRoute)
ILogicEntityRoute
.logicRoute
- the routeint getRouteCount()
Routes
.addRoute(ILogicEntityRoute)
int getTotalRoutesOptimizableElementsCount()
IOptimizationElements
within the ILogicEntityRoutes
.ILogicEntityRoute getRoute(int index)
ILogicEntityRoute
according to the index
.index
- the int indexList<ILogicEntityRoute> getRoutes()
list
of ILogicEntityRoutes
.IEntity
void setRoutes(List<ILogicEntityRoute> routes)
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.routes
- the iLogicEntityRoutes that are copied to the copy of the IEntity
void removeRoute(ILogicEntityRoute remRoute)
ILogicEntityRoute
from an IEntity
.remRoute
- the route to removevoid removeRoute(int index)
index
- the int indexString toString()
String
representing the IEntity
object.
Some information is given on the ILogicEntityRoutes
like the
productive time
and the idle time
.
IJoinedEntityDetailController getJoinedDetailController()
IJoinedEntityDetailController
which is assessing the times and distances of
the ILogicEntityRoutes
.IJoinedEntityDetailController
void setJoinedDetailController(IJoinedEntityDetailController joinedDetailController)
IJoinedEntityDetailController
which is assessing the times and distances of
the ILogicEntityRoutes
.joinedDetailController
- the iJoinedEntityDetailController to setList<IViolationSummary> getRouteViolationSummaries()
void setEntityArranger(com.dna.jopt.framework.firstentitycreation.IEntityArranger entityArranger)
IEntityArranger
.entityArranger
- the iEntityArrangercom.dna.jopt.framework.firstentitycreation.IEntityArranger getEntityArranger()
IEntityArranger
, responsible for creating a hard constraints free IEntity
.IEntityArranger
IEntityCostAndViolationController getEntityCostAndViolationController()
IEntityCostAndViolationController
void setEntityCostAndViolationController(IEntityCostAndViolationController controller)
controller
- the iEntityCostAndViolationControllervoid setJoinedCost(double cost)
joined cost
which is the accumulated sum of internal cost
of all
IlogicEntityRoutes
of the IEntity
.cost
- the double internal costs of the whole IEntity
double getJoinedCost()
joined cost
which is the accumulated sum of internal cost
of all
IlogicEntityRoutes
of the IEntity
.IEntity
List<IOptimizationElement> getAllEntityElements()
IOptimizationElements
of the IEntity
.IOptimizationElements
List<IOptimizationElement> getNoneOptimizableElements()
IOptimizationElements
that will not be optimized
anymore because they are in the past for example.noneOptimizableElements
List<IOptimizationElement> getOptimizableElements()
IOptimizationElement
of all ILogicEntityRoutes
.optimizable Elements
List<IOptimizationElement> getAllRoutesElements(String resourceId)
resourceId
- the string to search forboolean hasResource(String resourceId)
resourceId
- the string Id
to search fortrue
if a Resource
containing this Id
existsboolean hasNode(String nodeId)
nodeId
- the string Id
to search fortrue
if any of the Elements
contains the Id
void addRoute(int index, ILogicEntityRoute logicRoute)
ILogicEntityRoute
at the index
position, shifting the Route
at
that position to the right and updating all indexes
index
- the int index which the Route
will havelogicRoute
- the iLogicEntityRoute to addvoid setIsRequestAllRoutesElementDetails(boolean requestAllElementDetails)
resultrequested
value of
all ILogicEntityRoutes
. If set to true
the ILogicRouteElementDetailItems
are getting saved.requestAllElementDetails
- the boolean to setIEntity partialCopy(List<ILogicEntityRoute> routes2BeCopied)
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.routes2BeCopied
- the iLogicEntityRoutes which are copiedObject
containing references to the original IEntity
while the input
Routes
are copiesILogicEntityRoute exchangeExistingRouteWithClone(ILogicEntityRoute existingRoute)
existingRoute
- the iLogicEntityRoute that is replaced with a copyILogicEntityRoute
List<ILogicEntityRoute> exchangeExistingRoutesWithClones(List<ILogicEntityRoute> existingRoutes)
existingRoutes
- the iLogicEntityRoutes that are replaced with a copyboolean exchangeExistingRouteWithExistingRoute(ILogicEntityRoute existingRouteOrg, ILogicEntityRoute existingRouteReplace)
ILogicEntityRoute
with another ILogicEntityRoute
in all the Entities
.
This is used in lockdown
.
existingRouteOrg
- the iLogicEntityRoute to replaceexistingRouteReplace
- the ILogicEntityRoute that will be put in its steadtrue
if the operation was successfulint getTotalRoutesDistinctElementsCount()
IOptimizationElement
.Elements
in all the Route
String toOverviewResult()
IOptimization
with
the number of ILogicEntityRoute
, number of IOptimizationElement
, total time,
distance, idle time etc.IRelationshipController getRelationshipController()
void setRelationShipController(IRelationshipController relationshipController)
relationshipController
- the iRelationshipController to setIEntityInvokedOperatorController getEntityInvokedOperatorController()
IEntityInvokedOperatorController
.IEntityInvokedOperatorController
which holds information on cost
advantage
of the last Operator
etc.void setEntityInvokedOperatorController(IEntityInvokedOperatorController opc)
IEntityInvokedOperatorController
which holds information on cost
advantage
of the last used Operator
etc.opc
- the iEntityInvokedOperatorControllerOptional<ILogicEntityRoute> getFirstMatchingRoute(INode node)
node
- the iNode to look forRoute
containing the Node
Optional<ILogicEntityRoute> getFirstMatchingRoute(String nodeId)
ILogicEntityRoute
in which the INode
or IPillarNode
with the input nodeId
was found.nodeId
- the string Id of the Node
to look for.Route
in which the Node
or Pillar
was found.List<ILogicEntityRoute> getAnchoredRoutes()
ILogicEntityRoute
with anchorNodes
, which are essentially IPillarNodes
overwriting the start or end of a Route
.Routes
with anchorNodes
void updateJointEntityBaseValueWithRoute(ILogicEntityRoute route)
distance, idle time, productive time, transit time
etc of the input
ILogicEntityRoute
to the IJoinedEntityDetailController
of the IEntity
.route
- the iLogicEntityRoute of which the values should be addedvoid updateJointEntityBaseValueWithOwnRoutes()
IJoinedEntityDetailController
and adds the values of all ILogicEntityRoute
that were not unassigned
.void setMultiWorkingHoursConstraintController(IMultiWorkingHoursConstraintController controller)
IMultiWorkingHoursConstraintController
which controls the costs for violating
IConstraints
or IWorkingHours
.controller
- the iMultiWorkingHoursConstraintController to setIMultiWorkingHoursConstraintController getMultiWorkingHoursConstraintController()
IMultiWorkingHoursConstraintController
which controls the costs for violating
IConstraints
or IWorkingHours
.IMultiWorkingHoursConstraintController
void setIsUnassessed(boolean isUnassessed)
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 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
isUnassessed
- the boolean to setboolean isUnassessed()
value
IEntity partialCopyExchangeExistingRoute(ILogicEntityRoute existingRouteOrg, ILogicEntityRoute existingRouteReplace)
String toString(boolean showNonSchedudledRoutes)
Map<IResource,Integer> getResourceFirstOccurenceAbsoluteIndexMap()
List<ILogicEntityRoute> getRoutesByResource(IResource res)
List<ILogicEntityRoute> getRoutesContainingElementId(String elementId)
Optional<IOptimizationElement> getElement(String id)
long getBuildTimeStamp()
Optional<IOptimizationElement> getElement(String id, boolean ignoreStartEnd)
List<ILogicEntityRoute> getRoutesContainingElementId(String elementId, boolean ignoreStartEnd)
Optional<ILogicEntityRoute> getRoutesContainingElementId(String elementId, String visitor, boolean ignoreStartEnd)
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.