In this section, we provide the framework for the general nonlinear programming problem. We also examine the construction of linear, nonlinear and compound constraints.
Now, we have all the necessary tools to build a nonlinear programming problem.
Step 1: Build your constraints. The constraint set consists of bounds on the variables plus one nonlinear inequality.
// Number of bounds and number of nonlinear constraints int numBds = 3, ncnln = 1; ColumnVector lower(numBds), upper(numBds); // Construct the nonlinear equation NLP* chs65 = new NLP( new NLF2(numBds,ncnln,ineq_hs65,init_hs65) ); Constraint ineq = new NonLinearInequality(chs65); // Construct the bound constraints lower << -4.5 << -4.5 << -5.0; upper << 4.5 << 4.5 << 5.0 ; Constraint bc = new BoundConstraint(n,lower,upper); // Construct the compound constraint CompoundConstraint* constraints = new CompoundConstraint(ineq,bc);
Step 2: Create a constrained problem where the objective function has analytic Hessians.
Next Section: Parallel optimization | Back to Solvers Page
Last revised July 13, 2006