I am trying to solve a linear algebra problem: an optimisation problem and I am using CVXOPT. I've split the problem into 3 components
In its simplest form, The general formulation for CVXOPT is
Minimize 1/2xTPx+qTx
subject to Gx≤h
and Ax=b.
1st problem component First of all I have to minimize, subject to constraint a very simple problem defined as following
P=
| S |
q=
| 0 |
A=
| 1 |
b=
| 1 |
G=
| r |
| -I |
h=
| rmin 0 |
I have coded this and it is working perfectly
2nd problem component The second problem I have is to transform a non convex problem into convex and linear so that the turnover generated by the optimisation problem it is constrained to a max value. In this case I have modelled and coded the problem as following and again all works fine
P=
| S 0 0 |
| 0 0 0 |
| 0 0 0 |
| 0 0 0 |
q=
| -x1 0 0 |
A=
| 1 0 0 |
| I I -I |
b=
| 1 x0 0 |
G=
| 0 1 1 |
| -I 0 0 |
| 0 -I 0 |
| 0 0 -I |
h=
| T 0 0 |
3rd problem component The third problem which I am struggling with (to solve) is to combine the two above. What I have done, which is obviously not correct as it turns to be a singular matrix is doing the following
P=
| S 0 0 |
| 0 0 0 |
| 0 0 0 |
| 0 0 0 |
q=
| -x1 0 0 |
A=
| 1 0 0 |
| I I -I |
b=
| 1 x0 0 |
G=
| 0 1 1 |
| -I 0 0 |
| 0 -I 0 |
| 0 0 -I |
| 0 0 rmin |
| 0 0 -I |
h=
| T 0 0 rmin 0 |
As I think The problem of the singularity comes from G, can anyone help me formulating the third problem in a correct way?
Thanks