Introduction
In this example we want to optimize a nonlinear constraint problem. Instead of just getting a final number from a black-box routine, we want to look at the constraints and visualize partial solutions. The following problem is described by Rakesh Angira and B.V. Babu in section 6 of the paper "Optimization of Non-Linear Chemical Processes using Modified Differential Evolution" ( http://discovery.bits-pilani.ac.in/~bvbabu/RB_IICAI-05_147.pdf). The goal is to determine the optimal operation of an alkylation unit, commonly used in the petroleum industry.
The objective function is described as a function of total profit.


The constraints are written in terms of: olefin feed rate (x1), acid addition rate (x2), alkylate yield (x3), acid strength (x4), motor octane number (x5), external isobutane-to-olefin ratio (x6), and F-4 performance number (x7).

These variables are bounded as follows.



Parameter Sweep
Looking at the equations, you can see that x6 terms are raised to the power 2 in some cases. This variable likely has a big effect on the answer. It would be good to see how the total profit varies with x6. You can use Maple's built-in nonlinear local solver to sweep over a range of feasible values for x6. Define a procedure that accepts the index of the variable you want to analyze and the number of points you want to sample.
Call the above procedure on the 6th variable with 100 sample points:
> |

|
Write a second procedure that sweeps over all of the variables and outputs plots side-by-side. The code in this procedure is structured so it can be run in parallel.
> |

|