Class AbstractAutoFilterConstraint
java.lang.Object
com.dna.jopt.member.unit.filter.auto.filternodeconstraint.AbstractAutoFilterConstraint
- All Implemented Interfaces:
IAutoFilterNodeConstraint,Serializable
- Direct Known Subclasses:
AfterEndPillarAutoFilterConstraint,CapacityOverloadAutoFilterConstraint,DoubleBookingAutoFilterConstraint,EarlyAutoFilterConstraint,LateAutoFilterConstraint,MaximalDistanceExceededAutoFilterConstraint,RelationMismatchAutoFilterConstraint,RequiredSkillAutoFilterConstraint,ResourceMismatchAutoFilterConstraint,WorkingHoursExceededAutoFilterConstraint
public abstract class AbstractAutoFilterConstraint
extends Object
implements IAutoFilterNodeConstraint
The Class AbstractAutoFilterConstraint.
- Since:
- 06/09/2019
- Version:
- 06/09/2019
- Author:
- DNA
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract doublegetAttachedCost(INode node, ILogicEntityRoute curRoute, IEntity en, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider provider) getFilterReason(INode node) Gets thefilter reasonwhy theNodewas filtered.abstract doubleabstract StringgetTitle()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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.dna.jopt.member.unit.filter.auto.filternodeconstraint.IAutoFilterNodeConstraint
getThreshold, getThresholdLastRun
-
Constructor Details
-
AbstractAutoFilterConstraint
public AbstractAutoFilterConstraint()
-
-
Method Details
-
getFilterReason
Description copied from interface:IAutoFilterNodeConstraintGets thefilter reasonwhy theNodewas filtered.- Specified by:
getFilterReasonin interfaceIAutoFilterNodeConstraint- Parameters:
node- the node- Returns:
- the violation for being filtered
-
getQuotient
-
isInConstraintState
public boolean isInConstraintState(INode node, ILogicEntityRoute curRoute, IEntity en, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider provider) Description copied from interface:IAutoFilterNodeConstraintChecks 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.- Specified by:
isInConstraintStatein interfaceIAutoFilterNodeConstraint- Parameters:
node- the iNodecurRoute- the iLogicEntityRouteen- the iEntityprovider- the provider- Returns:
- the boolean whether the node is in a constraint state
-
getAttachedCost
public abstract double getAttachedCost(INode node, ILogicEntityRoute curRoute, IEntity en, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider provider) -
getTitle
-
isAverageFilteringAllowed
public boolean isAverageFilteringAllowed()Description copied from interface:IAutoFilterNodeConstraintChecks whetheraverage filteringis allowed for cases where theRoutehas problems but no singleNodeis above thethreshold.Average filteringfilters the most problematicNodeeven tough it is not above thethreshold.- Specified by:
isAverageFilteringAllowedin interfaceIAutoFilterNodeConstraint- Returns:
- whether average filtering is allowed
-