Interface IAutoFilterNodeConstraint
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractAutoFilterConstraint,AfterEndPillarAutoFilterConstraint,CapacityOverloadAutoFilterConstraint,DoubleBookingAutoFilterConstraint,EarlyAutoFilterConstraint,LateAutoFilterConstraint,MaximalDistanceExceededAutoFilterConstraint,RelationMismatchAutoFilterConstraint,RequiredSkillAutoFilterConstraint,ResourceMismatchAutoFilterConstraint,WorkingHoursExceededAutoFilterConstraint
This interface provides methods in order to filter out
Nodes for specific filter reasons.
This can also be done on node-level, to filter out a specific Node for reason x.- Since:
- 07/01/2019
- Version:
- 19/09/2019
- Author:
- DNA
-
Method Summary
Modifier and TypeMethodDescriptiongetFilterReason(INode element) Gets thefilter reasonwhy theNodewas filtered.doubleGets thethresholdof theNodewhich theconstraint factorhas to reach in order to be filtered out.doubleGets the threshold from the last run which usually is set to be lower, usually between 0.8 and 0.4.booleanChecks whetheraverage filteringis allowed for cases where theRoutehas problems but no singleNodeis above thethreshold.booleanisInConstraintState(INode node, ILogicEntityRoute curRoute, IEntity en, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider provider) Checks whether theNode(or theRouteof thatNode) is in aconstraint stateby checking whether the costs fromconstraintsare higher than 0.
-
Method Details
-
getFilterReason
Gets thefilter reasonwhy theNodewas filtered.- Parameters:
element- the node- Returns:
- the violation for being filtered
-
getThreshold
double getThreshold()Gets thethresholdof theNodewhich theconstraint factorhas to reach in order to be filtered out.The
Nodesare evaluated several times whether they are in aconstraintstate or not. Thefactorof being in aconstraintstate is calculated by number of evaluation divided by the times theNodewas in aconstraintstate. The value is usually between 0.99 and 0.8- Returns:
- the threshold
-
getThresholdLastRun
double getThresholdLastRun()Gets the threshold from the last run which usually is set to be lower, usually between 0.8 and 0.4.The very last run of an
optimizationshould have as few problems as possible. This is why thethresholdin the last run is lower in order to filter as many problematicNodesas possible.- Returns:
- the treshold
-
isInConstraintState
boolean isInConstraintState(INode node, ILogicEntityRoute curRoute, IEntity en, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider provider) Checks whether theNode(or theRouteof thatNode) is in aconstraint stateby checking whether the costs fromconstraintsare higher than 0.If a
Routein total has additionalcostsfor being late but is on time on a specificNodeisInConstraintState()would returntrueon a not lateNodenonetheless.- Parameters:
node- the iNodecurRoute- the iLogicEntityRouteen- the iEntityprovider- the provider- Returns:
- the boolean whether the node is in a constraint state
-
isAverageFilteringAllowed
boolean isAverageFilteringAllowed()Checks whetheraverage filteringis allowed for cases where theRoutehas problems but no singleNodeis above thethreshold.Average filteringfilters the most problematicNodeeven tough it is not above thethreshold.- Returns:
- whether average filtering is allowed
-