public abstract class AbstractOptimizationElement extends Object implements IOptimizationElement
IOptimizationElement.OptimizationElementFlavour
Modifier and Type | Field and Description |
---|---|
protected List<IDutyHours> |
dutyHours |
Constructor and Description |
---|
AbstractOptimizationElement() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
void |
forceSetId(String id)
Force set a new Id after construction of the element if absolutely necessary.
|
int |
getDistMatrixId()
Deprecated.
|
List<IDutyHours> |
getDutyHours()
Gets the
IDutyHours of the element . |
Optional<String> |
getExtraInfo() |
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() |
int |
hashCode() |
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 |
setDistMatrixId(int matrixId)
Deprecated.
|
void |
setDutyHours(List<? extends IDutyHours> dutyHours)
Sets the
duty hours . |
void |
setExtraInfo(String extraInfo) |
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) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFlavour, hasRealGeoLocation
protected List<IDutyHours> dutyHours
public String getId()
IOptimizationElement
getId
in interface IOptimizationElement
public void setId(String id)
IOptimizationElement
setId
in interface IOptimizationElement
id
- the new idpublic void forceSetId(String id)
IOptimizationElement
forceSetId
in interface IOptimizationElement
id
- the idpublic void setLocationId(String locationId)
IOptimizationElement
setLocationId
in interface IOptimizationElement
locationId
- the new location idpublic void setExtraInfo(String extraInfo)
setExtraInfo
in interface IOptimizationElement
public Optional<String> getExtraInfo()
getExtraInfo
in interface IOptimizationElement
public String getLocationId()
IOptimizationElement
getLocationId
in interface IOptimizationElement
public void setPosition(com.dna.jopt.config.types.Position position)
setPosition
in interface IOptimizationElement
public com.dna.jopt.config.types.Position getPosition()
getPosition
in interface IOptimizationElement
public void setLatitude(double latitude)
IOptimizationElement
element
.setLatitude
in interface IOptimizationElement
latitude
- the new latitudepublic double getLatitude()
IOptimizationElement
element
.getLatitude
in interface IOptimizationElement
public void setLongitude(double longitude)
IOptimizationElement
element
.setLongitude
in interface IOptimizationElement
longitude
- the new longitudepublic double getLongitude()
IOptimizationElement
element
.getLongitude
in interface IOptimizationElement
public void setDutyHours(List<? extends IDutyHours> dutyHours)
IOptimizationElement
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.
setDutyHours
in interface IOptimizationElement
dutyHours
- the new duty hourspublic IPreferredHoursInteractionController getPreferredHoursInteractionController()
getPreferredHoursInteractionController
in interface IOptimizationElement
public List<IDutyHours> getDutyHours()
IOptimizationElement
IDutyHours
of the element
.getDutyHours
in interface IOptimizationElement
public INodeConnectorItem getNodeConnection(IOptimizationElement toElement)
IOptimizationElement
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.getNodeConnection
in interface IOptimizationElement
toElement
- the end element of the connectionpublic List<INodeConnectorItem> getNodeConnections()
IOptimizationElement
node connections
seen by this element
.getNodeConnections
in interface IOptimizationElement
public void putNodeConnectionFromElement(INodeConnectorItem conncetorItem)
IOptimizationElement
node connection
from this element
to another element
.putNodeConnectionFromElement
in interface IOptimizationElement
conncetorItem
- the new found INodeConnectorItem@Deprecated public void putNodeConnection(IOptimizationElement toElement, INodeConnectorItem conncetorItem)
IOptimizationElement
Put node connection.
putNodeConnection
in interface IOptimizationElement
toElement
- the to elementconncetorItem
- the conncetor itempublic void removeNodeConnection(IOptimizationElement toElement)
IOptimizationElement
node connection
. This method is most often used to clean up connections
which are not in use any longer.removeNodeConnection
in interface IOptimizationElement
toElement
- the to elementpublic Set<IOptimizationElement> getNodeConnectionKeySet()
IOptimizationElement
getNodeConnectionKeySet
in interface IOptimizationElement
@Deprecated public void setDistMatrixId(int matrixId)
IOptimizationElement
setDistMatrixId
in interface IOptimizationElement
matrixId
- the new dist matrix id@Deprecated public int getDistMatrixId()
IOptimizationElement
getDistMatrixId
in interface IOptimizationElement
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.