I'm trying to use SCIP through python and I have installed SCIP optimization suite 3.2.1. I have problem framing my optimization question through PYSCIPOPT. As I have 2000+ variables to solve, I am wondering can I use matrix notation to frame the question in python?
Asked
Active
Viewed 712 times
0
-
2Welcome to Stackoverflow! Can you please elaborate your question having your effort like code or something so that people could get your problem early and help you? Thanks! – Enamul Hassan Mar 04 '16 at 03:49
-
What exactly do you mean by matrix notation? I suppose a Matlab/Numpy- like notation to state the entire problem like 'A * x <= b'? – Gregor Mar 04 '16 at 08:35
-
yes, something like A*x<=b. Do I use coefficients? I'm also having trouble with quadratic constraints. How do I use the addCons in the python interface to write the constraint x'Qx<=0.03 for example. Where x is n*1 and Q is n*n – Florence Mar 14 '16 at 09:49
1 Answers
0
No, this is not possible, because SCIP is constraint based and does not rely on a central matrix structure. A problem with 2000 variables is not at all large, by the way and should be processed within a a second.
This is how you would transform a quadratic constraint matrix Q
of size 2:
Q = [a b;c d], x = [x1; x2]
x'Qx = ax1^2 + dx2^2 + (b+c)x1x2
This can then be passed to SCIP with the addCons()
method.

mattmilten
- 6,242
- 3
- 35
- 65
-
Matt, I can show you a problem with two variables that takes forever ;) – Gregor Mar 04 '16 at 14:03
-
Thank you for your answer. Then how can I write the objective function of the form min x*QT*x-fTx in the python interface? where x is the n*1 matrix I want to solve and Q is the n*n covariance? – Florence Mar 04 '16 at 23:42
-
1Gregor, I said "processed" as in "read in". I didn't mean that it can be solved that fast. – mattmilten Mar 05 '16 at 09:01
-
As manetsus already pointed out: what have you tried so far and where did you get stuck? – mattmilten Mar 05 '16 at 15:10