logmip1c.gms : LogMIP User's Manual Example 1c - Job Scheduling
Three jobs (A,B,C) must be executed sequentially in three steps, but
not all jobs require all the stages. The objective is to obtain the
sequence of tasks which minimizes the completion time. Once a job has
started it cannot be interrupted. The objective is to obtain the
sequence of task, which minimizes the completion time.
In this model we use a precedence formulation.
Ref: Raman & Grossmann, Comp. & Chem. Eng., 18, 7, p.563-578, 1994.
Aldo Vecchietti, LogMIP User's Manual, http://www.logmip.ceride.gov.ar/
References:
- Vecchietti, A, LogMIP User's Manual, 2007. http://www.logmip.ceride.gov.ar/eng/documentation/logmip_manual.pdf
- Raman, R, and Grossmann, I E, Modeling and Computational Techniques for Logic Based Integer Programming. Computers and Chemical Engineering 18, 7 (1994), 563-578.
Small Model of Type: EMP
$Title LogMIP User's Manual Example 1c - Job Scheduling (LOGMIP1C,SEQ=334)
$ontext
Three jobs (A,B,C) must be executed sequentially in three steps, but
not all jobs require all the stages. The objective is to obtain the
sequence of tasks which minimizes the completion time. Once a job has
started it cannot be interrupted. The objective is to obtain the
sequence of task, which minimizes the completion time.
In this model we use a precedence formulation.
Ref: Raman & Grossmann, Comp. & Chem. Eng., 18, 7, p.563-578, 1994.
Aldo Vecchietti, LogMIP User's Manual, http://www.logmip.ceride.gov.ar/
$offtext
sets j jobs / A, B, C /
s stages / 1*3 /
alias (j,jj),(s,ss);
set less(j,jj) upper triangle;
table p(j,s) processing time
1 2 3
A 5 3
B 3 2
C 2 4
parameter c(j,s) stage completion time
w(j,jj) pairwise waiting time
pt(j) total processing time;
less(j,jj) = ord(j) < ord(jj);
c(j,s) = sum(ss$(ord(ss)<=ord(s)), p(j,ss));
w(j,jj) = smax(s, c(j,s) - c(jj,s-1));
pt(j) = sum(s, p(j,s));
display c,w,pt;
variables t completion time
x(j) job starting time
pr(j,jj) job precedence
positive variable x; binary variable pr;
equations comp(j) job completion time
seq(j,jj) job sequencing j beore jj
dummy force names into model;
comp(j).. t =g= x(j) + pt(j);
seq(j,jj)$(ord(j) ne ord(jj)).. x(j) + w(j,jj) =l= x(jj);
dummy.. sum(less(j,jj), pr(j,jj)) =g= 0;
x.up(j) = 1000;
model m / all /;
* by default the convex hull formulation is used
file fx /"%lm.info%"/; put fx 'disjunction';
loop(less(j,jj),
put / pr(j,jj) seq(j,jj) 'else' seq(jj,j);
);
putclose;
option emp=logmip;
solve m using emp minimizing t;