[983] | 1 | #* |
---|
| 2 | Structural Optimization of Process Flowsheets (example from GAMS) |
---|
| 3 | |
---|
| 4 | The goal is the profitable production of chemical C. |
---|
| 5 | which can be produced from chemical B where B may be |
---|
| 6 | the raw material that can be purchased from the |
---|
| 7 | external market or an intermediate that is produced |
---|
| 8 | from raw material A. There are two alternative paths |
---|
| 9 | of producing B from A. A mixed-integer nonlinear |
---|
| 10 | formulation is presented to solve the optimal |
---|
| 11 | production and capacity expansion problem. |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | Kocis, G R, and Grossmann, I E, Relaxation Strategy for the Structural |
---|
| 15 | Optimization of Process Flow Sheets. Independent Engineering Chemical |
---|
| 16 | Research 26, 9 (1987), 1869-1880. |
---|
| 17 | |
---|
| 18 | Morari, M, and Grossmann, I E, Eds, Chemical Engineering Optimization |
---|
| 19 | Models with GAMS. Computer Aids for Chemical Engineering Corporation, |
---|
| 20 | 1991. |
---|
| 21 | |
---|
| 22 | Process flowsheet |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | A2 +-----+ B2 BP |
---|
| 26 | +----->| 2 |----->+ | |
---|
| 27 | A | +-----+ | | B1 +-----+ C1 |
---|
| 28 | ---->| +----+------->| 1 |--------> |
---|
| 29 | | +-----+ | +-----+ |
---|
| 30 | +----->| 3 |----->+ |
---|
| 31 | A3 +-----+ B3 |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | *# |
---|
| 35 | |
---|
| 36 | using "types"; |
---|
| 37 | binary as Integer (Lower=0, Upper=1); |
---|
| 38 | |
---|
| 39 | Optimization procsel |
---|
| 40 | VARIABLES |
---|
| 41 | # Positive Variables |
---|
| 42 | a2 as positive; # consumption of chemical a in process 2 |
---|
| 43 | a3 as positive; # consumption of chemical a in process 3 |
---|
| 44 | b2 as positive; # production capacity of chemical b in process 2 |
---|
| 45 | b3 as positive; # production capacity of chemical b in process 3 |
---|
| 46 | bp as positive; # amount of chemical b purchased in external market |
---|
| 47 | b1 as positive; # consumption of chemical b in process 1 |
---|
| 48 | c1 as positive; # production capacity of chemical c in process 1 ; |
---|
| 49 | |
---|
| 50 | # Binary Variables |
---|
| 51 | y1 as binary; # denotes potential existence of process 1 |
---|
| 52 | y2 as binary; # denotes potential existence of process 2 |
---|
| 53 | y3 as binary; # denotes potential existence of process 3 ; |
---|
| 54 | |
---|
| 55 | # Variable |
---|
| 56 | pr as Real; # total profit in million $ per year ; |
---|
| 57 | |
---|
| 58 | MAXIMIZE |
---|
| 59 | pr; |
---|
| 60 | |
---|
| 61 | EQUATIONS |
---|
| 62 | |
---|
| 63 | #* |
---|
| 64 | * the original constraint for inout2 is b2 = log(1+a2) |
---|
| 65 | * but this has been convexified to the form used below. |
---|
| 66 | * the same is true for inout3. so b2 and b3 are the |
---|
| 67 | * output variables from units 2 and 3 respectively |
---|
| 68 | *# |
---|
| 69 | |
---|
| 70 | c1 = 0.9*b1; |
---|
| 71 | exp(b2) - 1 = a2; |
---|
| 72 | exp(b3/1.2) - 1 = a3; |
---|
| 73 | |
---|
| 74 | b1 = b2 + b3 + bp; |
---|
| 75 | |
---|
| 76 | c1 <= 2*y1; |
---|
| 77 | b2 <= 4*y2; |
---|
| 78 | b3 <= 5*y3; |
---|
| 79 | |
---|
| 80 | pr = 11*c1 # sales revenue |
---|
| 81 | - 3.5*y1 - y2 - 1.5*y3 # fixed investment cost |
---|
| 82 | - b2 - 1.2*b3 # operating cost |
---|
| 83 | - 1.8*(a2+a3) - 7*bp; # purchases |
---|
| 84 | |
---|
| 85 | # demand constraint on chemical c based on market requirements |
---|
| 86 | |
---|
| 87 | c1 <= 1; |
---|
| 88 | |
---|
| 89 | OPTIONS |
---|
| 90 | Dynamic = false; |
---|
| 91 | NLPSolveNLA = true; |
---|
| 92 | |
---|
| 93 | NLPSolver(File = "minlp_emso", derivative_test = "second-order", |
---|
| 94 | bonmin_algorithm = "B-BB", |
---|
| 95 | print_level = 5); |
---|
| 96 | |
---|
| 97 | end |
---|
| 98 | |
---|
| 99 | # same as above but without convexification |
---|
| 100 | Optimization procsel1 |
---|
| 101 | VARIABLES |
---|
| 102 | # Positive Variables |
---|
| 103 | x1 as positive; # consumption of chemical a in process 2 |
---|
| 104 | x2 as positive; # consumption of chemical a in process 3 |
---|
| 105 | x3 as positive; # production capacity of chemical c in process 1 ; |
---|
| 106 | |
---|
| 107 | # Binary Variables |
---|
| 108 | y1 as binary; # denotes potential existence of process 1 |
---|
| 109 | y2 as binary; # denotes potential existence of process 2 |
---|
| 110 | y3 as binary; # denotes potential existence of process 3 ; |
---|
| 111 | |
---|
| 112 | # Variable |
---|
| 113 | pr as Real; # total profit in million $ per year ; |
---|
| 114 | |
---|
| 115 | MAXIMIZE |
---|
| 116 | pr; |
---|
| 117 | |
---|
| 118 | EQUATIONS |
---|
| 119 | -y1+0.9*ln(1+x1)+1.08*ln(1+x2)+0.9*x3 <= 0; |
---|
| 120 | -10*y2+ln(1+x1) <= 0; |
---|
| 121 | -10*y3+1.2*ln(1+x2) <= 0; |
---|
| 122 | y2+y3-1 <= 0; |
---|
| 123 | pr = 2.9*x3+8.9*ln(1+x1)+10.44*ln(1+x2)-1.8*(x1+x2)-3.5*y1-y2-1.5*y3; |
---|
| 124 | |
---|
| 125 | # redundant Lower bound |
---|
| 126 | |
---|
| 127 | x1 >= 0; |
---|
| 128 | |
---|
| 129 | x2 >= 0; |
---|
| 130 | |
---|
| 131 | x3 >= 0; |
---|
| 132 | |
---|
| 133 | # Initial guess |
---|
| 134 | GUESS |
---|
| 135 | x1 = 0; |
---|
| 136 | x2 = 0; |
---|
| 137 | x3 = 1; |
---|
| 138 | y1 = 0; |
---|
| 139 | y2 = 1; |
---|
| 140 | y3 = 0; |
---|
| 141 | |
---|
| 142 | OPTIONS |
---|
| 143 | Dynamic = false; |
---|
| 144 | NLPSolveNLA = true; |
---|
| 145 | |
---|
| 146 | NLPSolver(File = "minlp_emso", derivative_test = "second-order", |
---|
| 147 | bonmin_algorithm = "B-BB", |
---|
| 148 | print_level = 5); |
---|
| 149 | |
---|
| 150 | end |
---|