Variables represent working shifts. If a shift needs more than one
employee, then it is represented by a number of variables equal to the number
of required employees. So, each variable requires a single employee to be
assigned to it.
Values represent employees that have to be assigned to working shifts.
Parameters of binary ETPs
n - the number of variables,
k - the total number of values in the problem,
p1 - the
density of the constraint graph (the probability that a constraint exists
between a pair of variables),
avg_size - the
probability that a value belongs to a domain of a variable.
Non-binary constraints
Kinds of non-binary constraints of finite capacity:
a limit of the total number of assignments per value (employee).
a limit on the number of some specific assignments (night shifts,
for example) per value (employee).
Representation of non-binary constraints of finite capacity.
a non-binary constraints of the first kind:
an array MaxCounter1 of size k, where MaxCounter1[i]
holds a limit of the total number of assignments of a value i.
a non-binary constraints of the second kind:
an array MaxCounter2 of size k, where MaxCounter2[i]
holds a limit on the number of some specific assignments of a value i.
an array Group2 of size n, where Group2[i] = 1 if
i is in the set of variables constrained by this non-binary constraints,
otherwise Group2[i] = 0.
Standard format of a problem
Concrete problem
Definition of values of the parameters n, k in the format:
VALUE_OF_N,VALUE_OF_K
Definition of domains of variables in the format:
VALUE(,VALUE)*EOLN n times
Definition of binary constraints in the format:
(VARIABLE:VARIABLE(,VARIABLE)*EOLN)*
Definition of the non-binary constraint of the first kind, if it exists.
For each value the limit of its counter should be defined. The format is:
COUNTER1
MAX1,MAX2,...,MAXk
Definition of the non-binary constraint of the second kind, if it exists.
For each value the limit of its counter should be defined. The format
is:
COUNTER2
MAX1,MAX2,...,MAXk
The list of variables constrained by the non-binary constraint should be
defined in the format:
VARIABLE(,VARIABLE)*
Random problem
The values of the parameters n, k, p1,
avg_size should be defined.
A non-binary constraint of the first kind, if it exists.
A non-binary constraint of the second kind, if it exists.