NAG CL Interface
e04tdc (handle_​set_​bound)

Settings help

CL Name Style:


1 Purpose

e04tdc 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

#include <nag.h>
void  e04tdc (void *handle, const char *comp, Integer idx, double bli, double bui, NagError *fail)
The function may be called by the names: e04tdc or nag_opt_handle_set_bound.

3 Description

After the model has been fully or partially built by calling functions of the NAG optimization modelling suite, e04tdc 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 function and any later alterations to Infinite Bound Size will not affect these constraints.
See Section 4.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.

4 References

None.

5 Arguments

1: handle void * Input
On entry: the handle to the problem. It needs to be initialized (e.g., by e04rac) and must not be changed between calls to the NAG optimization modelling suite.
2: comp const char * 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 e04rhc).
comp=LC or LINEAR CONSTRAINT
Linear constraint (see e04rjc).
comp=NLC or NONLINEAR CONSTRAINT
Nonlinear constraint (see e04rkc).
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 double Input
5: bui double 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: fail NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6 Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_BOUND
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.
NE_HANDLE
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.
NE_INDICES
On entry, comp=value, idx=value and M=value.
Constraint: 1idxM.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
NE_PHASE
The problem cannot be modified right now, the solver is running.
NE_STR_UNKNOWN
On entry, comp=value.
Constraint: comp=X, LC or NLC.

7 Accuracy

Not applicable.

8 Parallelism and Performance

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

9 Further Comments

None.

10 Example

See Section 10 in e04tac and e04tcc.