logmip3.gms : LogMIP User's Manual Example 3 - Synthesis of 8 Processes

Description

This model selects optimal processes from within a given superstructure.

References:

MARCO DURAN, PH.D. THESIS, 1984. CARNEGIE-MELLON UNIVERSITY, PITTSBURGH, PA.

Turkay & Grossmann, LOGIC-BASED MINLP ALGORITHMS FOR THE OPTIMAL
SYNTHESIS OF PROCESS NETWORKS, Computers and Chemical Engineering 20,
8, p. 959-978, 1996

Aldo Vecchietti, LogMIP User's Manual, 2007
http://www.logmip.ceride.gov.ar/files/pdfs/logmip_manual.pdf

Keywords: extended mathematical programming, disjunctive programming, logical
          constraints, process synthesis


Small Model of Type : EMP


Category : GAMS Model library


Main file : logmip3.gms

$title LogMIP User's Manual Example 3 - Synthesis of 8 Processe (LOGMIP3,SEQ=336)

$onText
This model selects optimal processes from within a given superstructure.

References:

MARCO DURAN, PH.D. THESIS, 1984. CARNEGIE-MELLON UNIVERSITY, PITTSBURGH, PA.

Turkay & Grossmann, LOGIC-BASED MINLP ALGORITHMS FOR THE OPTIMAL
SYNTHESIS OF PROCESS NETWORKS, Computers and Chemical Engineering 20,
8, p. 959-978, 1996

Aldo Vecchietti, LogMIP User's Manual, 2007
http://www.logmip.ceride.gov.ar/files/pdfs/logmip_manual.pdf

Keywords: extended mathematical programming, disjunctive programming, logical
          constraints, process synthesis
$offText

Set
   I 'process streams' / 1*25 /
   J 'process units'   / 1*8  /;

Parameter CV(I) 'variable cost coeff for process units - streams'
                /  3 = -10,  5 = -15,  9 = -40, 19 =  25, 21 =  35, 25 = -35
                  17 =  80, 14 =  15, 10 =  15,  2 =   1,  4 =   1, 18 = -65
                  20 = -60, 22 = -80                                         /;

Variable PROF 'profit';

Binary   Variable Y(J);
Positive Variable X(I), CF(J);

Equation
* EQUATIONS COMMON TO NLP SUBPROBLEMS AND MASTER PROBLEMS:
* --------------------------------------------------------
   MASSBAL1 'mass balance #1'
   MASSBAL2 'mass balance #2'
   MASSBAL3 'mass balance #3'
   MASSBAL4 'mass balance #4'
   MASSBAL5 'mass balance #5'
   MASSBAL6 'mass balance #6'
   MASSBAL7 'mass balance #7'
   MASSBAL8 'mass balance #8'
   SPECS1   'design specification 1'
   SPECS2   'design specification 2'
   SPECS3   'design specification 3'
   SPECS4   'design specification 4'

* EQUATIONS FOR THE MASTER PROBLEMS ONLY:
* ---------------------------------------
   LOGICAL1 'constraints which allow flow iff unit 1 exists'
   LOGICAL2 'constraints which allow flow iff unit 2 exists'
   LOGICAL3 'constraints which allow flow iff unit 3 exists'
   LOGICAL4 'constraints which allow flow iff unit 4 exists'
   LOGICAL5 'constraints which allow flow iff unit 5 exists'
   LOGICAL6 'constraints which allow flow iff unit 6 exists'
   LOGICAL7 'constraints which allow flow iff unit 7 exists'
   LOGICAL8 'constraints which allow flow iff unit 8 exists'

* EQUATIONS FOR THE NLP SUBPROBLEMS ONLY:
* ---------------------------------------
   INOUT11  'input-output relations for process unit 1'
   INOUT12
   INOUT13
   INOUT14
   INOUT21  'input-output relations for process unit 2'
   INOUT22
   INOUT23
   INOUT24
   INOUT31  'input-output relations for process unit 3'
   INOUT32
   INOUT34
   INOUT41  'input-output relations for process unit 4'
   INOUT42
   INOUT43
   INOUT44
   INOUT45
   INOUT51  'input-output relations for process unit 5'
   INOUT52
   INOUT53
   INOUT54
   INOUT61  'input-output relations for process unit 6'
   INOUT62
   INOUT63
   INOUT64
   INOUT71  'input-output relations for process unit 7'
   INOUT72
   INOUT73
   INOUT74
   INOUT81  'input-output relations for process unit 8'
   INOUT82
   INOUT83
   INOUT84
   INOUT85
   INOUT86
   OBJETIVO 'objective function definition';

* BOUNDS SECTION:
* ---------------
X.up('3')  = 2.0;
X.up('5')  = 2.0;
X.up('9')  = 2.0;
X.up('10') = 1.0;
X.up('14') = 1.0;
X.up('17') = 2.0;
X.up('19') = 2.0;
X.up('21') = 2.0;
X.up('25') = 3.0;

* EQUATIONS COMMON TO NLP SUBPROBLEMS AND MASTER PROBLEMS:
* --------------------------------------------------------
MASSBAL1.. X('13')         =e= X('19') + X('21');
MASSBAL2.. X('17')         =e= X('9')  + X('16') + X('25');
MASSBAL3.. X('11')         =e= X('12') + X('15');
MASSBAL4.. X('3') + X('5') =e= X('6')  + X('11');
MASSBAL5.. X('6')          =e= X('7')  + X('8');
MASSBAL6.. X('23')         =e= X('20') + X('22');
MASSBAL7.. X('23')         =e= X('14') + X('24');
MASSBAL8.. X('1')          =e= X('2')  + X('4');

