Learn R Programming

QPmin (version 0.5-1)

randomQP: randomQP

Description

Generates a non-separable random quadratic program of the specified type.

Usage

randomQP(n, type = c("convex", "concave", "indefinite"))

Arguments

n

The random problem generated will have n variables and m = 3n/2 constraints. Must be an even number.

type

Specifies the curvature of the objective function.

Value

G

The quadratic component of the objective function. Must be symmetric.

g

The linear component of the objective function

A

The constraints coefficient matrix. This matrix has $n$ rows and $m$ columns.

b

The vector with the lower bounds on the constraints.

opt

An approximate expected value at the optimum solutions.

solutions

A list containing all of the global solutions to the problem.

Details

The algorithm is based on Calamai, Vicente, and Judice (1993). It generates a random quadratic program with the following form $$ \min_x \frac{1}{2} x^T G x + x^T g $$ $$ Ax \geq b $$

References

``A new technique for generating quadratic programming test problems,'' Calamai P.H., L.N. Vicente, and J.J. Judice, Mathematical Programming 61 (1993), pp. 215-231.

Examples

Run this code
# NOT RUN {
n <- 8

RP <- randomQP(n, "concave")

RP2 <- randomQP(n, "indefinite")

RP3 <- randomQP(n, "convex")

# }

Run the code above in your browser using DataLab