logmip1c.gms : LogMIP User's Manual Example 1c - Job Scheduling

Description

```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, 2007,
http://www.logmip.ceride.gov.ar/files/pdfs/logmip_manual.pdf

Keywords: extended mathematical programming, disjunctive programming,
job scheduling, execution sequence
```

Small Model of Type : EMP

Category : GAMS Model library

Main file : logmip1c.gms

``````\$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, 2007,
http://www.logmip.ceride.gov.ar/files/pdfs/logmip_manual.pdf

Keywords: extended mathematical programming, disjunctive programming,
job scheduling, execution sequence
\$offText

Set
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;

Variable
t        'completion time'
x(j)     'job starting time'
pr(j,jj) 'job precedence';

Positive Variable x;
Binary   Variable pr;

Equation
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) <> 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;
``````
GAMS Development Corp.
GAMS Software GmbH

General Information and Sales
U.S. (+1) 202 342-0180
Europe: (+49) 221 949-9170