1

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

1 Answer 1

1

I think you should add another column to your G matrix

|0    |
|0    |
|0    |
|rmin |
|-I   |
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, will give it a go and let you know

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.