NAG CPP Interface
nagcpp::opt::handle_init (e04ra)

Settings help

CPP Name Style:



1 Purpose

handle_init 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 "e04/nagcpp_e04ra.hpp"
#include "e04/nagcpp_class_CommE04RA.hpp"
template <typename COMM>

void function handle_init(COMM &comm, const types::f77_integer nvar, OptionalE04RA opt)
template <typename COMM>

void function handle_init(COMM &comm, const types::f77_integer nvar)

3 Description

handle_init initializes an empty problem, adds n0 decision variables, x, and returns a handle to the data structure. Note that further variables may be added to the problem later by e04taf (no CPP interface) and it is also possible to temporarily disable and enable individual variables in the model by e04tcf (no CPP interface) and e04tbf (no CPP interface), respectively. This handle may then be passed to some of the functions of the suite to formulate the problem (define or edit the variables, the objective function and constraints). Once the problem is fully defined, the handle may be passed to a suitable solver from the suite (e04fff (no CPP interface), handle_​solve_​dfls_​rcomm, e04ggf (no CPP interface), e04gnf (no CPP interface), e04jdf (no CPP interface), e04jef (no CPP interface), handle_​solve_​bounds_​foas, handle_​solve_​lp_​ipm, handle_​solve_​socp_​ipm, e04srf (no CPP interface), handle_​solve_​ipopt, e04svf (no CPP interface) and h02bkf (no CPP interface)). Afterwards, the problem may be further modified or passed to another solver of the suite. The handle must not be changed between calls to the functions of the suite. When the handle is no longer needed, handle_​free must be called to destroy it and deallocate all the allocated memory and data within. See Section 3.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.

4 References

None.

5 Arguments

1: comm CommE04RA Output
Communication structure.
2: nvar types::f77_integer Input
On entry: n, the initial number of decision variables defining the problem.
Constraint: nvar0.
3: opt OptionalE04RA Input/Output
Optional parameter container, derived from Optional.

6 Exceptions and Warnings

Errors or warnings detected by the function:
All errors and warnings have an associated numeric error code field, errorid, stored either as a member of the thrown exception object (see errorid), or as a member of opt.ifail, depending on how errors and warnings are being handled (see Error Handling for more details).
Raises: ErrorException
errorid=6
On entry, nvar = value.
Constraint: nvar0.
errorid=10605
On entry, the communication class value has not been initialized correctly.
errorid=−99
An unexpected error has been triggered by this routine.
errorid=−399
Your licence key may have expired or may not have been installed correctly.
errorid=−999
Dynamic memory allocation failed.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Please see the description for the underlying computational routine in this section of the FL Interface documentation.

9 Further Comments

None.

10 Example

Examples for the NAG CPP Interface are not currently available.