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 reason
why theNode
was filtered.double
Gets thethreshold
of theNode
which theconstraint factor
has to reach in order to be filtered out.double
Gets the threshold from the last run which usually is set to be lower, usually between 0.8 and 0.4.boolean
Checks whetheraverage filtering
is allowed for cases where theRoute
has problems but no singleNode
is above thethreshold
.boolean
isInConstraintState
(INode node, ILogicEntityRoute curRoute, IEntity en, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider provider) Checks whether theNode
(or theRoute
of thatNode
) is in aconstraint state
by checking whether the costs fromconstraints
are higher than 0.
-
Method Details
-
getFilterReason
Gets thefilter reason
why theNode
was filtered.- Parameters:
element
- the node- Returns:
- the violation for being filtered
-
getThreshold
double getThreshold()Gets thethreshold
of theNode
which theconstraint factor
has to reach in order to be filtered out.The
Nodes
are evaluated several times whether they are in aconstraint
state or not. Thefactor
of being in aconstraint
state is calculated by number of evaluation divided by the times theNode
was in aconstraint
state. 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
optimization
should have as few problems as possible. This is why thethreshold
in the last run is lower in order to filter as many problematicNodes
as 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 theRoute
of thatNode
) is in aconstraint state
by checking whether the costs fromconstraints
are higher than 0.If a
Route
in total has additionalcosts
for being late but is on time on a specificNode
isInConstraintState()
would returntrue
on a not lateNode
nonetheless.- 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 filtering
is allowed for cases where theRoute
has problems but no singleNode
is above thethreshold
.Average filtering
filters the most problematicNode
even tough it is not above thethreshold
.- Returns:
- whether average filtering is allowed
-