Class BindingResourceConstraint

All Implemented Interfaces:
IConstraint, IConstraintResource, Serializable
Direct Known Subclasses:
MandatoryResourceConstraint, PreferredResourceConstraint

public class BindingResourceConstraint extends AbstractResourceConstraint implements IConstraintResource
See Also:
  • Field Details

  • Constructor Details

    • BindingResourceConstraint

      public BindingResourceConstraint()
  • Method Details

    • getTitle

      public String getTitle()
      Description copied from interface: IConstraint
      Gets the title of the constraint.
      Specified by:
      getTitle in interface IConstraint
      the title
    • isSatisfied

      public boolean isSatisfied(com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca, INode node, ILogicEntityRoute route)
      Description copied from interface: IConstraint
      Filters out hard constraint mismatches by checking whether a Node demands a Qualification as a hard constraint but the Resource does not provide this one. The idea is to have only soft constraints problems in the optimisation which can get solved by adding cost.
      Specified by:
      isSatisfied in interface IConstraint
      ca - the iEntityCostAssessor
      node - the iNode
      route - the iLogicEntityRoute
      the boolean whether the route is satisfied. True means no problems detected
    • toString

      public String toString()
      toString in class Object
    • assessConstraint

      public com.dna.jopt.assessment.costassessorrestriction.restrictionresult.IEntityRestrictionResult assessConstraint(IEntity en, ILogicEntityRoute route, INode node, com.dna.jopt.assessment.costadjustment.IEntityCostAdjuster cad, com.dna.jopt.assessment.costassessor.IEntityCostAssessor ca, propertyProvider, boolean resultRequested)
      Description copied from interface: IConstraint
      Assesses the route, checking if the appropriate qualifications for the constraints are present.

      The boolean true saves the data.

      Specified by:
      assessConstraint in interface IConstraint
      en - entity
      route - the iLogicEntityRoute
      node - node
      cad - iEntityCostAdjuster
      ca - ca
      propertyProvider - iPropertyProvider
      resultRequested - the boolean whether to save the results of the route
      Entity Restriction Result