Installation and Basic Usage¶
Installation¶
To install BCFLASH, clone the the repository and add bcflash.m to your Matlab path.
Basic Usage¶
nlp = model(...); % model defining problem
solver = bcflash(nlp); % construct solver object.
[x, info] = solver.solve(nlp.x0, varargin); % begin solve
nlpmodel contains many methods that are typically required by optimization solvers, such as objective function/gradient/Hessian evaluation, constraint/Jacobian/Hessian evaluation, Lagrangians, etc. However, BCFLASH requires that only the following functions to be implemented in model:
fobj(x): function value at current point, \(f(x)\).gobj(x): gradient at current point, \(\nabla f(x)\).hlagprod(x,y,v): Product with Lagrangian Hessian at current point, \(\nabla^2_x L(x,y)\cdot v\). Because the only constraints currently supported are bound constraints, this is equivalent to \(\nabla^2 f(x) \cdot v\).
Warning: BCFLASH will ignore non-bound constraints implemented in nlpmodel. Therefore, you may pass optimization problems with such constraints (so that nlp.m > 0) but the constraints will be omitted.