1
$\begingroup$

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 \begin{align}\min&\quad\frac12x^\top Px+q^\top x\\\text{s.t.}&\quad Gx\le h\\&\quad Ax=b\end{align}

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  |

b=

|   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?

$\endgroup$
1
  • $\begingroup$ Isn't P supposed to be square? Shouldn't Ax have the same dimensionality (2) as b (which has 3 instead)? $\endgroup$ Aug 5 at 5:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.