12.07.2015 Views

What Is Optimization Toolbox?

What Is Optimization Toolbox?

What Is Optimization Toolbox?

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Large-Scale Examplesans =1.1885e-012Nonlinear Minimization with a Dense but StructuredHessian and Equality ConstraintsThe fmincon and fminunc large-scale methods can solve problems where theHessian is dense but structured. For these problems, fmincon and fminunc donot compute H*Y with the Hessian H directly, as they do for medium-scaleproblems and for large-scale problems with sparse H, becauseformingHwould be memory-intensive. Instead, you must provide fmincon or fminuncwith a function that, given a matrix Y and information about H, computesW = H*Y.In this example, the objective function is nonlinear and linear equalities existso fmincon is used. The objective function has the structurewhere V is a 1000-by-2 matrix. The Hessian of f is dense, but the Hessian ofis sparse. If the Hessian of is ,then ,theHessianof ,isTo avoid excessive memory usage that could happen by working with Hdirectly, the example provides a Hessian multiply function, hmfleq1. Thisfunction, when passed a matrix Y, uses sparse matrices Hinfo, whichcorresponds to ,andV to compute the Hessian matrix productW = H*Y = (Hinfo - V*V')*YIn this example, the Hessian multiply function needs and V to compute theHessian matrix product. V is a constant, so you can capture V in a functionhandle to an anonymous function.However, is not a constant and must be computed at the current x. Youcando this by computing in the objective function and returning as Hinfo inthe third output argument. By using optimset to set the 'Hessian' options2-61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!