#* Structural Optimization of Process Flowsheets (example from GAMS) The goal is the profitable production of chemical C. which can be produced from chemical B where B may be the raw material that can be purchased from the external market or an intermediate that is produced from raw material A. There are two alternative paths of producing B from A. A mixed-integer nonlinear formulation is presented to solve the optimal production and capacity expansion problem. Kocis, G R, and Grossmann, I E, Relaxation Strategy for the Structural Optimization of Process Flow Sheets. Independent Engineering Chemical Research 26, 9 (1987), 1869-1880. Morari, M, and Grossmann, I E, Eds, Chemical Engineering Optimization Models with GAMS. Computer Aids for Chemical Engineering Corporation, 1991. Process flowsheet A2 +-----+ B2 BP +----->| 2 |----->+ | A | +-----+ | | B1 +-----+ C1 ---->| +----+------->| 1 |--------> | +-----+ | +-----+ +----->| 3 |----->+ A3 +-----+ B3 *# using "types"; binary as Integer (Lower=0, Upper=1); Optimization procsel VARIABLES # Positive Variables a2 as positive; # consumption of chemical a in process 2 a3 as positive; # consumption of chemical a in process 3 b2 as positive; # production capacity of chemical b in process 2 b3 as positive; # production capacity of chemical b in process 3 bp as positive; # amount of chemical b purchased in external market b1 as positive; # consumption of chemical b in process 1 c1 as positive; # production capacity of chemical c in process 1 ; # Binary Variables y1 as binary; # denotes potential existence of process 1 y2 as binary; # denotes potential existence of process 2 y3 as binary; # denotes potential existence of process 3 ; # Variable pr as Real; # total profit in million \$ per year ; MAXIMIZE pr; EQUATIONS #* * the original constraint for inout2 is b2 = log(1+a2) * but this has been convexified to the form used below. * the same is true for inout3. so b2 and b3 are the * output variables from units 2 and 3 respectively *# c1 = 0.9*b1; exp(b2) - 1 = a2; exp(b3/1.2) - 1 = a3; b1 = b2 + b3 + bp; c1 <= 2*y1; b2 <= 4*y2; b3 <= 5*y3; pr = 11*c1 # sales revenue - 3.5*y1 - y2 - 1.5*y3 # fixed investment cost - b2 - 1.2*b3 # operating cost - 1.8*(a2+a3) - 7*bp; # purchases # demand constraint on chemical c based on market requirements c1 <= 1; OPTIONS Dynamic = false; NLPSolveNLA = true; NLPSolver(File = "minlp_emso", derivative_test = "second-order", bonmin_algorithm = "B-BB", print_level = 5); end # same as above but without convexification Optimization procsel1 VARIABLES # Positive Variables x1 as positive; # consumption of chemical a in process 2 x2 as positive; # consumption of chemical a in process 3 x3 as positive; # production capacity of chemical c in process 1 ; # Binary Variables y1 as binary; # denotes potential existence of process 1 y2 as binary; # denotes potential existence of process 2 y3 as binary; # denotes potential existence of process 3 ; # Variable pr as Real; # total profit in million \$ per year ; MAXIMIZE pr; EQUATIONS -y1+0.9*ln(1+x1)+1.08*ln(1+x2)+0.9*x3 <= 0; -10*y2+ln(1+x1) <= 0; -10*y3+1.2*ln(1+x2) <= 0; y2+y3-1 <= 0; 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; # redundant Lower bound x1 >= 0; x2 >= 0; x3 >= 0; # Initial guess GUESS x1 = 0; x2 = 0; x3 = 1; y1 = 0; y2 = 1; y3 = 0; OPTIONS Dynamic = false; NLPSolveNLA = true; NLPSolver(File = "minlp_emso", derivative_test = "second-order", bonmin_algorithm = "B-BB", print_level = 5); end