de.sciss

poirot

package poirot

Package for defining variables, constraints, global constraints and search methods for JaCoP constraint solver in Scala.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. poirot
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class BooleanVar extends IntVar

    Defines a boolean variable and its primitive constraints.

  2. class FSM extends org.jacop.util.fsm.FSM

    FSM specification for regular constraint.

  3. class IndomainRandom[A <: IntVar] extends Indomain[A]

    Like IndomainRandom but with explicit random generator argument.

  4. class IntSet extends IntervalDomain

    Defines an ordered set of integers and basic operations on these sets.

  5. class IntVar extends org.jacop.core.IntVar

    Defines a finite domain integer variable and its primitive constraints.

  6. class Model extends Store

    Manages all variables, constraints and global constraints for JaCoP constraint solver.

  7. class Network extends NetworkBuilder

    Network specification for networkflow constraint

  8. trait Problem extends AnyRef

  9. class ScalaSolutionListener[A <: Var] extends SimpleSolutionListener[A]

    Solution listener that prints solutions of search using user specified functions.

  10. class SetVar extends org.jacop.set.core.SetVar

    Defines a set variable and its primitive constraints.

  11. case class Stats(nodes: Int, decisions: Int, wrong: Int, backtracks: Int, depth: Int, solutions: Int) extends Product with Serializable

  12. type Vec[+A] = IndexedSeq[A]