SPECS1..   X('10') =l= 0.8*X('17');
SPECS2..   X('10') =g= 0.4*X('17');
SPECS3..   X('12') =l= 5.0*X('14');
SPECS4..   X('12') =g= 2.0*X('14');

LOGICAL1.. X('2')  + X('3')  =l= 10.*Y('1');
LOGICAL2.. X('4')  + X('5')  =l= 10.*Y('2');
LOGICAL3.. X('9')            =l= 10.*Y('3');
LOGICAL4.. X('12') + X('14') =l= 10.*Y('4');
LOGICAL5.. X('15')           =l= 10.*Y('5');
LOGICAL6.. X('19')           =l= 10.*Y('6');
LOGICAL7.. X('21')           =l= 10.*Y('7');
LOGICAL8.. X('10') + X('17') =l= 10.*Y('8');

INOUT11..  exp(X('3')) -1.        =e= X('2');
INOUT14..  CF('1')                =e= 5;
INOUT12..  X('2')                 =e= 0;
INOUT13..  X('3')                 =e= 0;
INOUT21..  exp(X('5')/1.2) -1.    =e= X('4');
INOUT24..  CF('2')                =e= 8;
INOUT22..  X('4')                 =e= 0;
INOUT23..  X('5')                 =e= 0;
INOUT31..  1.5*X('9') + X('10')   =e= X('8');
INOUT34..  CF('3')                =e= 6;
INOUT32..  X('9')                 =e= 0;
INOUT41..  1.25*(X('12')+X('14')) =e= X('13');
INOUT45..  CF('4')                =e= 10;
INOUT42..  X('12')                =e= 0;
INOUT43..  X('13')                =e= 0;
INOUT44..  X('14')                =e= 0;
INOUT51..  X('15')                =e= 2.*X('16');
INOUT54..  CF('5')                =e= 6;
INOUT52..  X('15')                =e= 0;
INOUT53..  X('16')                =e= 0;
INOUT61..  exp(X('20')/1.5) -1.   =e= X('19');
INOUT64..  CF('6')                =e= 7;
INOUT62..  X('19')                =e= 0;
INOUT63..  X('20')                =e= 0;
INOUT71..  exp(X('22')) -1.       =e= X('21');
INOUT74..  CF('7')                =e= 4;
INOUT72..  X('21')                =e= 0;
INOUT73..  X('22')                =e= 0;
INOUT81..  exp(X('18')) -1.       =e= X('10') + X('17');
INOUT86..  CF('8')                =e= 5;
INOUT82..  X('10')                =e= 0;
INOUT83..  X('17')                =e= 0;
INOUT84..  X('18')                =e= 0;
INOUT85..  X('25')                =e= 0;

OBJETIVO.. PROF =e= sum(J, CF(J)) + sum(I, X(I)*CV(I)) + 122;

Logic Equation ATMOST1, ATMOST2, ATMOST3;
ATMOST1.. Y('1') xor Y('2');
ATMOST2.. Y('4') xor Y('5');
ATMOST3.. Y('6') xor Y('7');

Logic Equation IMP0, IMP1, IMP2, IMP3, IMP4, IMP5, IMP6, IMP7, IMP8, IMP9;
IMP0.. Y('1') -> Y('3') or Y('4') or Y('5');
IMP1.. Y('2') -> Y('3') or Y('4') or Y('5');
IMP2.. Y('3') -> Y('8');
IMP3.. Y('3') -> Y('1') or Y('2');
IMP4.. Y('4') -> Y('1') or Y('2');
IMP5.. Y('4') -> Y('6') or Y('7');
IMP6.. Y('5') -> Y('1') or Y('2');
IMP7.. Y('5') -> Y('8');
IMP8.. Y('6') -> Y('4');
IMP9.. Y('7') -> Y('4');

* Initialization
Y.l('1') = 1;
Y.l('2') = 0;
Y.l('3') = 1;
Y.l('4') = 0;
Y.l('5') = 0;
Y.l('6') = 0;
Y.l('7') = 0;
Y.l('8') = 1;

$onEcho > '%LM.INFO%'
default bigm 100
disjunction Y('1') INOUT11 INOUT14 else INOUT12 INOUT13
disjunction Y('2') INOUT21 INOUT24 else INOUT22 INOUT23
disjunction Y('3') INOUT31 INOUT34 else INOUT32
disjunction Y('4') INOUT41 INOUT45 else INOUT42 INOUT43 INOUT44
disjunction Y('5') INOUT51 INOUT54 else INOUT52 INOUT53
disjunction Y('6') INOUT61 INOUT64 else INOUT62 INOUT63
disjunction Y('7') INOUT71 INOUT74 else INOUT72 INOUT73
disjunction Y('8') INOUT81 INOUT86 else INOUT82 INOUT83 INOUT84 INOUT85

* optional, if not set LOGMIP will find the modeltype suitable
modeltype minlp
$offEcho

option optCr = 0, limCol = 0, limRow = 0, emp = logmip;

Model EXAMPLE3 / all /;

solve EXAMPLE3 using emp minimizing PROF;