# naginterfaces.library.opt.handle_​set_​simplebounds¶

naginterfaces.library.opt.handle_set_simplebounds(handle, bl, bu)[source]

handle_set_simplebounds is a part of the NAG optimization modelling suite and sets bounds on the variables of the problem.

For full information please refer to the NAG Library document for e04rh

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/e04/e04rhf.html

Parameters
handleHandle

The handle to the problem. It needs to be initialized (e.g., by handle_init()) and must not be changed between calls to the NAG optimization modelling suite.

blfloat, array-like, shape

defines the lower bounds on the variables

bufloat, array-like, shape

defines the upper bounds on the variables

Raises
NagValueError
(errno )

has not been initialized.

(errno )

does not belong to the NAG optimization modelling suite, has not been initialized properly or is corrupted.

(errno )

has not been initialized properly or is corrupted.

(errno )

The problem cannot be modified right now, the solver is running.

(errno )

On entry, , expected .

Constraint: must match the current number of variables of the model in the .

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, , , .

Constraint: .

(errno )

On entry, , , .

Constraint: .

Notes

After the has been initialized (e.g., handle_init() has been called), handle_set_simplebounds may be used to define the variable bounds of the problem. If the bounds have already been defined, they will be overwritten. Individual bounds may also be set by handle_set_bound().

This will typically be used for problems, such as:

Linear Programming (LP)

Nonlinear Programming (NLP)

or linear Semidefinite Programming (SDP)

where and are -dimensional vectors. Note that upper and lower bounds are specified for all the variables. This form allows full generality in specifying various types of constraint. In particular, the th variable may be fixed by setting . If certain bounds are not present, the associated elements of or may be set to special values that are treated as or . See the description of the option ‘Infinite Bound Size’ which is common among all solvers in the suite. Its value is denoted as further in this text. Note that the bounds are interpreted based on its value at the time of calling this function and any later alterations to ‘Infinite Bound Size’ will not affect these constraints.

See the E04 Introduction for more details about the NAG optimization modelling suite.

References

Candes, E and Recht, B, 2009, Exact matrix completion via convex optimization, Foundations of Computation Mathematics (Volume 9), 717–772