callable functions#
function rpd_initialize(T, INT, data, control, status)
Set default control values and initialize private data
Parameters:
data |
holds private internal data |
control |
is a structure containing control information (see rpd_control_type) |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are (currently):
|
function rpd_get_stats(T, INT, qplib_file, qplib_file_len, control, data, status, p_type, n, m, h_ne, a_ne, h_c_ne)
Read the data from a specified QPLIB file into internal storage, and report the type of problem encoded, along with problem-specific dimensions.
Parameters:
qplib_file |
is a one-dimensional array of type Vararg{Cchar} that specifies the name of the QPLIB file that is to be read. |
qplib_file_len |
is a scalar variable of type INT that gives the number of characters in the name encoded in qplib_file. |
control |
is a structure whose members provide control parameters for the remaining procedures (see rpd_control_type) |
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
p_type |
is a one-dimensional array of size 4 and type Vararg{Cchar} that specifies the type of quadratic programming problem encoded in the QPLIB file. The first character indicates the type of objective function used. It will be one of the following:
The second character indicates the types of variables that are present. It will be one of the following:
The third character indicates the type of the (most extreme) constraint function used; other constraints may be of a lesser type. It will be one of the following:
Thus for continuous problems, we would have
For integer problems, the second character would be I rather than C, and for mixed integer problems, the second character would by M or G. |
n |
is a scalar variable of type INT that holds the number of variables. |
m |
is a scalar variable of type INT that holds the number of general constraints. |
h_ne |
is a scalar variable of type INT that holds the number of entries in the lower triangular part of |
a_ne |
is a scalar variable of type INT that holds the number of entries in |
h_c_ne |
is a scalar variable of type INT that holds the number of entries in the lower triangular part of |
function rpd_get_g(T, INT, data, status, n, g)
Recover the linear term
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
n |
is a scalar variable of type INT that holds the number of variables. |
g |
is a one-dimensional array of size n and type T that gives the linear term |
function rpd_get_f(T, INT, data, status, f)
Recover the constant term
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
f |
is a scalar of type T that gives the constant term |
function rpd_get_xlu(T, INT, data, status, n, x_l, x_u)
Recover the variable lower and upper bounds
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
n |
is a scalar variable of type INT that holds the number of variables. |
x_l |
is a one-dimensional array of size n and type T that gives the lower bounds |
x_u |
is a one-dimensional array of size n and type T that gives the upper bounds |
function rpd_get_clu(T, INT, data, status, m, c_l, c_u)
Recover the constraint lower and upper bounds
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
m |
is a scalar variable of type INT that holds the number of general constraints. |
c_l |
is a one-dimensional array of size m and type T that gives the lower bounds |
c_u |
is a one-dimensional array of size m and type T that gives the upper bounds |
function rpd_get_h(T, INT, data, status, h_ne, h_row, h_col, h_val)
Recover the Hessian term
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
h_ne |
is a scalar variable of type INT that holds the number of entries in the lower triangular part of the Hessian matrix |
h_row |
is a one-dimensional array of size h_ne and type INT that gives the row indices of the lower triangular part of |
h_col |
is a one-dimensional array of size h_ne and type INT that gives the column indices of the lower triangular part of |
h_val |
is a one-dimensional array of size h_ne and type T that holds the values of the entries of the lower triangular part of the Hessian matrix |
function rpd_get_a(T, INT, data, status, a_ne, a_row, a_col, a_val)
Recover the Jacobian term
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
a_ne |
is a scalar variable of type INT that holds the number of entries in the constraint Jacobian matrix |
a_row |
is a one-dimensional array of size a_ne and type INT that gives the row indices of |
a_col |
is a one-dimensional array of size a_ne and type INT that gives the column indices of |
a_val |
is a one-dimensional array of size a_ne and type T that gives the values of the entries of the constraint Jacobian matrix |
function rpd_get_h_c(T, INT, data, status, h_c_ne, h_c_ptr, h_c_row, h_c_col, h_c_val)
Recover the Hessian terms
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
h_c_ne |
is a scalar variable of type INT that holds the number of entries in the lower triangular part of the Hessian matrix |
h_c_ptr |
is a one-dimensional array of size h_c_ne and type INT that gives the constraint indices of the lower triangular part of |
h_c_row |
is a one-dimensional array of size h_c_ne and type INT that gives the row indices of the lower triangular part of |
h_c_col |
is a one-dimensional array of size h_c_ne and type INT that gives the column indices of the lower triangular part of |
h_c_val |
is a one-dimensional array of size h_c_ne and type T that holds the values of the entries of the lower triangular part of the Hessian matrix |
function rpd_get_x_type(T, INT, data, status, n, x_type)
Recover the types of the variables
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
n |
is a scalar variable of type INT that holds the number of variables. |
x_type |
is a one-dimensional array of size n and type INT that specifies the type of each variable
|
function rpd_get_x(T, INT, data, status, n,
Recover the initial values of the variables
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
n |
is a scalar variable of type INT that holds the number of variables. |
x |
is a one-dimensional array of size n and type T that gives the initial values |
function rpd_get_y(T, INT, data, status, m, y)
Recover the initial values of the Lagrange multipliers
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
m |
is a scalar variable of type INT that holds the number of general constraints. |
y |
is a one-dimensional array of size n and type T that gives the initial values |
function rpd_get_z(T, INT, data, status, n, z)
Recover the initial values of the dual variables
Parameters:
data |
holds private internal data |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are:
|
n |
is a scalar variable of type INT that holds the number of variables. |
z |
is a one-dimensional array of size n and type T that gives the initial values |
function rpd_information(T, INT, data, inform, status)
Provides output information
Parameters:
data |
holds private internal data |
inform |
is a structure containing output information (see rpd_inform_type) |
status |
is a scalar variable of type INT that gives the exit status from the package. Possible values are (currently):
|
function rpd_terminate(T, INT, data, control, inform)
Deallocate all internal private storage
Parameters:
data |
holds private internal data |
control |
is a structure containing control information (see rpd_control_type) |
inform |
is a structure containing output information (see rpd_inform_type) |