jump-dev / MathOptInterface.jl

A data structure for mathematical optimization problems
http://jump.dev/MathOptInterface.jl/
Other
399 stars 87 forks source link

Semicontinuous and Semiinteger -> binary variable + Interval variable #897

Closed blegat closed 4 years ago

blegat commented 5 years ago

Define SemiBridge for transforming a Semicontinuous (resp. Semiinteger) variable z to a free (resp. Integer) variable y with the constraints set.lower * z <= y and y <= set.upper * z. Ideally, if set.lower <= 0 <= set.upper, the bridge should (at run-time) decide to not create any binary variable and simply constrain y to belong to Interval(set.lower, set.upper).

We should also add Semicontinuous and Semiinteger tests in intlinear.jl. Any MILP solver should be able to pass them thanks to the bridge.

joaquimg commented 4 years ago

I will do it. However, I don't that the Interval is a good idea if we want to allow modifications of the set. If we sill add the binary the problem will not be much harder. If we want to protect the user i'd rather raise an error. We can talk about in the PR, coming soon.

blegat commented 4 years ago

Yes, the interval is not mandatory, let's wait to see if this is a requested feature