Scaling my constraint matrix

82 views
Skip to first unread message

Rahul Nath R

unread,
Feb 2, 2021, 5:25:52 AM2/2/21
to CVXOPT
Hi, 
I am encountering a domain error from the CVXOPT package during solving a QP. Could somebody help me to solve the problem with scaling or other issues that are happening in my problem definition? This is the initial matrix and that is updated every 0.05 seconds in a simulation environment. However, in the middle of the simulation, I am getting a domain error.
P = [[  20.    0.    0.    0.    0.    0.    0.    0.]
       [   0.   20.    0.    0.    0.    0.    0.    0.]
       [   0.    0.   20.    0.    0.    0.    0.    0.]
       [   0.    0.    0.    2.    0.    0.    0.    0.]
       [   0.    0.    0.    0.    2.    0.    0.    0.]
       [   0.    0.    0.    0.    0. 1000.    0.    0.]
       [   0.    0.    0.    0.    0.    0. 2000.    0.]
       [   0.    0.    0.    0.    0.    0.    0. 2000.]]
q =     [[0.]
           [0.]
           [0.]
           [0.]
           [0.]
           [0.]
           [0.]
           [0.]]
G = [[ 1.  0.  0.  0.  0.  0.  0.  0.]
 [ 0.  1.  0.  0.  0.  0.  0.  0.]
 [ 0.  0.  1.  0.  0.  0.  0.  0.]
 [-1. -0. -0.  0.  0.  0.  0.  0.]
 [-0. -1. -0.  0.  0.  0.  0.  0.]
 [-0. -0. -1.  0.  0.  0.  0.  0.]
 [ 1.  0.  0.  0.  0.  0.  0.  0.]
 [ 0.  1.  0.  0.  0.  0.  0.  0.]
 [ 0.  0.  1.  0.  0.  0.  0.  0.]
 [-1. -0. -0.  0.  0.  0.  0.  0.]
 [-0. -1. -0.  0.  0.  0.  0.  0.]
 [-0. -0. -1.  0.  0.  0.  0.  0.]
 [ 0.  0.  0.  1.  0.  0.  0.  0.]
 [ 0.  0.  0.  0.  1.  0.  0.  0.]
 [ 0.  0.  0. -1. -0.  0.  0.  0.]
 [ 0.  0.  0. -0. -1.  0.  0.  0.]
 [ 0.  0.  0.  1.  0.  0.  0.  0.]
 [ 0.  0.  0.  0.  1.  0.  0.  0.]
 [ 0.  0.  0. -1. -0.  0.  0.  0.]
 [ 0.  0.  0. -0. -1.  0.  0.  0.]]

h = [[3.00000000e+04]
 [6.00000000e+04]
 [6.00000000e+04]
 [3.00000000e+04]
 [0.00000000e+00]
 [0.00000000e+00]
 [5.00000000e+01]
 [5.00000000e+01]
 [5.00000000e+01]
 [5.00000000e+01]
 [5.00000000e+01]
 [5.00000000e+01]
 [6.10865238e-01]
 [5.32325422e+00]
 [5.32325422e+00]
 [6.10865238e-01]
 [8.72664626e-03]
 [8.72664626e-03]
 [8.72664626e-03]
 [8.72664626e-03]]

A =  [[ 0.   0.70710678     0.70710678     0.         -0.          1.      0.          0.        ]
         [ 1.    0.70710678    -0.70710678    0.          0.          0.       1.          0.        ]
         [14.5        -8.48528137     8.48528137    -0.       -0.          0.      0.          1.        ]]

b = [[0]
        [0]
        [0]]
I am suspecting a large difference in scale in the inequality constraint to be a problem here(Matrix h, G denotes the inequality constraints)

Any help in solving the problem would be appreciated.

Regards,

Rahul 
Reply all
Reply to author
Forward
0 new messages