Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
3.5 kB · 51 lines
at develop
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152% 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% PARAMETERSint: days ::add_to_output; % number of daysoset of int: DAY = 0..days-1 ::add_to_output;int: roads ::add_to_output; % number of roadsint: centers ::add_to_output; % number of centersint: worksheets ::add_to_output; % number of worksheetsint: activities ::add_to_output; % number of activitiesset 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 dayset of int: CENTER = 0..centers-1 ::add_to_output; % index set for centersarray [CENTER] of int: c_id ::add_to_output; % id of each centerarray [CENTER] of int: available_workers ::add_to_output; % number of available workers per centerset of int: WORKSHEET = 0..worksheets-1 ::add_to_output; % index set for workseetsarray [WORKSHEET] of int: w_id ::add_to_output; % id of each worksheetarray [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 mandatoryarray [WORKSHEET] of int: importance ::add_to_output; % importance of each worksheetarray [WORKSHEET] of int: est ::add_to_output; % earliest starting time for each worksheetarray [WORKSHEET] of int: lst ::add_to_output; % latest starting time for each worksheetarray [WORKSHEET] of int: duration ::add_to_output; % duration in days of each worksheetset 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 = nonearray [WORKSHEET,ACTIVITY] of int: workers ::add_to_output; % number of workers used by each worksheet on a given dayint: blocked_max ::add_to_output; % number of maximum blocked rules for this instanceset of int: BLOCKED = 1..blocked_max ::add_to_output; % index set for maximum blocked rulesarray [BLOCKED] of ROAD: blocked_max_amount ::add_to_output; % max amount of roads that can be blocked of a given setarray [BLOCKED] of set of ROAD: blocked_roads ::add_to_output; % the set of roads that the max amount refers toint: precedences ::add_to_output; % number of precedence rules for this instanceset of int: PREC = 1..precedences ::add_to_output; % index set for the precedence rulesarray [PREC] of WORKSHEET: preceeds ::add_to_output; % the predecessor worksheet in a given rulearray [PREC] of WORKSHEET: succeeds ::add_to_output; % the successor worksheet in a given rule