Interface INode2NodeRelation

All Superinterfaces:
INodeRelation, Serializable
All Known Subinterfaces:
INode2MultiNodesRelation, INode2NodesMultiDayRelation, INode2NodeTempusRelation, INode2NodeVisitorRelation
All Known Implementing Classes:
AbstracNode2NodeRelation, AbstractNode2NodeTempusRelation, NegativeRelativeTimeWindow2RelatedNodeRelation, Node2NodesMultiDayRelation, RelativeTimeWindow2RelatedNodeRelation, RelativeVisitor2RelatedNodeRelation

public interface INode2NodeRelation extends INodeRelation, Serializable
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 Details

    • setRelatedNode

      void setRelatedNode(INode relatedNode)
      Sets the Node as a RelatedNode which has to be given service after the related MasterNode.
      Parameters:
      relatedNode - the relatedNode to be set
    • getRelatedNode

      INode getRelatedNode()
      Deprecated.
      Gets the relatedNode.
      Returns:
      the relatedNode
    • setRelatedNodes

      void setRelatedNodes(List<INode> relatedNodes)
    • getRelatedNodes

      List<INode> 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()