Constraints
A constraint is a logic formula defining allowed combinations of values for a set of variables (see Variables), i.e., restrictions over variables that must be respected in order to get a feasible solution. A constraint is equipped with a (set of) filtering algorithm(s), named propagator(s). A propagator removes, from the domains of the target variables, values that cannot correspond to a valid combination of values. A solution of a problem is a variable-value assignment verifying all the constraints.
Constraints are directly declared from a Model object (see Model).
Integer and boolean constraints
All constraints over integer and boolean variables are declared in the IntConstraintFactory abstract class, which is implemented by the Model class.
absolute
all_different
all_different_except_0
all_different_prec
all_equal
among
and
argmax
argmin
arithm
at_least_n_values
at_most_n_values
bin_packing
bits_int_channeling
bools_int_channeling
circuit
clauses_int_channeling
cost_regular
count
cumulative
decreasing
diff_n
distance
div
element
global_cardinality
increasing
int_value_precede_chain
inverse_channeling
keysort
knapsack
lex_chain_less
lex_chain_less_eq
lex_less
lex_less_eq
max
mddc
member
min
mod
multi_cost_regular
n_values
not
not_all_equal
not_member
or
path
pow
regular
scalar
sort
square
sub_circuit
sub_path
sum
table
times
tree
Set constraints
All constraints over set variables in the SetConstraintFactory abstract class, which is implemented by the Model class. Set constraints have the set_ prefix, indeed, as several set constraints have the same name as int constraints, we made the choice to semantically distinguish them, contrarily to the Choco Java API, as method Python does not support method overloading.
set_all_different
set_all_disjoint
set_all_equal
set_bools_channeling
set_disjoint
set_element
set_intersection
set_ints_channeling
set_inverse_set
set_le
set_lt
set_max
set_max_indices
set_member_int
set_member_set
set_min
set_min_indices
set_nb_empty
set_not_empty
set_not_member_int
set_offset
set_partition
set_subset_eq
set_sum
set_sum_element
set_symmetric
set_union
set_union_indices
Graph constraints
All constraints over graph variables in the GraphConstraintFactory abstract class, which is implemented by the Model class. Graph constraints have the graph_ prefix, indeed, as method Python does not support method overloading, we made the choice to semantically distinguish them to avoid method name conflicts.