jump-dev / Pajarito.jl

A solver for mixed-integer convex optimization
Mozilla Public License 2.0
131 stars 22 forks source link

add MI-polynomial example problem #331

Closed chriscoey closed 7 years ago

chriscoey commented 7 years ago

using PolyJuMP

@blegat I am adding some mixed integer conic example problems to the examples folder in this repo. Do you know of any simple applications of MI-SOS? If not I could just cook up an example problem - @joehuchette and I did this for small one last fall and used Pajarito MISDP to solve it. Is PolyJuMP pretty stable? Some integer variables shouldn't cause an issue should they?

blegat commented 7 years ago

Integer variables shouldn't cause any problem, PolyJuMP let JuMP handles the manipulation of expressions of decision variables.

chriscoey commented 7 years ago

If I wanted a polynomial with integer coefficients, I can't do that currently, right? I am looking at https://github.com/JuliaOpt/SumOfSquares.jl/blob/master/src/variable.jl#L13 and https://github.com/JuliaOpt/SumOfSquares.jl/blob/master/src/variable.jl#L32 where you let all the JuMP variables for the coefficients be :Cont

blegat commented 7 years ago

Yes, good point, @polyvariable does not work yet. You could build the polynomial as follows:

@polyvar x
p = a + b * x # a and b are integer JuMP variables

But of course it would be better to add an option to @polyvariable to have Integer variables

chriscoey commented 7 years ago

Thanks Benoit! Do you think there would be enough applications of integer/binary polynomial coefficients to warrant making the change to @polyvariable? Or are integer coefficient polynomials esoteric enough that I should just use your suggestion with the extra JuMP variables?

blegat commented 7 years ago

No this feature definitely deserves to be added :-)

joehuchette commented 7 years ago

I have an example or two I can put together.

blegat commented 7 years ago

@joehuchette You mean you are planning to make a PR for PolyJuMP to implement this ?

chriscoey commented 7 years ago

@joehuchette do you have a small self-contained Julia file for MISOS that we could add to the examples folder?

ccoffrin commented 7 years ago

If there are not some established standard cases, I can probably come up with some power system example.

chriscoey commented 7 years ago

Thanks Carleton, that would be great.

Do you use PolyJuMP etc for that, or the JuMP NLP interface?

ccoffrin commented 7 years ago

I have always used JuMP NLP

joehuchette commented 7 years ago

I'll open a PR

chriscoey commented 7 years ago

closed by @joehuchette's "PR" https://github.com/JuliaOpt/Pajarito.jl/commit/e3462c6a6fbe74b87207329e52c5b9ba405378e5