public class RelativeTimeWindow2RelatedNodeRelation extends AbstractNode2NodeTempusRelation
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)
.
AbstracNode2NodeRelation.RelationMode
Modifier and Type | Field and Description |
---|---|
protected static int |
FIXED_PENALTY_MULTIPILCATOR |
Constructor and Description |
---|
RelativeTimeWindow2RelatedNodeRelation(Duration minimalDeviation,
Duration maximalDeviation)
The constructor for setting relative time windows between work orders of specific
Nodes . |
RelativeTimeWindow2RelatedNodeRelation(long minimalDeviationSeconds,
long maximalDeviationSeconds)
The constructor for setting relative time windows between work orders of specific
Nodes . |
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) |
Duration |
getMaxTimeDeviation()
Gets the time within which both nodes have to be visited as a
Duration . |
long |
getMaxTimeDeviationSeconds()
Gets the time within which two
Nodes have to be visited as a long . |
Duration |
getMinTimeDeviation()
Gets the time that has to lay between the two work orders as
Duration . |
long |
getMinTimeDeviationSeconds()
Gets the forced break between
Nodes as a long seconds. |
boolean |
needsFullJobLevelEvaluation()
Needs full job level evaluation.
|
String |
toString() |
isMasterNodeWorkingStart, isRelatedNodeWorkingStart, setTimeComparisonJuncture
checkRelation, getDetailsOfElement, getMasterNode, getRelatedNode, getRelatedNodes, getRelationMode, getRouteOfElement, hasValidRelatedItem, isFilterRelatedNodes, setMasterNode, setRelatedNode, setRelatedNodes, setRelationMode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRelatedNode, getRelatedNodes, hasValidRelatedItem, setRelatedNode, setRelatedNodes
checkRelation, getMasterNode, getRelationMode, isFilterRelatedNodes, setMasterNode, setRelationMode
protected static final int FIXED_PENALTY_MULTIPILCATOR
public RelativeTimeWindow2RelatedNodeRelation(long minimalDeviationSeconds, long maximalDeviationSeconds)
Nodes
.
Implementation example for the two Nodes
"Essen" and Aachen" where the work has to
be done within 20 minutes:
INode2NodeTempusRelation relation = new RelativeTimeWindow2RelatedNodeRelation(0, 1200);
relation.setMasterNode(essen);
relation.setRelatedNode(aachen);
relation.setTimeComparisonJuncture(true, true);
essen.addNode2NodeRelation(relation);
aachen.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)
.
For the constructor using Duration please see RelativeTimeWindow2RelatedNodeRelation(Duration, Duration)
.
minimalDeviationSeconds
- the long seconds which have to be between work ordersmaximalDeviationSeconds
- the long seconds within which both orders have to be fulfilledpublic RelativeTimeWindow2RelatedNodeRelation(Duration minimalDeviation, Duration maximalDeviation)
Nodes
.
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:
INode2NodeRelation relation =
new RelativeTimeWindow2RelatedNodeRelation(Duration.ofMinutes(30),Duration.ofHours(2));
relation.setMasterNode(essen);
relation.setRelatedNode(aachen);
essen.addNode2NodeRelation(relation);
aachen.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)
.minimalDeviation
- the duration of the forced break between the two work ordersmaximalDeviation
- the duration within the two work orders have to be finished or startedpublic Duration getMinTimeDeviation()
Duration
.INode2NodeTempusRelation.setTimeComparisonJuncture(boolean, boolean)
public Duration getMaxTimeDeviation()
Duration
.INode2NodeTempusRelation.setTimeComparisonJuncture(boolean, boolean)
public long getMinTimeDeviationSeconds()
Nodes
as a long
seconds.INode2NodeTempusRelation.setTimeComparisonJuncture(boolean, boolean)
public long getMaxTimeDeviationSeconds()
Nodes
have to be visited as a long
.INode2NodeTempusRelation.setTimeComparisonJuncture(boolean, boolean)
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)
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.
Copyright © 2017–2023 DNA Evolutions GmbH. All rights reserved.