What Is Optimization Toolbox?

What Is Optimization Toolbox? What Is Optimization Toolbox?

cda.psych.uiuc.edu
from cda.psych.uiuc.edu More from this publisher
12.07.2015 Views

2 Tutorial[fval,exitflag,output] = runqpbox4precto run the preceding code. After 18 iterations and 50 PCG iterations, thefunctionvaluehasthesamevaluetofivesignificantdigitsfval =-1.0538e+003but the first-order optimality is further reduced.output.firstorderopt =0.0028Note Decreasing TolPcg too much can substantially increase the number ofPCG iterations.Linear Least-Squares with Bound ConstraintsMany situations give rise to sparse linear least-squares problems, often withbounds on the variables. The next problem requires that the variables benonnegative. This problem comes from fitting a function approximation to apiecewise linear spline. Specifically, particles are scattered on the unit square.The function to be approximated is evaluated at these points, and a piecewiselinear spline approximation is constructed under the condition that (linear)coefficients are not negative. There are 2000 equations to fit on 400 variables:load particle % Get C, dlb = zeros(400,1);[x,resnorm,residual,exitflag,output] = ...lsqlin(C,d,[],[],[],[],lb);The default diagonal preconditioning works fairly well:exitflag =3resnorm =22.5794output =iterations: 102-72

Large-Scale Examplesalgorithm: 'large-scale: trust-region reflective Newton'firstorderopt: 2.7870e-005cgiterations: 42message: [1x123 char]For bound constrained problems, the first-order optimality is the infinitynorm of v.*g, wherev is defined as in “Box Constraints” on page 4-10, and gis the gradient.You can improve (decrease) the first-order optimality by using a sparse QRfactorizationineachiteration.Todothis,setPrecondBandWidth to inf.options = optimset('PrecondBandWidth',inf);[x,resnorm,residual,exitflag,output] = ...lsqlin(C,d,[],[],[],[],lb,[],[],options);The number of iterations and the first-order optimality both decrease:exitflag =1resnorm =22.5794output =iterations: 12algorithm: 'large-scale: trust-region reflective Newton'firstorderopt: 5.5907e-015cgiterations: 11message: [1x104 char]Linear Programming with Equalities and InequalitiesThe problem isand you can load the matrices and vectors A, Aeq, b, beq, f, and the lowerbounds lb into the MATLAB workspace with2-73

Large-Scale Examplesalgorithm: 'large-scale: trust-region reflective Newton'firstorderopt: 2.7870e-005cgiterations: 42message: [1x123 char]For bound constrained problems, the first-order optimality is the infinitynorm of v.*g, wherev is defined as in “Box Constraints” on page 4-10, and gis the gradient.You can improve (decrease) the first-order optimality by using a sparse QRfactorizationineachiteration.Todothis,setPrecondBandWidth to inf.options = optimset('PrecondBandWidth',inf);[x,resnorm,residual,exitflag,output] = ...lsqlin(C,d,[],[],[],[],lb,[],[],options);The number of iterations and the first-order optimality both decrease:exitflag =1resnorm =22.5794output =iterations: 12algorithm: 'large-scale: trust-region reflective Newton'firstorderopt: 5.5907e-015cgiterations: 11message: [1x104 char]Linear Programming with Equalities and InequalitiesThe problem isand you can load the matrices and vectors A, Aeq, b, beq, f, and the lowerbounds lb into the MATLAB workspace with2-73

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

Saved successfully!

Ooh no, something went wrong!