naginterfaces.library.opt.handle_set_linconstr_coeff¶
- naginterfaces.library.opt.handle_set_linconstr_coeff(handle, idlc, icolbj, bij)[source]¶
handle_set_linconstr_coeff
is a part of the NAG optimization modelling suite and sets or modifies a single element in the linear constraint matrix of the problem.For full information please refer to the NAG Library document for e04tj
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/e04/e04tjf.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.- idlcint
, the number of the linear constraint, i.e., the row index of the element in the linear constraint matrix to be changed.
- icolbjint
, the column (variable) index of the element .
- bijfloat
, the new value of the element in the linear constraint matrix .
- 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 )
There are no linear constraints in the problem.
- (errno )
On entry, and .
Constraint: .
- (errno )
On entry, and .
Constraint: .
- Notes
After the model has been fully or partially built by calling functions of the NAG optimization modelling suite,
handle_set_linconstr_coeff
may be used to set or modify a single element in the sparse linear constraint matrix previously defined byhandle_set_linconstr()
. This might be particularly helpful when a linear constraint needs to be extended after new variables have been added to the model byhandle_add_vars()
.See the E04 Introduction for more details about the NAG optimization modelling suite.