The NLPC Nonlinear Optimization Solver |
Consider Example 4.7 in the PROC NLP documentation. In this simple
pooling problem, two liquid chemicals, and
, are produced by the pooling and
blending of three input liquid chemicals,
,
, and
. There are three group of
constraints: 1) the mass balance constraints, which are linear constraints; 2) the
sulfur concentration constraints, which are nonlinear constraints; and 3) the bound
constraints. The objective is to maximize the profit.
You can formulate this problem in PROC OPTMODEL as follows:
proc optmodel; num costa = 6, costb = 16, costc = 10, costx = 9, costy = 15; var amountx init 1 >= 0 <= 100, amounty init 1 >= 0 <= 200; var amounta init 1 >= 0, amountb init 1 >= 0, amountc init 1 >= 0; var pooltox init 1 >= 0, pooltoy init 1 >= 0; var ctox init 1 >= 0, ctoy init 1 >= 0; var pools init 1 >=1 <= 3; max f = costx*amountx + costy*amounty - costa*amounta - costb*amountb - costc*amountc; con mb1: amounta + amountb = pooltox + pooltoy, mb2: pooltox + ctox = amountx, mb3: pooltoy + ctoy = amounty, mb4: ctox + ctoy = amountc; con sc1: 2.5*amountx - pools*pooltox - 2*ctox >= 0, sc2: 1.5*amounty - pools*pooltoy - 2*ctoy >= 0, sc3: 3*amounta + amountb - pools*(amounta + amountb) = 0; solve with nlpc / tech=quanew printfreq=1; print amountx amounty amounta amountb amountc; quit;
The quantities amounta, amountb, amountc, amountx, and
amounty are the amounts to be determined for the liquid chemicals ,
,
,
, and
, respectively. pooltox, pooltoy, ctox, ctoy,
and pools are intermediate decision variables, whose values are not printed
in the solution. The constraints mb1 - mb4 are the mass balance
constraints, and the constraints sc1 - sc3 are the sulfur concentration
constraints. For more information about converting PROC NLP models into PROC OPTMODEL
models, see the section "Rewriting NLP Models for PROC OPTMODEL".
To solve the optimization problem, the experimental quasi-Newton method (QUANEW) is invoked. The problem summary is shown in Figure 10.3.1. Figure 10.3.2 displays the iteration log.
Output 10.3.1: Simple Pooling Problem: Problem Summary
|
Figure 10.3.3 displays the solution summary and the solution. The optimal solution
shows that to obtain a maximum profit of 400, 200 units of should be produced by
blending 100 units of
and 100 units of
. Liquid
should not be used for the
blending. Further, liquid
should not be produced at all.
|
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.