Optimiz2 | Loss Function | Mathematical Optimization

14Optimization Examples

For more information see Aspen Plus User Guide Chapter 22, Optimization. Use optimization to maximize or minimize a user-specified objective function by manipulating decision variables (feed stream, block input, or other input variables). The objective function can be any valid Fortran expression involving one or more flowsheet quantities. The tolerance of the objective function is the tolerance of the convergence block associated with the optimization problem. You have the option of imposing equality or inequality constraints on the optimization. Equality constraints within an optimization are similar to design specifications. The constraints can be any function of flowsheet variables computed using Fortran expressions or in-line Fortran statements. You must specify the tolerance of the constraint. Tear streams and the optimization problem can be converged simultaneously or separately. If they are converged simultaneously, the tear stream is treated as an additional constraint. Aspen Plus solves optimization problems iteratively. By default Aspen Plus generates and sequences a convergence block for the optimization problem. You can override the convergence defaults, by entering convergence specifications on Convergence forms. Use the SQP and Complex methods to converge optimization problems. See Chapter 17, Convergence for a complete discussion of optimization convergence. The value of the manipulated variable that is provided in the Stream or Block input is used as the initial estimate. Providing a good estimate for the manipulated variable helps the optimization problem converge in fewer iterations. This is especially important for optimization problems with a large number of varied variables and constraints. There are no results associated directly with an optimization problem, except the objective function. You can view the final value of the manipulated an/or sampled variables directly, on the appropriate Stream or Block results sheets. To find the summary and iteration history of the convergence block, select the Results sheet of the appropriate block, located in the Convergence Convergence sheet. Optimization problems can be difficult to formulate and converge. It is important to have a good understanding of the simulation problem before adding the complexity of optimization. The recommended procedure for creating an optimization problem is: 1. Start with a simulation (instead of starting with optimization). There are a number of reasons for this approach:

The Fortran sheet is used to calculate the cost function: C C CPROD = PRICE OF PRODUCT. 2.Optimiz2. Optimization is used to find the reaction temperature and the feed flow rate that maximizes the cost function.• • • • It is easier to detect flowsheet errors in a simulation.00 C C COST FUNCTION CFUNC = CPROD * P + CBYPR * G . Perform sensitivity analysis before optimization. G. $/LB CFEED = . The optimization problem is converged when CFUNC is at a maximum.bkp Optimiz2. You can get a good feel for what reasonable specifications are. to find out if the optimum is broad or narrow.bkp The value of a process is calculated as the value of the product and the byproduct. You can get a good estimate for the tear streams. the molar flow rate of A in stream FEED and the reactor duty are the sample variables for the optimization. and Q. Example for Maximizing Operating Margin See file .30 C C CBYPR = PRINCE OF BYPRODUCT. 3.CFEED * A . minus the cost of the raw material.CSTEAM * Q /1D6 There are two constraints: one specifying the maximum duty for the reactor and the other specifying the minimum product purity. • . $/LB CPROD = 1. A. Evaluate the solution using sensitivity analysis. to find appropriate decision variables and their ranges. These variables are called P.20 C C CSTEAM = COST OF STEAM. • The molar flow rate of P and of G in stream PROD. You can get a good feel for a reasonable range of decision variables. and minus the cost of steam for the reactor. respectively. $/MMBTU CSTEAM = 4. $/LB CBYPR = 0.11 C C CFEED = PRICE OF FEED.

. ASPEN PLUS automatically generates a convergence block to converge the specification. The Fortran sheet is used to calculate the cost function CFUNC. The constraint DUTY is satisfied when the reactor duty is less than or equal to 3 MMbtu/hr. The constraint PURITY is satisfied when mole fraction of P in the stream PROD is greater or equal to than 0. You do not have to specify convergence of the design specification. There are two constraints associated with the optimization problem. The optimization convergence block finds the combination of values that makes CFUNC a maximum subject to the constraints.• • • • • • • There are two manipulated variables. The specified value is the initial estimate used by the optimization convergence block. They are called DUTY and PURITY. the reactor temperature and the flow rate for the reactant A in the feed. The manipulated variables are specified in the blocks just as if there were no optimization.9.

Sign up to vote on this title
UsefulNot useful