NAG CL Interfacee04rcc (handle_​set_​property)

Settings help

CL Name Style:

1Purpose

e04rcc is a part of the NAG optimization modelling suite and sets a given property to a subset of the decision variables, particularly, it specifies if the variables are integral or continuous.

2Specification

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

3Description

After the model has been fully or partially built by calling functions of the NAG optimization modelling suite, e04rcc may be used to change properties of a subset of the variables in the model. The property is given by ptype which refers to the integrality of the variables (continuous, integer or binary) or their linearity (if the variables are linear or generic, see Section 3.1). Both classes of properties can be set independently, however, only one property per class of properties can be chosen (i.e., a variable can be linear and integer but it cannot be continuous and binary at the same time). The properties can be changed multiple times and the last setting is the one used. e04ryc may be used to display the properties and further details of the problem.
See Section 4.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.

3.1Linearity of the Variables

It is sometimes useful in Nonlinear Programming (NLP) problems to distinguish between linear and nonlinear variables and thus give the solvers an extra piece of information to utilize. A variable is said to be linear if its involvement in the whole optimization model is linear, i.e., it appears only in linear expressions. All other variables, if used at all, are nonlinear.
Let's assume that we have a problem with seven variables with two nonlinear constraints declared by e04rkc and defined as follows:
 $g(x) = ( 3x1 + ex2 x4 + 4x4 - x3 + x5 x2 + x32 - 3x5 )$
and with a linear objective function, linear constraints. Variables ${x}_{6}$ and ${x}_{7}$ are not used at all in the definition of $g\left(x\right)$ and, therefore, they are clearly linear which is automatically detected by the solver. Although ${x}_{1}$ and ${x}_{5}$ appear in the nonlinear constraints $g\left(x\right)$, they are involved only in linear expressions and, therefore, are also linear. These two cannot be detected by the solver because the solver can only see the sparsity pattern defined by e04rkc and a Black Box call-back. In this case, it might be beneficial to set their property as linear using this function. If no property is set, it is assumed that the variables are generic, meaning that they have no special property, and their linearity is auto detected based on the constraints they appear in. There are no solvers in the suite which would exploit this property at the current release.
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{ptype}$const char * Input
On entry: indicates the property to set for the specified variables. ptype is case insensitive.
Class of properties referring to integrality:
${\mathbf{ptype}}="CONTINUOUS"$ or $"CONT"$
The variables will be continuous (the default property).
${\mathbf{ptype}}="INTEGER"$ or $"INT"$
The variables become integer.
${\mathbf{ptype}}="BINARY"$ or $"BIN"$
The variables become binary so they will be able to hold only values 0 or 1. Note that any existing box bounds are preserved. For example, if variable ${x}_{42}$ has its bounds set as $1.0\le {x}_{42}\le 5.3$ and becomes binary, its box bounds are not removed and, therefore, the only allowed value will be ${x}_{42}=1.0$.
Class of properties referring to linearity.
${\mathbf{ptype}}="GENERIC"$ or $"GEN"$
The variables have no special property. If they appear in at least one nonlinear expression (constraints or the objective), they will be assumed to be nonlinear (the default property).
${\mathbf{ptype}}="LINEAR"$ or $"LIN"$
The variables will be assumed to be linear in all nonlinear constraints and the objective they might appear.
Constraint: ${\mathbf{ptype}}="BINARY"$, $"BIN"$, $"CONTINUOUS"$, $"CONT"$, $"GENERIC"$, $"GEN"$, $"INTEGER"$, $"INT"$, $"LINEAR"$ or $"LIN"$.
3: $\mathbf{lidx}$Integer Input
On entry: the number of variables 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 variables whose properties will be modified. The elements may be supplied in any order.
Constraint: $1\le {\mathbf{idx}}\left[\mathit{i}-1\right]\le n$, for $\mathit{i}=1,2,\dots ,{\mathbf{lidx}}$, where $n$ is the number of decision variables in the problem.
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_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, $i=⟨\mathit{\text{value}}⟩$, ${\mathbf{idx}}\left[i-1\right]=⟨\mathit{\text{value}}⟩$ and $n=⟨\mathit{\text{value}}⟩$.
Constraint: $1\le {\mathbf{idx}}\left[i-1\right]\le n$.
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{ptype}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{ptype}}="BIN"$, $"CONT"$, $"GEN"$, $"INT"$ or $"LIN"$.

Not applicable.

8Parallelism and Performance

e04rcc 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.