Learn R Programming

missalpha (version 0.2.0)

qp_solver: General Solver for Quadratic Programming Problems

Description

This function provides a general interface to solve quadratic programming problems using different optimization methods. It supports Genetic Algorithm (GA), Differential Evolution (DEoptim), and Sequential Least Squares Programming (SLSQP).

Usage

qp_solver(n, A, b, c, x_max = 1, method = "GA", print_message = FALSE, ...)

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.

method

A character string specifying the optimization method to use. Can be 'GA', 'DEoptim', or 'nloptr'.

print_message

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

...

Additional control parameters passed to the chosen optimization method.

See Also

qp_solver_DEoptim, qp_solver_GA, qp_solver_nloptr