BobyqaOpt

This block finds the least value of a function of many variables by applying a trust region method that forms quadratic models by interpolation. Some freedom is usually present in the interpolation conditions that are taken up by minimizing the Frobenius norm of the change to the second derivative of the model, beginning with the zero matrix. The values of the variables are constrained by upper and lower bounds.

    BobyqaOpt

Library

Activate/Optimization

Description

This block implements the Bobyqa optimization program in reverse communication mode. When activated, the block expects to receive on its input ports respectively the value of the optimization vector p and the associated cost. The block then produces on its first output either a new guess value of p for which it expects a cost evaluation at the next iteration, which it initiates by forcing a re-initialization, or the optimal solution. In the latter case, the block sets its output, cost_opt (second output), to the cost of the optimal solution and generates an event on its output activation port.

At the final iteration the block generates an output event and produces the optimal value of p and the associated cost. Otherwise, the block forces a re-initialization of the simulation.

For more details, see the section on Optimization in the Extended Definitions for Advanced Users.
For further explanation of the BOBYQA algorithm, see: www.damtp.cam.ac.uk/user/na/NA_papers/NA2009_06.pdf

Parameters

BobyqaOpt_0

NameLabelDescriptionData TypeValid Values

xL

Variables lower bounds

Matrix of size Mx1

xU

Variables upper bounds

Matrix of size Mx1

RhoBeg

Initial value of the trust region

Matrix of size 1x1

RhoEnd

Final value of the trust region

Matrix of size 1x1

Npt

Number of interpolation conditions

Scalar

MaxIter

Maximum number of iterations

Scalar

minmax

Compute max instead of min

Number

0
1

Ports

NameTypeDescriptionIO TypeNumber

p0

explicit

input

1

cost

explicit

input

2

p

explicit

output

1

cost_opt

explicit

output

2

Port 5

activation

input

1

end

activation

output

1

Diagram

BobyqaOpt

See Also