NAG FL Interface
e04tdf (handle_​set_​bound)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

e04tdf is a part of the NAG optimization modelling suite and sets or modifies the bounds of a single constraint, either the simple variable bounds, linear constraint or nonlinear constraint of the problem. It can be also used to fix any given variable.

2 Specification

Fortran Interface
Subroutine e04tdf ( handle, comp, idx, bli, bui, ifail)
Integer, Intent (In) :: idx
Integer, Intent (Inout) :: ifail
Real (Kind=nag_wp), Intent (In) :: bli, bui
Character (*), Intent (In) :: comp
Type (c_ptr), Intent (In) :: handle
C Header Interface
#include <nag.h>
void  e04tdf_ (void **handle, const char *comp, const Integer *idx, const double *bli, const double *bui, Integer *ifail, const Charlen length_comp)
The routine may be called by the names e04tdf or nagf_opt_handle_set_bound.

3 Description

After the model has been fully or partially built by calling routines of the NAG optimization modelling suite, e04tdf may be used to define a new lower bound, li, and an upper bound ui, of a single constraint identified by the component type comp together with the appropriate component index i given in idx. Note that both upper and lower bounds need to be specified. This form allows full generality in specifying various types of constraint. In particular, the model component may be set as an equality by setting li=ui (e.g., to fix a variable). If certain bounds are not present, the associated value li or ui may be set to special values that are treated as - or +. See the description of the optional parameter Infinite Bound Size which is common among all solvers in the suite. Its value is denoted as bigbnd further in this text. Note that the bounds are interpreted based on its value at the time of calling this routine and any later alterations to Infinite Bound Size will not affect these constraints.
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: comp Character(*) Input
On entry: the type of the component of the model whose bounds will be modified. comp is case insensitive.
comp='X', 'VAR' or 'VARIABLE'
Simple bounds of a decision variable xi (see e04rhf).
comp='LC' or 'LINEAR CONSTRAINT'
Linear constraint (see e04rjf).
comp='NLC' or 'NONLINEAR CONSTRAINT'
Nonlinear constraint (see e04rkf).
Constraint: comp='X', 'VAR', 'VARIABLE', 'LC', 'LINEAR CONSTRAINT', 'NLC' or 'NONLINEAR CONSTRAINT'.
3: idx Integer Input
On entry: i, the index of the component comp whose bounds will be changed.
Constraint: 1idxM, where M is the total number of the given components (e.g., decision variables) in the problem.
4: bli Real (Kind=nag_wp) Input
5: bui Real (Kind=nag_wp) Input
On entry: li, bli and ui, bui define the new lower and upper bounds on the ith component identified by idx and comp, respectively. To create an equality, set bli=bui=β, where |β|<bigbnd. To specify a nonexistent lower bound (i.e., li=-), set bli-bigbnd; to specify a nonexistent upper bound (i.e., ui=), set buibigbnd.
Constraints:
  • blibui;
  • bli<bigbnd;
  • bui>-bigbnd.
6: 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=6
On entry, comp=value.
Constraint: comp='X', 'LC' or 'NLC'.
ifail=8
On entry, comp=value, idx=value and M=value.
Constraint: 1idxM.
ifail=10
On entry, bli=value and bigbnd=value.
Constraint: bli<bigbnd.
On entry, bli=value and bui=value.
Constraint: blibui.
On entry, bui=value and bigbnd=value.
Constraint: bui>-bigbnd.
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.
e04tdf is not threaded in any implementation.

9 Further Comments

None.

10 Example

See Section 10 in e04taf and e04tcf.