public class RelativeVisitor2RelatedNodeRelation extends AbstracNode2NodeRelation implements INode2NodeVisitorRelation
relations
between INodes
concerning the specific IResource
visiting
them.
Example for setting a different visitor among the Nodes
"moers" and "gladbach":
INode2NodeVisitorRelation rel = new RelativeVisitor2RelatedNodeRelation();
rel.setIsForcedDifferentVisitor();
rel.setMasterNode(moers);
rel.setRelatedNode(gladbach);
moers.addNode2NodeRelation(rel);
gladbach.addNode2NodeRelation(rel);
AbstracNode2NodeRelation.RelationMode
Constructor and Description |
---|
RelativeVisitor2RelatedNodeRelation()
The constructor for a
relation between two Nodes that must be visited by the
same or different Resource . |
Modifier and Type | Method and Description |
---|---|
com.dna.jopt.assessment.costassessorrestriction.restrictionresult.IEntityRestrictionResult |
checkRelation(IEntity en,
com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider,
com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster cad,
ILogicRouteElementDetailItem masterDetails,
List<ILogicRouteElementDetailItem> relatedDetailss,
boolean resultRequested) |
boolean |
isForcedDifferentRoute() |
boolean |
isForcedDifferentVisitor()
Checks if a different
Resource has to visit the two Nodes . |
boolean |
isForcedSameRoute() |
boolean |
isForcedSameVisitor()
Checks whether the same
Resource is forced to visit both Nodes |
boolean |
needsFullJobLevelEvaluation()
Needs full job level evaluation.
|
void |
setIsForcedDifferentRoute(boolean isForcedDifferentVisitor)
Sets the checks if is forced different route.
|
void |
setIsForcedDifferentVisitor()
Enforces a different
Resource to visit the two Nodes . |
void |
setIsForcedSameRoute()
Sets the is forced same route.
|
void |
setIsForcedSameVisitor()
Enforces that the same
Resource visits the two Nodes . |
void |
setIsForcedSameVisitorForcedDifferentRoute()
Sets the is forced same visitor forced different route.
|
checkRelation, getDetailsOfElement, getMasterNode, getRelatedNode, getRelatedNodes, getRelationMode, getRouteOfElement, isFilterRelatedNodes, setMasterNode, setRelatedNode, setRelatedNodes, setRelationMode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRelatedNode, getRelatedNodes, setRelatedNode, setRelatedNodes
checkRelation, getMasterNode, getRelationMode, isFilterRelatedNodes, setMasterNode, setRelationMode
public RelativeVisitor2RelatedNodeRelation()
relation
between two Nodes
that must be visited by the
same or different Resource
.public void setIsForcedDifferentVisitor()
Resource
to visit the two Nodes
.setIsForcedDifferentVisitor
in interface INode2NodeVisitorRelation
public void setIsForcedSameVisitorForcedDifferentRoute()
INode2NodeVisitorRelation
Attached nodes should be visited in a different route by the same visitor.
setIsForcedSameVisitorForcedDifferentRoute
in interface INode2NodeVisitorRelation
public void setIsForcedDifferentRoute(boolean isForcedDifferentVisitor)
INode2NodeVisitorRelation
Attached nodes should be visited in a different route.
setIsForcedDifferentRoute
in interface INode2NodeVisitorRelation
isForcedDifferentVisitor
- if true, a different visitor is also required.public void setIsForcedSameVisitor()
Resource
visits the two Nodes
.setIsForcedSameVisitor
in interface INode2NodeVisitorRelation
public void setIsForcedSameRoute()
INode2NodeVisitorRelation
Attached nodes should be visited within the same route.
setIsForcedSameRoute
in interface INode2NodeVisitorRelation
public boolean isForcedSameVisitor()
Resource
is forced to visit both Nodes
public boolean isForcedDifferentVisitor()
Resource
has to visit the two Nodes
.public boolean isForcedSameRoute()
public boolean isForcedDifferentRoute()
public com.dna.jopt.assessment.costassessorrestriction.restrictionresult.IEntityRestrictionResult checkRelation(IEntity en, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider propertyProvider, com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster cad, ILogicRouteElementDetailItem masterDetails, List<ILogicRouteElementDetailItem> relatedDetailss, boolean resultRequested)
checkRelation
in interface INode2NodeRelation
public boolean needsFullJobLevelEvaluation()
INodeRelation
In case the relation needs to access for example arrival times etc. of all related nodes e have to save this data for the relation. The cost assessor will ask if the relation requires this and will save the data for the nodes carrying this relation. It is important that every node that is part of a relation is also carrying the relation as object.
needsFullJobLevelEvaluation
in interface INodeRelation
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.