qclp#
- swordfish.function.qclp()#
Solve the following optimization problem with a linear objective function and a set of constraints including a quadratic constraint.
\(\min\limits_xr^T * x\text{ such that}\begin{cases}x^T * V * x\le k\\A * x \le b\\Aeq * x=beq\\norm(x-x_0) \le c\end{cases}\)
The result is a 2-element tuple. The first element is the minimum value of the objective function. The second element is the value of x where the value of the objective function is minimized.
- Parameters:
r (Constant) – A matrix.
k (Constant) – A positive scalar.
A (Constant, optional) – A matrix.
b (Constant, optional) – A vector.
Aeq (Constant, optional) – A vector.
beq (Constant, optional) – A vector.
x0 (Constant, optional) – A vector of coefficients for absolute value inequality constraints.
c (Constant, optional) – A non-negative number representing the right-hand constant for absolute value inequality constraints.
eps (Constant, optional) – A positive floating-point number representing the solution precision. The default value is 1e-6, and the range is [1e-4, 1e-9]. A solution with higher precision can be obtained by decreasing eps. If a value beyond the range is set, it will be adjusted to the default value.
alpha (Constant, optional) – positive floating-point number representing the relaxation parameter. The default value is 1.5, and the range is (0,2). The solution process can be sped up by increasing alpha. If a value beyond the range is set, it will be adjusted to the default value.