Value Members

  1. def AND(xs: PrimitiveConstraint*)(implicit model: Model): PrimitiveConstraint

    Wrapper for org.jacop.constraints.And.

    Wrapper for org.jacop.constraints.And.

    xs

    constraints to be conjunction.

    returns

    the constraint that is a a conjunction of constraints.

  2. object BooleanVar

  3. object FSM

  4. object Implicits

    Implicit conversions of Int and Bool to IntVar and BoolVar.

  5. object IntSet

  6. object IntVar

  7. object Model

  8. def NOT(constr: PrimitiveConstraint)(implicit model: Model): PrimitiveConstraint

    Wrapper for org.jacop.constraints.Not.

    Wrapper for org.jacop.constraints.Not.

    constr

    constraints to be negated.

    returns

    the negated constraint.

  9. object Network

  10. def OR(list: PrimitiveConstraint*)(implicit model: Model): PrimitiveConstraint

    Wrapper for org.jacop.constraints.Or.

    Wrapper for org.jacop.constraints.Or.

    list

    constraints to be disjunction.

    returns

    the constraint that is a a disjunction of constraints.

  11. val Vec: IndexedSeq.type

  12. def abs(x: IntVar)(implicit model: Model): IntVar

    Wrapper for org.jacop.constraints.AbsXeqY.

    Wrapper for org.jacop.constraints.AbsXeqY.

    x

    variable for abs operation.

    returns

    absolute value result.

  13. def allDifferent(xs: Iterable[IntVar])(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.Alldiff.

    Wrapper for org.jacop.constraints.Alldiff.

    xs

    set of variables to be different.

  14. def allDistinct(xs: Iterable[IntVar])(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.Alldistinct.

    Wrapper for org.jacop.constraints.Alldistinct.

    xs

    set of variables to be different.

  15. def among(listX: Array[IntVar], listY: Array[IntVar], n: IntVar)(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.AmongVar.

    Wrapper for org.jacop.constraints.AmongVar.

    XXX TODO: remove arrays, unify sequences, rename to assignAmong, add proper among

    listX

    array of variables.

    listY

    array of variables to be checked if their values .

    n

    number of values found.

  16. def among(xs: Iterable[IntVar], kSet: IntSet, n: IntVar)(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.Among.

    Wrapper for org.jacop.constraints.Among.

    XXX TODO: rename to assignAmong, add proper among

    xs

    variables.

    kSet

    values to be checked.

    n

    number of values found.

  17. def antiFirstFail[A <: Var]: LargestDomain[A]

    Wrapper for org.jacop.search.LargestDomain.

    Wrapper for org.jacop.search.LargestDomain.

    returns

    related variable selection method.

  18. def antiFirstFailSet[A <: org.jacop.set.core.SetVar]: MaxCardDiff[A]

    Wrapper for org.jacop.set.search.MaxCardDiff.

    Wrapper for org.jacop.set.search.MaxCardDiff.

    returns

    related variable selection method.

  19. def assignment(x: Array[IntVar], y: Array[IntVar])(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.Assignment.

    Wrapper for org.jacop.constraints.Assignment.

    XXX TODO: remove arrays, unify sequences

    x

    array of variables.

    y

    array variables that values are permutation of x.

  20. def binPacking(bins: (IntVar, IntVar, Int)*)(implicit model: Model): Unit

    Wrapper for org.

    Wrapper for org.jacop.constraints.binpack.Binpack (?).

    bins

    list containing which tuples of bins, their loads and their weights

  21. def card(s: SetVar, n: Int)(implicit model: Model): Unit

    Wrapper for org.jacop.set.constraints.CardA.

    Wrapper for org.jacop.set.constraints.CardA.

    s

    constrained set variable.

    n

    cardinality.

  22. def card(s: SetVar)(implicit model: Model): IntVar

    Wrapper for org.jacop.set.constraints.CardAeqX.

    Wrapper for org.jacop.set.constraints.CardAeqX.

    s

    constrained set variable.

    returns

    variable defining cardinality of s.

  23. def circuit(nodes: Iterable[IntVar])(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.Circuit.

    Wrapper for org.jacop.constraints.Circuit.

    nodes

    variables, which domains define next nodes in the graph.

  24. def count(xs: Iterable[IntVar], value: Int)(implicit model: Model): IntVar

    Wrapper for org.jacop.constraints.Count.

    Wrapper for org.jacop.constraints.Count.

    xs

    variables to count number of values value.

    returns

    number of values value.

  25. def cumulative(xs: Iterable[(IntVar, IntVar, IntVar)], limit: IntVar)(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.Cumulative.

    Wrapper for org.jacop.constraints.Cumulative.

    xs

    tuples consisting of (t, d, r), where t is start times of tasks, d is duration of tasks, r is number of resources of tasks.

    limit

    limit on number of resources used in a schedule.

  26. def dfs[A <: Var](all: Boolean): DepthFirstSearch[A]

    Depth first search method.

    Depth first search method.

    returns

    standard depth first search.

  27. def diff2(rectangles: Vec[Vec[IntVar]])(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.Diff2.

    Wrapper for org.jacop.constraints.Diff2.

    rectangles

    sequence of four element vectors representing rectangles [x, y, lx, ly]

  28. def diff2(x: Array[IntVar], y: Array[IntVar], lx: Array[IntVar], ly: Array[IntVar])(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.Diff2.

    Wrapper for org.jacop.constraints.Diff2.

    XXX TODO: remove arrays, unify sequences

    x

    coordinate X of rectangle.

    y

    coordinate Y of rectangle.

    lx

    length in derection X of rectangle.

    ly

    length in derection Y of rectangle.

  29. def firstFail[A <: Var]: SmallestDomain[A]

    Wrapper for org.jacop.search.SmallestDomain.

    Wrapper for org.jacop.search.SmallestDomain.

    returns

    related variable selection method.

  30. def firstFailSet[A <: org.jacop.set.core.SetVar]: MinCardDiff[A]

    Wrapper for org.jacop.set.search.MinCardDiff.

    Wrapper for org.jacop.set.search.MinCardDiff.

    returns

    related variable selection method.

  31. def gcc(xs: (IntVar, IntVar)*)(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.GCC.

    Wrapper for org.jacop.constraints.GCC.

    xs

    array of tuples of variables and their counters

  32. def indomainMax[A <: org.jacop.core.IntVar]: IndomainMax[A]

    Wrapper for org.jacop.search.IndomainMax.

    Wrapper for org.jacop.search.IndomainMax.

    returns

    related variable selection method.

  33. def indomainMaxSet[A <: org.jacop.set.core.SetVar]: IndomainSetMax[A]

    Wrapper for org.jacop.set.search.IndomainSetMax.

    Wrapper for org.jacop.set.search.IndomainSetMax.

    returns

    related indomain method.

  34. def indomainMedian[A <: org.jacop.core.IntVar]: IndomainMedian[A]

    Wrapper for org.jacop.search.IndomainMedian.

    Wrapper for org.jacop.search.IndomainMedian.

    returns

    related variable selection method.

  35. def indomainMiddle[A <: org.jacop.core.IntVar]: IndomainMiddle[A]

    Wrapper for org.jacop.search.IndomainMiddle.

    Wrapper for org.jacop.search.IndomainMiddle.

    returns

    related variable selection method.

  36. def indomainMin[A <: org.jacop.core.IntVar]: IndomainMin[A]

     Wrapper for org.jacop.search.IndomainMin.

     Wrapper for org.jacop.search.IndomainMin.

    returns

    related variable selection method.

  37. def indomainMinSet[A <: org.jacop.set.core.SetVar]: IndomainSetMin[A]

    Wrapper for org.jacop.set.search.IndomainSetMin.

    Wrapper for org.jacop.set.search.IndomainSetMin.

    returns

    related indomain method.

  38. def indomainRandom[A <: IntVar](r: Random = new util.Random()): IndomainRandom[A]

    Wrapper for org.jacop.search.IndomainRandom.

    Wrapper for org.jacop.search.IndomainRandom.

    returns

    related variable selection method.

  39. def indomainRandomSet[A <: org.jacop.set.core.SetVar]: IndomainSetRandom[A]

    Wrapper for org.jacop.set.search.IndomainSetRandom.

    Wrapper for org.jacop.set.search.IndomainSetRandom.

    returns

    related indomain method.

  40. def inputOrder[A <: Var]: ComparatorVariable[A]

    Defines null variable selection method that is interpreted by JaCoP as input order.

    Defines null variable selection method that is interpreted by JaCoP as input order.

    XXX TODO: ugly null; ought to use place holde value

    returns

    related variable selection method.

  41. def intAt(index: IntVar, xs: Seq[Int], offset: Int = 0)(implicit model: Model): IntVar

    Wrapper for org.jacop.constraints.Element.

    Wrapper for org.jacop.constraints.Element.

    index

    index to select element from list of elements.

    xs

    sequence of integers that can be assigned to values.

    offset

    value of index offset (shift).

    returns

    the variable yielding the element at the given index

  42. def intVarAt(index: IntVar, xs: Seq[IntVar], offset: Int = 0)(implicit model: Model): IntVar

  43. def knapsack(profits: Array[Int], weights: Array[Int], quantity: List[IntVar], knapsackCapacity: IntVar, knapsackProfit: IntVar)(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.knapsack.Knapsack.

    Wrapper for org.jacop.constraints.knapsack.Knapsack.

    XXX TODO: replace arrays, unify tuples

    profits

    array of profite for items.

    weights

    array of weights for items.

    quantity

    array of quantities of items.

    knapsackCapacity

    knapsack capacity.

    knapsackProfit

    profite when selling items.

  44. def largest[A <: org.jacop.core.IntVar]: LargestMax[A]

    Wrapper for org.jacop.search.LargestMax.

    Wrapper for org.jacop.search.LargestMax.

    returns

    related variable selection method.

  45. def lex(x: Array[Array[IntVar]])(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.Lex.

    Wrapper for org.jacop.constraints.Lex.

    x

    array of vectors of variables to be lexicographically ordered.

  46. def matching[A <: org.jacop.core.IntVar](a: SetVar, list: Iterable[A])(implicit model: Model): Unit

    Wrapper for org.jacop.set.constraints.Match.

    Wrapper for org.jacop.set.constraints.Match.

    a

    a set variable to be matched against list of IntVar.

    list

    variables that get values from the set.

  47. def max(xs: IntVar*)(implicit model: Model): IntVar

    Wrapper for org.jacop.constraints.Max.

    Wrapper for org.jacop.constraints.Max.

    xs

    variables where maximum values is to be found.

    returns

    max value.

  48. var maxNumSolutions: Int

    The maximum number of solutions to be explored.

    The maximum number of solutions to be explored. -1 indicates that there is no limit.

  49. def maxRegret[A <: org.jacop.core.IntVar]: MaxRegret[A]

    Wrapper for org.jacop.search.MaxRegret.

    Wrapper for org.jacop.search.MaxRegret.

    returns

    related variable selection method.

  50. def maximize[A <: Var](select: SelectChoicePoint[A], cost: IntVar, printSolutions: () ⇒ Unit*)(implicit m: ClassTag[A], model: Model): Boolean

    Maximization search method.

    Maximization search method.

    select

    select method defining variable selection and value assignment methods.

    cost

    Cost variable

    returns

    true if solution found and false otherwise.

  51. def maximizeSeq[A <: Var](select: Iterable[SelectChoicePoint[A]], cost: IntVar, printSolutions: () ⇒ Unit*)(implicit m: ClassTag[A], model: Model): Boolean

    Maximization method for sequence of search methods (specified by list of select methods).

    Maximization method for sequence of search methods (specified by list of select methods).

    select

    list of select methods defining variable selection and value assignment methods for sequence of searchs.

    cost

    Cost variable

    returns

    true if solution found and false otherwise.

  52. def min(xs: IntVar*)(implicit model: Model): IntVar

    Wrapper for org.jacop.constraints.Min.

    Wrapper for org.jacop.constraints.Min.

    xs

    variables where minimum values is to be found.

    returns

    minimum value.

  53. def minGLBCard[A <: org.jacop.set.core.SetVar]: MinGlbCard[A]

    Wrapper for org.jacop.set.search.MinGlbCard.

    Wrapper for org.jacop.set.search.MinGlbCard.

    returns

    related variable selection method.

  54. def minLUBCard[A <: org.jacop.set.core.SetVar]: MinLubCard[A]

    Wrapper for org.jacop.set.search.MinLubCard.

    Wrapper for org.jacop.set.search.MinLubCard.

    returns

    related variable selection method.

  55. def minimize[A <: Var](select: SelectChoicePoint[A], cost: IntVar, printSolutions: () ⇒ Unit*)(implicit m: ClassTag[A], model: Model): Boolean

    Minimization search method.

    Minimization search method.

    select

    select method defining variable selection and value assignment methods.

    cost

    Cost variable

    returns

    true if solution found and false otherwise.

  56. def minimizeSeq[A <: Var](select: Iterable[SelectChoicePoint[A]], cost: IntVar, printSolutions: () ⇒ Unit*)(implicit m: ClassTag[A], model: Model): Boolean

    Minimization method for sequence of search methods (specified by list of select methods).

    Minimization method for sequence of search methods (specified by list of select methods).

    select

    list of select methods defining variable selection and value assignment methods for sequence of searchs.

    cost

    Cost variable

    returns

    true if solution found and false otherwise.

  57. def mostConstrained[A <: Var]: MostConstrainedStatic[A]

    Wrapper for org.jacop.search.MostConstrainedStatic.

    Wrapper for org.jacop.search.MostConstrainedStatic.

    returns

    related variable selection method.

  58. def mostConstrainedSet[A <: org.jacop.set.core.SetVar]: MostConstrainedStatic[A]

    Wrapper for org.jacop.search.MostConstrainedStatic.

    Wrapper for org.jacop.search.MostConstrainedStatic.

    returns

    related variable selection method.

  59. def networkFlow(net: NetworkBuilder)(implicit model: Model): Unit

  60. def numDistinct(xs: IntVar*)(implicit model: Model): IntVar

    Wrapper for org.jacop.constraints.Values.

    Wrapper for org.jacop.constraints.Values.

    xs

    variables to count number of different values.

    returns

    number of different values.

  61. var recordSolutions: Boolean

  62. def regular(dfa: FSM, vars: Iterable[IntVar])(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.regular.Regular.

    Wrapper for org.jacop.constraints.regular.Regular.

    dfa

    specification of finite state machine using class fsm.

    vars

    list of variables assigned to fsm nodes.

  63. def satisfy[A <: Var](select: SelectChoicePoint[A], printSolutions: () ⇒ Unit*)(implicit m: ClassTag[A], model: Model): Boolean

    Search method that finds a solution.

    Search method that finds a solution.

    select

    select method defining variable selection and value assignment methods.

    returns

    true if solution found and false otherwise.

  64. def satisfyAll[A <: Var](select: SelectChoicePoint[A], printSolutions: () ⇒ Unit*)(implicit m: ClassTag[A], model: Model): Boolean

    Search method that finds all solutions.

    Search method that finds all solutions.

    select

    select method defining variable selection and value assignment methods.

    returns

    true if solution found and false otherwise.

  65. def satisfyAllSeq[A <: Var](select: Iterable[SelectChoicePoint[A]], printSolutions: () ⇒ Unit*)(implicit m: ClassTag[A], model: Model): Boolean

    Search method for finding all solutions using a sequence of search methods (specified by list of select methods).

    Search method for finding all solutions using a sequence of search methods (specified by list of select methods).

    select

    list of select methods defining variable selection and value assignment methods for sequence of searchs.

    returns

    true if solution found and false otherwise.

  66. def satisfySeq[A <: Var](select: Iterable[SelectChoicePoint[A]], printSolutions: () ⇒ Unit*)(implicit m: ClassTag[A], model: Model): Boolean

    Search method for finding a solution using a sequence of search methods (specified by list of select methods).

    Search method for finding a solution using a sequence of search methods (specified by list of select methods).

    select

    list of select methods defining variable selection and value assignment methods for sequence of searchs.

    returns

    true if solution found and false otherwise.

  67. def search[A <: Var](vars: Iterable[A], heuristic: ComparatorVariable[A], indom: Indomain[A])(implicit m: ClassTag[A]): SelectChoicePoint[A]

    Defines list of variables, their selection method for search and value selection

    Defines list of variables, their selection method for search and value selection

    returns

    select method for search.

  68. def searchSplit[A <: org.jacop.core.IntVar](vars: Iterable[A], heuristic: ComparatorVariable[A])(implicit m: ClassTag[A]): SelectChoicePoint[A]

    Defines list of variables, their selection method for split search and value selection

    Defines list of variables, their selection method for split search and value selection

    returns

    select method for search.

  69. def searchVector[A <: Var](vars: Vec[Vec[A]], heuristic: ComparatorVariable[A], indom: Indomain[A])(implicit m: ClassTag[A]): SelectChoicePoint[A]

    Defines list of variables, their selection method for sequential search and value selection

    Defines list of variables, their selection method for sequential search and value selection

    returns

    select method for search.

  70. def sequence(list: Array[IntVar], set: IntSet, q: Int, min: Int, max: Int)(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.Sequence.

    Wrapper for org.jacop.constraints.Sequence.

    list

    list of variables to be constrained.

    set

    set of values to be checked.

    q

    length of the sub-sequence.

    min

    minimal number of occurrences of values in the sub-sequence.

    max

    maximal number of occurrences of values in the sub-sequence.

  71. def smallest[A <: org.jacop.core.IntVar]: SmallestMin[A]

    Wrapper for org.jacop.search.SmallestMin.

    Wrapper for org.jacop.search.SmallestMin.

    returns

    related variable selection method.

  72. def smallestMin[A <: org.jacop.core.IntVar]: SmallestMin[A]

    Wrapper for org.jacop.search.SmallestMin.

    Wrapper for org.jacop.search.SmallestMin.

    returns

    related variable selection method.

  73. def smallestSet[A <: org.jacop.set.core.SetVar]: MinGlbCard[A]

    Currently equivalent to minGLBCard.

    Currently equivalent to minGLBCard.

    returns

    related variable selection method.

  74. def softAlldifferent(xVars: Array[IntVar], costVar: IntVar)(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.SoftAlldifferent.

    Wrapper for org.jacop.constraints.SoftAlldifferent.

    xVars

    array of variables to be constrained to be different.

    costVar

    measures degree of violation (uses value based violation).

  75. def softGCC(xVars: Array[IntVar], hardLowerBound: Array[Int], hardUpperBound: Array[Int], countedValue: Array[Int], softCounters: Array[IntVar], costVar: IntVar)(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.SoftGCC.

    Wrapper for org.jacop.constraints.SoftGCC.

    xVars

    array of variables to be constrained to be different.

    hardLowerBound

    lower bound on limits that can not be violated.

    hardUpperBound

    upper bound on limits that can not be violated

    countedValue

    values that are counted.

    softCounters

    specifies preferred values for counters and can be violated.

  76. def stretch(values: Array[Int], min: Array[Int], max: Array[Int], x: Array[IntVar])(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.Stretch.

    Wrapper for org.jacop.constraints.Stretch.

    values

    a list of values to be assigned to sub-sequences.

    min

    minimal length of the sub-sequence for each value on position i.

    max

    maximal length of the sub-sequence for each value on position i.

    x

    list of variables to be constrained.

  77. def sum(xs: Iterable[IntVar])(implicit model: Model): IntVar

    Wrapper for org.jacop.constraints.Sum.

    Wrapper for org.jacop.constraints.Sum.

    xs

    variables to be summed up.

    returns

    summation result.

  78. def table(list: Iterable[(IntVar, Iterable[Int])])(implicit model: Model): Unit

    Wrapper for org.jacop.constraints.ExtensionalSupportVA.

    Wrapper for org.jacop.constraints.ExtensionalSupportVA.

    XXX TODO: rename to assignTable, add proper table

    list

    sequence of tuples consisting of variables and sequences of allowed values be assigned

  79. var timeOut: Int

    The search time out in seconds.

    The search time out in seconds. -1 indicates that there is no time out.

  80. var trace: Boolean

  81. def weightedSum(vars: Seq[IntVar], weights: Seq[Int])(implicit model: Model): IntVar

    Wrapper for org.jacop.constraints.SumWeight.

    Wrapper for org.jacop.constraints.SumWeight.

    vars

    variables to sum

    weights

    weights for the variables

    returns

    summation result.

  82. def withStatistics[Z](block: ⇒ Z): (Z, Stats)

Inherited from AnyRef

Inherited from Any

Ungrouped