A set of benchmarks to compare a new prototype MiniZinc implementation
1% N-SITE problem
2% Road Network Maintenance Problem
3%
4% Determine which worksheets to execute on which day so that the road network is not perterbed too much
5% Each worksheet is a contiguous set of daily tasks on roads: specified by a road and number of workers
6% Worksheets have an importance defining how important they are to execute
7%
8% Constraints to satisfy are:
9% Earliest and latest start times of worksheets
10% Not too many workers from each work center on any day
11% For each of a number of given sets of roads never blocking more than a given amount
12% Some worksheets must be executed
13% Precedence rules between pairs of worksheets
14% PARAMETERS
15int: days ::add_to_output; % number of dayso
16set of int: DAY = 0..days-1 ::add_to_output;
17int: roads ::add_to_output; % number of roads
18int: centers ::add_to_output; % number of centers
19int: worksheets ::add_to_output; % number of worksheets
20int: activities ::add_to_output; % number of activities
21
22set of int: ROAD = 0..roads-1 ::add_to_output;
23set of int: ROAD0 = -1..roads-1 ::add_to_output;
24array[ROAD0,DAY] of int: perterb ::add_to_output; % perturbation cost of road on each day
25
26set of int: CENTER = 0..centers-1 ::add_to_output; % index set for centers
27array [CENTER] of int: c_id ::add_to_output; % id of each center
28array [CENTER] of int: available_workers ::add_to_output; % number of available workers per center
29
30set of int: WORKSHEET = 0..worksheets-1 ::add_to_output; % index set for workseets
31array [WORKSHEET] of int: w_id ::add_to_output; % id of each worksheet
32array [WORKSHEET] of int: work_center ::add_to_output; % id of the work center where used by each worksheet
33array [WORKSHEET] of 0..1: mandatory ::add_to_output; % whether each worksheet is mandatory
34array [WORKSHEET] of int: importance ::add_to_output; % importance of each worksheet
35array [WORKSHEET] of int: est ::add_to_output; % earliest starting time for each worksheet
36array [WORKSHEET] of int: lst ::add_to_output; % latest starting time for each worksheet
37array [WORKSHEET] of int: duration ::add_to_output; % duration in days of each worksheet
38set of int: ACTIVITY = 0..activities-1 ::add_to_output;
39array [WORKSHEET,ACTIVITY] of ROAD0: road ::add_to_output; % road used by each worksheet on a given day -1 = none
40array [WORKSHEET,ACTIVITY] of int: workers ::add_to_output; % number of workers used by each worksheet on a given day
41
42int: blocked_max ::add_to_output; % number of maximum blocked rules for this instance
43set of int: BLOCKED = 1..blocked_max ::add_to_output; % index set for maximum blocked rules
44array [BLOCKED] of ROAD: blocked_max_amount ::add_to_output; % max amount of roads that can be blocked of a given set
45array [BLOCKED] of set of ROAD: blocked_roads ::add_to_output; % the set of roads that the max amount refers to
46
47int: precedences ::add_to_output; % number of precedence rules for this instance
48set of int: PREC = 1..precedences ::add_to_output; % index set for the precedence rules
49array [PREC] of WORKSHEET: preceeds ::add_to_output; % the predecessor worksheet in a given rule
50array [PREC] of WORKSHEET: succeeds ::add_to_output; % the successor worksheet in a given rule
51