Interface IAutoFilterNodeConstraint

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractAutoFilterConstraint, AfterEndPillarAutoFilterConstraint, CapacityOverloadAutoFilterConstraint, DoubleBookingAutoFilterConstraint, EarlyAutoFilterConstraint, LateAutoFilterConstraint, MaximalDistanceExceededAutoFilterConstraint, RelationMismatchAutoFilterConstraint, RequiredSkillAutoFilterConstraint, ResourceMismatchAutoFilterConstraint, WorkingHoursExceededAutoFilterConstraint

public interface IAutoFilterNodeConstraint extends Serializable
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 Type
    Method
    Description
    Gets the filter reason why the Node was filtered.
    double
    Gets the threshold of the Node which the constraint 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 whether average filtering is allowed for cases where the Route has problems but no single Node is above the threshold.
    boolean
    isInConstraintState(INode node, ILogicEntityRoute curRoute, IEntity en, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider provider)
    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.
  • Method Details

    • getFilterReason

      INodeFilterReason getFilterReason(INode element)
      Gets the filter reason why the Node was filtered.
      Parameters:
      element - the node
      Returns:
      the violation for being filtered
    • getThreshold

      double getThreshold()
      Gets the threshold of the Node which the constraint factor has to reach in order to be filtered out.

      The Nodes are evaluated several times whether they are in a constraint state or not. The factor of being in a constraint state is calculated by number of evaluation divided by the times the Node was in a constraint 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 the threshold in the last run is lower in order to filter as many problematic Nodes as possible.

      Returns:
      the treshold
    • isInConstraintState

      boolean isInConstraintState(INode node, ILogicEntityRoute curRoute, IEntity en, com.dna.jopt.framework.inputplausibility.properties.IPropertyProvider provider)
      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.

      Parameters:
      node - the iNode
      curRoute - the iLogicEntityRoute
      en - the iEntity
      provider - the provider
      Returns:
      the boolean whether the node is in a constraint state
    • isAverageFilteringAllowed

      boolean isAverageFilteringAllowed()
      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.
      Returns:
      whether average filtering is allowed