naginterfaces.library.opt.handle_set_linobj_coeff¶
- naginterfaces.library.opt.handle_set_linobj_coeff(handle, idxci, ci)[source]¶
handle_set_linobj_coeff
is a part of the NAG optimization modelling suite and sets or modifies a single element in the linear objective function of the problem.For full information please refer to the NAG Library document for e04te
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/e04/e04tef.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.- idxciint
, the index of the element in the linear objective function.
- cifloat
, the new value of the element in the linear objective function.
- 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 )
The objective function is not linear.
- (errno )
On entry, and .
Constraint: .
- Notes
After the model has been fully or partially built by calling functions from the NAG optimization modelling suite,
handle_set_linobj_coeff
may be used to set or modify a single element in the (possibly sparse) linear objective function . This might be particularly helpful when the objective function 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.