Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JuMP v0.19 support #48

Open
arnoutaertgeerts opened this issue Feb 28, 2019 · 7 comments
Open

JuMP v0.19 support #48

arnoutaertgeerts opened this issue Feb 28, 2019 · 7 comments

Comments

@arnoutaertgeerts
Copy link

Is there a release planned to support the new JuMP v0.19.0?

@jrock2468
Copy link

It looks like the REQUIRE file allows for JuMP v0.19, but I get the following when trying to add ConditionalJuMP in Julia 1.0:

    Status `~/.julia/environments/v1.0/Project.toml`
  [07493b3f] Alpine v0.1.3
  [c52e3926] Atom v0.8.2
  [a076750e] CPLEX v0.4.4
  [4076af6c] JuMP v0.19.0
  [e5e0dc1b] Juno v0.7.0
  [b8f27783] MathOptInterface v0.8.4
  [f6097e2c] MultiJuMP v0.5.0

(v1.0) pkg> add ConditionalJuMP
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
 JuMP [4076af6c] log:
 ├─possible versions are: [0.1.1-0.1.2, 0.2.0, 0.3.0-0.3.2, 0.4.0-0.4.1, 0.5.0-0.5.8, 0.6.0-0.6.3, 0.7.0-0.7.4, 0.8.0, 0.9.0-0.9.3, 0.10.0-0.10.3, 0.11.0-0.11.3, 0.12.0-0.12.2, 0.13.0-0.13.2, 0.14.0-0.14.2, 0.15.0-0.15.1, 0.16.0-0.16.2, 0.17.0-0.17.1, 0.18.0-0.18.5, 0.19.0] or uninstalled
 ├─restricted to versions 0.19.0 by an explicit requirement, leaving only versions 0.19.0
 └─restricted by compatibility requirements with ConditionalJuMP [ae04f764] to versions: [0.16.0-0.16.2, 0.17.0-0.17.1, 0.18.0-0.18.5] — no versions left
   └─ConditionalJuMP [ae04f764] log:
     ├─possible versions are: [0.0.1-0.0.5, 0.1.0] or uninstalled
     ├─restricted to versions * by an explicit requirement, leaving only versions [0.0.1-0.0.5, 0.1.0]
     └─restricted by julia compatibility requirements to versions: 0.1.0 or uninstalled, leaving only versions: 0.1.0```

@ianfiske
Copy link
Contributor

ianfiske commented Apr 8, 2019

The REQUIRE file says that 0.19 is not supported. The RHS version number in a REQUIRE file is an exclusive interval endpoint.

@jrock2468
Copy link

My bad, thanks!

@jmpohl
Copy link

jmpohl commented Apr 22, 2019

Interested in this as well. If I could get a bit of mentoring about what all would need to happen for the update, I would be interested in resurrecting this.

@rdeits
Copy link
Owner

rdeits commented Apr 23, 2019

I'm happy to help, but I don't have time to make this change myself. I think there are two stages to updating this package to fully utilize the new version of JuMP.

  1. The first change would be to just update the JuMP requirement without fundamentally altering how this package works. The biggest change that we need to deal with is the fact that JuMP 0.19 stores its affine expressions as ordered dicts mapping variables to coefficients. That should make our lives much easier, as there is a bunch of code in ConditionalJuMP related to canonicalizing and de-duplicating affine expressions. It should be possible to remove all of the de-duplication code from ConditionalJuMP, since the new OrderedDict affine expressions (by construction) cannot have duplicates. I think that a relatively small number of changes would be enough to get this code working with JuMP 0.19.
  2. The second change would be a much more significant re-write to use the new support in JuMP and MathOptInterface for custom constraint types. ConditionalJuMP currently works by taking your @disjunction or @implies macros and immediately producing linear constraints and binary variables. That worked OK, but it was never ideal. In particular, it would be great to be able to, for example, use ConditionalJuMP to model a problem with disjunctions and then solve that problem with Gurobi (using binary variables) and also with PATH (a dedicated complementarity solver). Doing so would require changing the way this package works: when a user writes @disjunction, rather than immediately creating binary variables and linear constraints, we would instead create some kind of ComplementarityConstraint. That constraint would not be resolved into binary variables and/or complementarity constraints until the problem is copied into the particular solver. That's the interface I've always wanted for this package, but I just never had the tools to make it happen.

@jmpohl
Copy link

jmpohl commented Apr 23, 2019

Awesome! This is exactly the direction I was looking for. I will start digging around in hopes of getting a better idea about (1). If that goes well and we still see a need for (2) we can tag up and make a battle plan.

Cheers,
Josiah

@blegat
Copy link

blegat commented Apr 23, 2019

it would be great to be able to, for example, use ConditionalJuMP to model a problem with disjunctions and then solve that problem with Gurobi (using binary variables) and also with PATH (a dedicated complementarity solver)

The IndicatorSet being added in jump-dev/MathOptInterface.jl#709 along with the bridge (jump-dev/MathOptInterface.jl#712) might solve this for the @implies macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants