%
% Bin packing as a scheduling problem.
%
% Here we see the bin packing as a scheduling problem (with
% assignments) as follows:
% - the number of things to pack is the number of jobs
% - the capacity of each bin is the number of workers
% - the weight/height of each thing is the resource
% - all durations is set to 1
% - max_time is the number of workers
% - the minimum number of bins to use (to be minimized)
% is then - of course - the makespan.
%
% Problem instance from
% Robert A. McGuigan: "Scheduling Problems and Bin Packing",
% from Applications of Discrete Mathematics, chapter 11,
% page 198
%
num_jobs = 25; % num_stuff = 0;
num_workers = 100; % bin_capacity = 100;
% 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
resource = [7,7,7,7,7,12,12,12,12,12,15,15,15,36,36,36,36,36,52,52,52,52,52,52,52];
duration = [1 | i in 1..num_jobs];
max_time = num_workers; % optimal: 7
allow_idle = true;
collect_workers = false;
do_precendences = false;
num_precedences = 1;
precedences = array2d(1..num_precedences, 1..2,
[
0,0 % dummy
]);