52 lines
3.4 KiB
Plaintext
52 lines
3.4 KiB
Plaintext
% N-SITE problem
|
|
% Road Network Maintenance Problem
|
|
%
|
|
% Determine which worksheets to execute on which day so that the road network is not perterbed too much
|
|
% Each worksheet is a contiguous set of daily tasks on roads: specified by a road and number of workers
|
|
% Worksheets have an importance defining how important they are to execute
|
|
%
|
|
% Constraints to satisfy are:
|
|
% Earliest and latest start times of worksheets
|
|
% Not too many workers from each work center on any day
|
|
% For each of a number of given sets of roads never blocking more than a given amount
|
|
% Some worksheets must be executed
|
|
% Precedence rules between pairs of worksheets
|
|
% PARAMETERS
|
|
int: days ::add_to_output; % number of dayso
|
|
set of int: DAY = 0..days-1 ::add_to_output;
|
|
int: roads ::add_to_output; % number of roads
|
|
int: centers ::add_to_output; % number of centers
|
|
int: worksheets ::add_to_output; % number of worksheets
|
|
int: activities ::add_to_output; % number of activities
|
|
|
|
set of int: ROAD = 0..roads-1 ::add_to_output;
|
|
set of int: ROAD0 = -1..roads-1 ::add_to_output;
|
|
array[ROAD0,DAY] of int: perterb ::add_to_output; % perturbation cost of road on each day
|
|
|
|
set of int: CENTER = 0..centers-1 ::add_to_output; % index set for centers
|
|
array [CENTER] of int: c_id ::add_to_output; % id of each center
|
|
array [CENTER] of int: available_workers ::add_to_output; % number of available workers per center
|
|
|
|
set of int: WORKSHEET = 0..worksheets-1 ::add_to_output; % index set for workseets
|
|
array [WORKSHEET] of int: w_id ::add_to_output; % id of each worksheet
|
|
array [WORKSHEET] of int: work_center ::add_to_output; % id of the work center where used by each worksheet
|
|
array [WORKSHEET] of 0..1: mandatory ::add_to_output; % whether each worksheet is mandatory
|
|
array [WORKSHEET] of int: importance ::add_to_output; % importance of each worksheet
|
|
array [WORKSHEET] of int: est ::add_to_output; % earliest starting time for each worksheet
|
|
array [WORKSHEET] of int: lst ::add_to_output; % latest starting time for each worksheet
|
|
array [WORKSHEET] of int: duration ::add_to_output; % duration in days of each worksheet
|
|
set of int: ACTIVITY = 0..activities-1 ::add_to_output;
|
|
array [WORKSHEET,ACTIVITY] of ROAD0: road ::add_to_output; % road used by each worksheet on a given day -1 = none
|
|
array [WORKSHEET,ACTIVITY] of int: workers ::add_to_output; % number of workers used by each worksheet on a given day
|
|
|
|
int: blocked_max ::add_to_output; % number of maximum blocked rules for this instance
|
|
set of int: BLOCKED = 1..blocked_max ::add_to_output; % index set for maximum blocked rules
|
|
array [BLOCKED] of ROAD: blocked_max_amount ::add_to_output; % max amount of roads that can be blocked of a given set
|
|
array [BLOCKED] of set of ROAD: blocked_roads ::add_to_output; % the set of roads that the max amount refers to
|
|
|
|
int: precedences ::add_to_output; % number of precedence rules for this instance
|
|
set of int: PREC = 1..precedences ::add_to_output; % index set for the precedence rules
|
|
array [PREC] of WORKSHEET: preceeds ::add_to_output; % the predecessor worksheet in a given rule
|
|
array [PREC] of WORKSHEET: succeeds ::add_to_output; % the successor worksheet in a given rule
|
|
|