public interface IOptimizationElement extends Serializable
IOptimizationElement
is the super class of INode
and IResource
.
Each one can be given a specific ID
, the IDutyHours
can be set, as well as the
NodeConnection
can be set or the longitude
and latitude
retrieved.Modifier and Type | Interface and Description |
---|---|
static class |
IOptimizationElement.OptimizationElementFlavour
The OptimizationElementFlavour.
|
Modifier and Type | Method and Description |
---|---|
void |
forceSetId(String id)
Force set a new Id after construction of the element if absolutely necessary.
|
Optional<String> |
getConstraintAliasId()
Gets the constraint alias id.
|
int |
getDistMatrixId()
Deprecated.
|
List<IDutyHours> |
getDutyHours()
Gets the
IDutyHours of the element . |
Optional<String> |
getExtraInfo()
Gets the extra info.
|
IOptimizationElement.OptimizationElementFlavour |
getFlavour()
Gets the flavour which spells out the kind of
Node of the element. |
String |
getId()
Gets the unique id.
|
double |
getLatitude()
Gets the latitude of the
element . |
String |
getLocationId()
Gets the location id.
|
double |
getLongitude()
Gets the longitude of the
element . |
INodeConnectorItem |
getNodeConnection(IOptimizationElement toElement)
Gets the node connection from this element to another element.
|
Set<IOptimizationElement> |
getNodeConnectionKeySet()
Gets the node connection key set.
|
List<INodeConnectorItem> |
getNodeConnections()
Gets the list of
node connections seen by this element . |
com.dna.jopt.config.types.Position |
getPosition() |
IPreferredHoursInteractionController |
getPreferredHoursInteractionController() |
boolean |
hasRealGeoLocation()
Returns
true if the item has a real geo location. |
void |
putNodeConnection(IOptimizationElement toElement,
INodeConnectorItem conncetorItem)
Deprecated.
|
void |
putNodeConnectionFromElement(INodeConnectorItem conncetorItem)
Put a new
node connection from this element to another element . |
void |
removeNodeConnection(IOptimizationElement toElement)
Removes a
node connection . |
void |
setConstraintAliasId(String ignorablePostFixId)
Sets the constraint alias id.
|
void |
setDistMatrixId(int matrixId)
Deprecated.
|
void |
setDutyHours(List<? extends IDutyHours> dutyHours)
Sets the
duty hours . |
void |
setExtraInfo(String extraInfo)
Sets a custom extra info.
|
void |
setId(String id)
Sets the unique id.
|
void |
setLatitude(double latitude)
Sets the latitude of the
element . |
void |
setLocationId(String locationId)
Sets the location id.
|
void |
setLongitude(double longitude)
Sets the longitude of the
element . |
void |
setPosition(com.dna.jopt.config.types.Position position) |
IOptimizationElement.OptimizationElementFlavour getFlavour()
Node
of the element.String getId()
void setId(String id)
id
- the new idvoid forceSetId(String id)
id
- the idboolean hasRealGeoLocation()
true
if the item has a real geo location. For example, an EventNode
has no real geo location.void setLatitude(double latitude)
element
.latitude
- the new latitudedouble getLatitude()
element
.void setLongitude(double longitude)
element
.longitude
- the new longitudedouble getLongitude()
element
.List<IDutyHours> getDutyHours()
IDutyHours
of the element
.INodeConnectorItem getNodeConnection(IOptimizationElement toElement)
INodeEdgeConnector
are
saved also in the element. This speeds up the optimization as frequently seen connections can
be directly extracted from the element instead of invoking a table lookup in the
INodeEdgeConnector.toElement
- the end element of the connectionList<INodeConnectorItem> getNodeConnections()
node connections
seen by this element
.void putNodeConnectionFromElement(INodeConnectorItem conncetorItem)
node connection
from this element
to another element
.conncetorItem
- the new found INodeConnectorItem@Deprecated void putNodeConnection(IOptimizationElement toElement, INodeConnectorItem conncetorItem)
putNodeConnectionFromElement(INodeConnectorItem)
Put node connection.
toElement
- the to elementconncetorItem
- the conncetor item@Deprecated void setDistMatrixId(int matrixId)
matrixId
- the new dist matrix id@Deprecated int getDistMatrixId()
Gets the dist matrix id.
void removeNodeConnection(IOptimizationElement toElement)
node connection
. This method is most often used to clean up connections
which are not in use any longer.toElement
- the to elementSet<IOptimizationElement> getNodeConnectionKeySet()
void setDutyHours(List<? extends IDutyHours> dutyHours)
duty hours
.
Attention: Make sure that each Resource/Node has its own independent list of WorkingHours/OpeningHours (WorkingHours and OpeningHours are both derived from DutyHours). Further, make sure that each WorkingHour Object/ OpeningHours Object is also unique and is not shared in the List of another Resource/Node.
dutyHours
- the new duty hoursIPreferredHoursInteractionController getPreferredHoursInteractionController()
void setPosition(com.dna.jopt.config.types.Position position)
com.dna.jopt.config.types.Position getPosition()
void setLocationId(String locationId)
locationId
- the new location idString getLocationId()
void setExtraInfo(String extraInfo)
extraInfo
- the new extra infovoid setConstraintAliasId(String ignorablePostFixId)
ignorablePostFixId
- the new constraint alias idCopyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.