NAG CL Interface
e04rac (handle_​init)

1 Purpose

e04rac initializes a data structure for the NAG optimization modelling suite for problems such as, linear programming (LP), quadratic programming (QP), nonlinear programming (NLP), least squares (LSQ) problems, second-order cone programming (SOCP), linear semidefinite programming (SDP) and semidefinite programming with bilinear matrix inequalities (BMI-SDP).

2 Specification

#include <nag.h>
void  e04rac (void **handle, Integer nvar, NagError *fail)
The function may be called by the names: e04rac or nag_opt_handle_init.

3 Description

e04rac initializes an empty problem with n decision variables, x, and returns a handle to the data structure. This handle may then be passed to some of the functions e04rbc, e04rec, e04rfc, e04rgc, e04rhc, e04rjc, e04rkc, e04rlc, e04rmc, e04rnc and e04rpc to formulate the problem (define the objective function and constraints) and to a compatible solver, e04ffc, e04fgc, e04jdc, e04jec, e04kfc, e04mtc, e04ptc, e04stc or e04svc, to solve it. The handle must not be changed between calls. When the handle is no longer needed, e04rzc must be called to destroy it and deallocate all the allocated memory and data within. 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 ** Output
Note: handle does not need to be set on input.
On exit: holds a handle to the internal data structure where an empty problem with nvar variables is defined.
2: nvar Integer Input
On entry: n, the number of decision variables in the problem.
Constraint: nvar>0.
3: 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_INT
On entry, nvar=value.
Constraint: nvar>0.
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.

7 Accuracy

Not applicable.

8 Parallelism and Performance

e04rac is not threaded in any implementation.

9 Further Comments

None.

10 Example

See examples associated with other functions in the suite, such as: