# NAG CL Interfacee04tbc (handle_​enable)

Settings help

CL Name Style:

## 1Purpose

e04tbc is a part of the NAG optimization modelling suite and allows you to enable various components of the existing model which were previously disabled by e04tcc.

## 2Specification

 #include
 void e04tbc (void *handle, const char *comp, Integer lidx, const Integer idx[], NagError *fail)
The function may be called by the names: e04tbc or nag_opt_handle_enable.

## 3Description

e04tcc and e04tbc form a pair of functions which allow you to temporarily disable and then re-enable parts of a model. This is particularly useful when a sequence of similar problems needs to be solved, to identify how a particular constraint or variable affects the solution, or to switch between previously defined constraints which are somewhat related to each other.
e04tbc may be used to re-enable a component of the model previously disabled by a call to e04tcc. The components to be re-enabled are identified by supplying the same value of comp and idx as used in the call to e04tcc when they were disabled. All newly created components of the model are enabled. Calling this function on enabled components is not an error but has no effect.
See Section 4.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.

None.

## 5Arguments

1: $\mathbf{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: $\mathbf{comp}$const char * Input
On entry: the type of the component of the model to be enabled. comp is case insensitive.
${\mathbf{comp}}="X"$, $"VAR"$ or $"VARIABLE"$
Decision variables $x$.
${\mathbf{comp}}="LC"$ or $"LINEAR CONSTRAINT"$
Linear constraints (see e04rjc).
${\mathbf{comp}}="QC"$ or $"QUADRATIC CONSTRAINT"$
Quadratic constraints (see e04rsc and e04rtc).
${\mathbf{comp}}="NLC"$ or $"NONLINEAR CONSTRAINT"$
Nonlinear constraints (see e04rkc).
${\mathbf{comp}}="CN"$ or $"CONE"$
${\mathbf{comp}}="MI"$ or $"MATRIX INEQUALITY"$
Matrix inequality constraints (see e04rnc).
${\mathbf{comp}}="NLS"$ or $"RESIDUAL"$
Nonlinear residuals ${r}_{j}\left(x\right)$ in the nonlinear least squares objective function (see e04rmc).
Constraint: ${\mathbf{comp}}="X"$, $"VAR"$, $"VARIABLE"$, $"LC"$, $"LINEAR CONSTRAINT"$, $"QC"$, $"QUADRATIC CONSTRAINT"$, $"NLC"$, $"NONLINEAR CONSTRAINT"$, $"CN"$, $"CONE"$, $"MI"$, $"MATRIX INEQUALITY"$, $"NLS"$ or $"RESIDUAL"$.
3: $\mathbf{lidx}$Integer Input
On entry: the number of elements in the index set.
Constraint: ${\mathbf{lidx}}\ge 1$.
4: $\mathbf{idx}\left[{\mathbf{lidx}}\right]$const Integer Input
On entry: the index set of components comp to be enabled. The elements may be supplied in any order.
Constraint: $1\le {\mathbf{idx}}\left[\mathit{i}-1\right]\le M$, for $\mathit{i}=1,2,\dots ,{\mathbf{lidx}}$, where $M$ is the total number of the given components (e.g., decision variables) in the model.
5: $\mathbf{fail}$NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

## 6Error 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.
On entry, argument $⟨\mathit{\text{value}}⟩$ had an illegal value.
NE_DELETED
On entry, ${\mathbf{comp}}=⟨\mathit{\text{value}}⟩$ and ${\mathbf{idx}}\left[i-1\right]=⟨\mathit{\text{value}}⟩$.
This component has been deleted.
This error can only occur when trying to enable a cone constraint that has been deleted by setting its size to $0$ with e04rbc.
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, ${\mathbf{comp}}=⟨\mathit{\text{value}}⟩$, $i=⟨\mathit{\text{value}}⟩$, ${\mathbf{idx}}\left[i-1\right]=⟨\mathit{\text{value}}⟩$ and $M=⟨\mathit{\text{value}}⟩$.
Constraint: $1\le {\mathbf{idx}}\left[i-1\right]\le M$.
NE_INT
On entry, ${\mathbf{lidx}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{lidx}}\ge 1$.
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, ${\mathbf{comp}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{comp}}="X"$, $"LC"$, $"QC"$, $"NLC"$, $"CN"$, $"MI"$ or $"NLS"$.

Not applicable.

## 8Parallelism and Performance

e04tbc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.