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 Details

    • AbstractAutoFilterConstraint

      public AbstractAutoFilterConstraint()
  • Method Details

    • getFilterReason

      public INodeFilterReason getFilterReason(INode node)
      Description copied from interface: IAutoFilterNodeConstraint
      Gets the filter reason why the Node was filtered.
      Specified by:
      getFilterReason in interface IAutoFilterNodeConstraint
      Parameters:
      node - the node
      Returns:
      the violation for being filtered
    • getQuotient

      public abstract double getQuotient(IAutoFilterViolationAndConstrainCollector collector)
    • isInConstraintState

      public boolean isInConstraintState(INode node, ILogicEntityRoute curRoute, IEntity en, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider provider)
      Description copied from interface: IAutoFilterNodeConstraint
      Checks whether the Node (or the Route of that Node) is in a constraint state by checking whether the costs from constraints are higher than 0.

      If a Route in total has additional costs for being late but is on time on a specific Node isInConstraintState() would return true on a not late Node nonetheless.

      Specified by:
      isInConstraintState in interface IAutoFilterNodeConstraint
      Parameters:
      node - the iNode
      curRoute - the iLogicEntityRoute
      en - the iEntity
      provider - 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

      public abstract String getTitle()
    • isAverageFilteringAllowed

      public boolean isAverageFilteringAllowed()
      Description copied from interface: IAutoFilterNodeConstraint
      Checks whether average filtering is allowed for cases where the Route has problems but no single Node is above the threshold. Average filtering filters the most problematic Node even tough it is not above the threshold.
      Specified by:
      isAverageFilteringAllowed in interface IAutoFilterNodeConstraint
      Returns:
      whether average filtering is allowed