Class ConstraintSatisfactionProblem

All Implemented Interfaces:
Serializable, Cloneable, Iterable<OptProbElement>, Collection<OptProbElement>, Set<OptProbElement>
Direct Known Subclasses:

public class ConstraintSatisfactionProblem extends GeneralConstraintSatisfactionProblem
This class models a general constraint satisfaction problem.
Matthias Thimm
See Also:
Serialized Form
  • Constructor Details

    • ConstraintSatisfactionProblem

      public ConstraintSatisfactionProblem()
      Creates a new and empty csp.
    • ConstraintSatisfactionProblem

      public ConstraintSatisfactionProblem(Collection<? extends Statement> statements)
      Creates a new csp with the given statements
      statements - a collection of statements.
  • Method Details

    • toNormalizedForm

      public ConstraintSatisfactionProblem toNormalizedForm()
      Normalizes this problem, i.e. every constraint is brought into an equivalent form "T> 0" or "T >= 0" or "T = 0" or "T != 0".
      a csp.
    • isLinear

      public boolean isLinear()
      Checks whether every constraint of this problem is linear.
      "true" if every constraint of this problem is linear.
    • isInteger

      public boolean isInteger()
      Checks whether this problem is integer, i.e. whether all variables are integer variables.
      "true" if this problem is integer.
    • isMinimumFree

      public boolean isMinimumFree()
      Checks whether this problem uses no minimum function.
      "true" if this problem uses no minimum function.
    • resolveMinimums

      public void resolveMinimums()
      Resolves all occurrences of minimums by substituting a minimum "min{a,b}" by "0.5 a + 0.5 b - abs(a-b)".
    • resolveMaximums

      public void resolveMaximums()
      Resolves all occurrences of maximums by substituting a maximum "max{a,b}" by "0.5 a + 0.5 b + abs(a-b)".
    • getVariables

      public Set<Variable> getVariables()
      Returns all variables of this problem.
      all variables of this problem.
    • getMinimums

      public Set<Minimum> getMinimums()
      Returns all minimums appearing in this problem.
      all minimums appearing in this problem.
    • collapseAssociativeOperations

      public void collapseAssociativeOperations()
      This method collapses all associative operations appearing in the target function and the constraints, e.g. every min{min{a,b},c} becomes min{a,b,c}
    • toString

      public String toString()
      toString in class AbstractCollection<OptProbElement>
    • clone

      clone in class HashSet<OptProbElement>