Learn R Programming

missalpha (version 0.2.0)

qp_solver_nloptr: Solve Quadratic Programming Problem using nloptr

Description

This function solves a quadratic programming problem using the Sequential Least Squares Programming (SLSQP) algorithm from the nloptr package.

Usage

qp_solver_nloptr(
  n,
  A,
  b,
  c,
  x_max = 1,
  print_message = FALSE,
  xtol_rel = 1e-08,
  maxeval = 10000,
  print_level = 0,
  ...
)

Value

A list containing:

f_cd

The optimal objective function value.

x_value

The optimal values of the decision variables.

Arguments

n

An integer representing the number of decision variables.

A

A matrix representing the quadratic coefficients.

b

A numeric vector representing the linear coefficients.

c

A numeric scalar representing the constant term in the objective function.

x_max

An integer representing the upper bound for the decision variables. Default is 1.

print_message

A logical value indicating whether to print optimization details. Default is FALSE.

xtol_rel

A numeric value specifying the relative tolerance for convergence. Default is 1e-8.

maxeval

An integer specifying the maximum number of function evaluations. Default is 10000.

print_level

An integer controlling the verbosity of output. Default is 0.

...

Additional control parameters for nloptr.

See Also

qp_solver, qp_solver_DEoptim, qp_solver_GA