Job Shop Scheduling Model: JOBSLT
In this model, there are six jobs that can be done on one machine. The machine can only work on one job at a time. Each of the jobs has a due date. If we can't complete a job by its due date, we do not take the job. Our objective is to maximize the total value of the jobs selected.
Although we have based this model on a job shop scenario, the basic principles should be applicable in any area where time is the limiting factor in deciding what projects to undertake.
MODEL:
! One machine job selection;
SETS:
! There are six jobs each of which has a Due Date,
Processing Time, Value, and a flag variable Y
indicating if the job has been selected.;
JOB/1..6/: ! Each job has a...;
DD, ! Due date;
PT, ! Processing time;
VAL, ! Value if job is selected;
Y; ! = 1 if job is selected, else 0;
ENDSETS
DATA:
VAL = 9 2 4 2 4 6;
DD = 9 3 6 5 7 2;
PT = 5 2 4 3 1 2;
ENDDATA
! Maximize the total value of the jobs taken;
MAX = TVAL;
TVAL = @SUM( JOB: VAL * Y);
! For the jobs we do, we do in due date order;
@FOR( JOB( J):
! Only jobs with earlier due dates can
precede job J, and jobs must be completed
by their due dates;
@SUM( JOB( I)| DD( I) #LT# DD( J) #OR#
( DD( I) #EQ# DD( J) #AND# I #LE# J):
PT( I) * Y( I)) <= DD( J);
! Make the Y's binary;
@BIN( Y);
);
END
Model: JOBSLT