Additional declarations for Gecode¶
These annotations and predicates are available for the Gecode solver. In order to use them in a model, include the file “gecode.mzn”.
Additional Gecode search annotations¶
Parameters¶
Select variable with largest activity count
Select variable with smallest activity count
Select variable with largest activity count divided by domain size
Select variable with smallest activity count divided by domain size
Select variable with largest accumulated failure count
Select variable with smallest accumulated failure count
Select variable with largest accumulated failure count divided by domain size
Select variable with smallest accumulated failure count divided by domain size
Select random variable
Functions and Predicates¶
Specify default search strategy for Boolean variables to use variable selection
strategy varsel
, and value choice strategy valsel
.
Specify default search strategy for float variables to use variable selection
strategy varsel
, and value choice strategy valsel
.
Specify default search strategy for integer variables to use variable selection
strategy varsel
, and value choice strategy valsel
.
Simple large neighbourhood search strategy: upon restart, for each variable in x
,
the probability of it being fixed to the previous solution is percentage
(out of 100).
Simple large neighbourhood search strategy: upon restart, for each variable in x
,
the probability of it being fixed to the previous solution is percentage
(out of 100).
Start from an initial solution y
.
Specify default search strategy for set variables to use variable selection
strategy varsel
, and value choice strategy valsel
.
Additional Gecode constraints¶
Every subsequence of x
of length l
has at least m
and at most n
occurrences
of the values in S
Every subsequence of x
of length l
has at least m
and at most n
occurrences
of the values in S
Constrains the elements of x
to define a circuit where x
[ i
] = j
means
that j
is the successor of i
. Additionally, constrain z
to
be the cost of the circuit. Each edge cost is defined by array c
.
Constrains the elements of x
to define a circuit where x
[ i
] = j
means
that j
is the successor of i
. Additionally, constrain z
to
be the cost of the circuit. Each edge cost is defined by array c
. The variables
y
[i] are constrained to be the edge cost of the node x
[i].
Constrain z
to be the intersection of all sets
in y
that are selected by x
: \(i \in {\bf z} \leftrightarrow \forall j \in {\bf x}: (i \in {\bf y}[j])\)
Constrain z
to be a subset of u
, and z
to be the intersection of all sets
in y
that are selected by x
: \(i \in {\bf z} \leftrightarrow \forall j \in {\bf x}: (i \in {\bf y}[j])\)
Constrain z
to be the disjoint union of all sets
in y
that are selected by x
: \(i \in {\bf z} \leftrightarrow \exists j \in {\bf x}: (i \in {\bf y}[j])\)
and \(i \in {\bf x} \land j \in {\bf x} \land i\neq j \rightarrow {\bf y}[i] \cap {\bf y}[j]=\emptyset\)