Interface INode2NodeRelation
- All Superinterfaces:
INodeRelation
,Serializable
- All Known Subinterfaces:
INode2MultiNodesRelation
,INode2NodesMultiDayRelation
,INode2NodeTempusRelation
,INode2NodeVisitorRelation
- All Known Implementing Classes:
AbstracNode2NodeRelation
,AbstractNode2NodeTempusRelation
,NegativeRelativeTimeWindow2RelatedNodeRelation
,Node2NodesMultiDayRelation
,RelativeTimeWindow2RelatedNodeRelation
,RelativeVisitor2RelatedNodeRelation
This interface
INode2NodeRelation
allows to define
MasterNodes
and
RelatedNodes
. A MasterNode
has to be given service before a
RelatedNode
. For specifying the timewindow within which the work has
to be done as well as a possible minimum time between the two Nodes
please see
RelativeTimeWindow2RelatedNodeRelation
.
Implementation example in which the second Node
has to be visited
within two hours of the first one:
{ @code INode2NodeRelation relation = new RelativeTimeWindow2RelatedNodeRelation(Duration.ofSeconds(0), Duration.ofHours(2)); relation.setMasterNode(aachen); relation.setRelatedNode(essen); aachen.addNode2NodeRelation(relation); essen.addNode2NodeRelation(relation); }For information whether the work has to be done within the specified time or the
Resource
has to have arrived at the RelatedNode
within
the specified time see
INode2NodeTempusRelation.setTimeComparisonJuncture(boolean, boolean)
.- Since:
- 08/11/2018
- Version:
- 12/09/2019
- Author:
- DNA
-
Method Summary
Modifier and TypeMethodDescriptioncom.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> relatedDetails, boolean resultRequested) Deprecated.Gets the relatedNode.boolean
void
setRelatedNode
(INode relatedNode) Sets theNode
as aRelatedNode
which has to be given service after the relatedMasterNode
.void
setRelatedNodes
(List<INode> relatedNodes) Methods inherited from interface com.dna.jopt.member.unit.relation.node2node.INodeRelation
checkRelation, getMasterNode, getRelationMode, isFilterRelatedNodes, needsFullJobLevelEvaluation, setMasterNode, setRelationMode
-
Method Details
-
setRelatedNode
Sets theNode
as aRelatedNode
which has to be given service after the relatedMasterNode
.- Parameters:
relatedNode
- therelatedNode
to be set
-
getRelatedNode
INode getRelatedNode()Deprecated.Gets the relatedNode.- Returns:
- the relatedNode
-
setRelatedNodes
-
getRelatedNodes
-
checkRelation
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> relatedDetails, boolean resultRequested) -
hasValidRelatedItem
boolean hasValidRelatedItem()
-