Closed chriscoey closed 7 years ago
Integer variables shouldn't cause any problem, PolyJuMP let JuMP handles the manipulation of expressions of decision variables.
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
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
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?
No this feature definitely deserves to be added :-)
I have an example or two I can put together.
@joehuchette You mean you are planning to make a PR for PolyJuMP to implement this ?
@joehuchette do you have a small self-contained Julia file for MISOS that we could add to the examples folder?
If there are not some established standard cases, I can probably come up with some power system example.
Thanks Carleton, that would be great.
Do you use PolyJuMP etc for that, or the JuMP NLP interface?
I have always used JuMP NLP
I'll open a PR
closed by @joehuchette's "PR" https://github.com/JuliaOpt/Pajarito.jl/commit/e3462c6a6fbe74b87207329e52c5b9ba405378e5
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?