logmip1b.gms : LogMIP User's Manual Example 1b - 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 will use the THEN ELSE construct and use only 3 binary variables. Note that only the LOGMIP instructions are different. 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

**References**

- Vecchietti, A, LogMIP User's Manual, 2007. http://www.logmip.ceride.gov.ar/files/pdfs/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

**Category :** GAMS Model library

**Main file :** logmip1b.gms

```
$title LogMIP User's Manual Example 1b - Job Scheduling (LOGMIP1B,SEQ=333)
$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 will use the THEN ELSE construct and use only 3
binary variables. Note that only the LOGMIP instructions are different.
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
$offText
Set
I / 1*3 /
J / A, B, C /;
Positive Variable X(J), T;
Variable Z;
Equation equat1, equat2, equat3, equat4, equat5, equat6, equat7, equat8, equat9, OBJECTIVE;
equat1.. T =g= X('A') + 8;
equat2.. T =g= X('B') + 5;
equat3.. T =g= X('C') + 6;
equat4.. X('A') - X('C') =l= -5;
equat5.. X('C') - X('A') =l= -2;
equat6.. X('B') - X('C') =l= -1;
equat7.. X('C') - X('B') =l= -6;
equat8.. X('A') - X('B') =l= -5;
equat9.. X('B') - X('A') =l= 0;
OBJECTIVE.. Z =e= T;
Model PEQUE1 / all /;
X.up(J) = 20;
$onEcho > "%LM.INFO%"
* by default the convex hull formulation is used
disjunction * equat4 else equat5
disjunction * equat6 else equat7
disjunction * equat8 else equat9
* optional, if not set LOGMIP will find the modeltype suitable
modeltype mip
$offEcho
option emp = logmip;
solve PEQUE1 using emp minimizing Z;
```