NAG FL Interface
e04tef (handle_​set_​linobj_​coeff)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

e04tef is a part of the NAG optimization modelling suite and sets or modifies a single element in the linear objective function of the problem.

2 Specification

Fortran Interface
Subroutine e04tef ( handle, idxci, ci, ifail)
Integer, Intent (In) :: idxci
Integer, Intent (Inout) :: ifail
Real (Kind=nag_wp), Intent (In) :: ci
Type (c_ptr), Intent (In) :: handle
C Header Interface
#include <nag.h>
void  e04tef_ (void **handle, const Integer *idxci, const double *ci, Integer *ifail)
The routine may be called by the names e04tef or nagf_opt_handle_set_linobj_coeff.

3 Description

After the model has been fully or partially built by calling routines from the NAG optimization modelling suite, e04tef may be used to set or modify a single element ci in the (possibly sparse) linear objective function cTx. This might be particularly helpful when the objective function needs to be extended after new variables have been added to the model by e04taf.
See Section 3.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.

4 References

None.

5 Arguments

1: handle Type (c_ptr) Input
On entry: the handle to the problem. It needs to be initialized (e.g., by e04raf) and must not be changed between calls to the NAG optimization modelling suite.
2: idxci Integer Input
On entry: i, the index of the element ci in the linear objective function.
Constraint: 1idxcin, where n is the total number of decision variables in the problem.
3: ci Real (Kind=nag_wp) Input
On entry: ci, the new value of the element in the linear objective function.
4: ifail Integer Input/Output
On entry: ifail must be set to 0, −1 or 1 to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of 0 causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of −1 means that an error message is printed while a value of 1 means that it is not.
If halting is not appropriate, the value −1 or 1 is recommended. If message printing is undesirable, then the value 1 is recommended. Otherwise, the value −1 is recommended. When the value -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry ifail=0 or −1, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
ifail=1
The supplied handle does not define a valid handle to the data structure for the NAG optimization modelling suite. It has not been properly initialized or it has been corrupted.
ifail=2
The problem cannot be modified right now, the solver is running.
ifail=3
The objective function is not linear.
ifail=8
On entry, idxci=value and n=value.
Constraint: 1idxcin.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
e04tef is not threaded in any implementation.

9 Further Comments

None.

10 Example

See e04taf.