Class RelativeTimeWindow2RelatedNodeRelation
- All Implemented Interfaces:
INode2NodeRelation
,INodeRelation
,INode2NodeTempusRelation
,Serializable
- Direct Known Subclasses:
NegativeRelativeTimeWindow2RelatedNodeRelation
Nodes
having relative time windows. Two Nodes
can be set to
have relations in such a manner that the work orders have to be started or fulfilled in a set
amount of time or that a specific amount of time has to be between fulfilling work orders.
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:
- 03/08/2019
- Version:
- 12/09/2019
- Author:
- DNA
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.dna.jopt.member.unit.relation.node2node.AbstracNode2NodeRelation
AbstracNode2NodeRelation.RelationMode
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRelativeTimeWindow2RelatedNodeRelation
(long minimalDeviationSeconds, long maximalDeviationSeconds) The constructor for setting relative time windows between work orders of specificNodes
.RelativeTimeWindow2RelatedNodeRelation
(Duration minimalDeviation, Duration maximalDeviation) The constructor for setting relative time windows between work orders of specificNodes
. -
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> relatedDetailss, boolean resultRequested) Gets the time within which both nodes have to be visited as aDuration
.long
Gets the time within which twoNodes
have to be visited as along
.Gets the time that has to lay between the two work orders asDuration
.long
Gets the forced break betweenNodes
as along
seconds.boolean
Needs full job level evaluation.toString()
Methods inherited from class com.dna.jopt.member.unit.relation.node2node.tempus.AbstractNode2NodeTempusRelation
isMasterNodeWorkingStart, isRelatedNodeWorkingStart, setTimeComparisonJuncture
Methods inherited from class com.dna.jopt.member.unit.relation.node2node.AbstracNode2NodeRelation
checkRelation, getDetailsOfElement, getMasterNode, getRelatedNode, getRelatedNodes, getRelationMode, getRouteOfElement, hasValidRelatedItem, isFilterRelatedNodes, setMasterNode, setRelatedNode, setRelatedNodes, setRelationMode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.dna.jopt.member.unit.relation.node2node.INode2NodeRelation
getRelatedNode, getRelatedNodes, hasValidRelatedItem, setRelatedNode, setRelatedNodes
Methods inherited from interface com.dna.jopt.member.unit.relation.node2node.INodeRelation
checkRelation, getMasterNode, getRelationMode, isFilterRelatedNodes, setMasterNode, setRelationMode
-
Field Details
-
FIXED_PENALTY_MULTIPILCATOR
protected static final int FIXED_PENALTY_MULTIPILCATOR- See Also:
-
-
Constructor Details
-
RelativeTimeWindow2RelatedNodeRelation
public RelativeTimeWindow2RelatedNodeRelation(long minimalDeviationSeconds, long maximalDeviationSeconds) The constructor for setting relative time windows between work orders of specificNodes
.Implementation example for the two
Nodes
"Essen" and Aachen" where the work has to be done within 20 minutes:
For information whether the work has to be done within the specified time or theINode2NodeTempusRelation relation = new RelativeTimeWindow2RelatedNodeRelation(0, 1200); relation.setMasterNode(essen); relation.setRelatedNode(aachen); relation.setTimeComparisonJuncture(true, true); essen.addNode2NodeRelation(relation); aachen.addNode2NodeRelation(relation);
Resource
has to have arrived at theRelatedNode
within the specified time seeINode2NodeTempusRelation.setTimeComparisonJuncture(boolean, boolean)
.For the constructor using Duration please see
RelativeTimeWindow2RelatedNodeRelation(Duration, Duration)
.- Parameters:
minimalDeviationSeconds
- the long seconds which have to be between work ordersmaximalDeviationSeconds
- the long seconds within which both orders have to be fulfilled
-
RelativeTimeWindow2RelatedNodeRelation
The constructor for setting relative time windows between work orders of specificNodes
.Example for the two
Nodes
"Essen" and Aachen" where a break of 30 minutes has be between the work orders (for example for drying of some material) but everything has to be done within 2 hours.Implementation example:
For information whether the work has to be done within the specified time or theINode2NodeRelation relation = new RelativeTimeWindow2RelatedNodeRelation(Duration.ofMinutes(30),Duration.ofHours(2)); relation.setMasterNode(essen); relation.setRelatedNode(aachen); essen.addNode2NodeRelation(relation); aachen.addNode2NodeRelation(relation);
Resource
has to have arrived at theRelatedNode
within the specified time seeINode2NodeTempusRelation.setTimeComparisonJuncture(boolean, boolean)
.- Parameters:
minimalDeviation
- the duration of the forced break between the two work ordersmaximalDeviation
- the duration within the two work orders have to be finished or started
-
-
Method Details
-
getMinTimeDeviation
Gets the time that has to lay between the two work orders asDuration
.- Returns:
- the minimum seconds between the two nodes
- See Also:
-
getMaxTimeDeviation
Gets the time within which both nodes have to be visited as aDuration
.- Returns:
- the max seconds between the two Nodes
- See Also:
-
getMinTimeDeviationSeconds
public long getMinTimeDeviationSeconds()Gets the forced break betweenNodes
as along
seconds.- Returns:
- the seconds between Nodes
- See Also:
-
getMaxTimeDeviationSeconds
public long getMaxTimeDeviationSeconds()Gets the time within which twoNodes
have to be visited as along
.- Returns:
- the timewindow between two Nodes
- See Also:
-
checkRelation
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) -
needsFullJobLevelEvaluation
public boolean needsFullJobLevelEvaluation()Description copied from interface:INodeRelation
Needs full job level evaluation.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.
- Returns:
- boolean true if successful
-
toString
-