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

Upgrade to JuMP 0.19 #7

Merged
merged 17 commits into from Jun 25, 2019
Merged

Upgrade to JuMP 0.19 #7

merged 17 commits into from Jun 25, 2019

Conversation

ianfiske
Copy link
Collaborator

@ianfiske ianfiske commented Jun 20, 2019

This is an overhaul upgrade to JuMP 0.19 and MathOptInterface following the advice of @blegat in https://discourse.julialang.org/t/advice-about-refactoring-linearfractional-jl-for-jump-0-19-and-julia-0-7/12966/2.

This resulted in a dramatic reduction in code complexity because of the new AbstractVariableRef api which allowed all of those beautiful operator and affine-expression methods to work out-of-the-box.

Note however, that I got rid of the @numerator and @denominator macros since they required a bunch of parsing overhead that I'd rather eliminate. The less-magical function version just takes a couple of GenericAffExpr for the numerator and denominator arguments to set_objective.

src/LinearFractional.jl Outdated Show resolved Hide resolved
@ianfiske ianfiske changed the title WIP Upgrade to JuMP 0.19 Upgrade to JuMP 0.19 Jun 21, 2019
@ianfiske ianfiske self-assigned this Jun 21, 2019
@ianfiske ianfiske requested a review from kenahoo June 21, 2019 20:23
@ianfiske
Copy link
Collaborator Author

Please have a look @juliebuard. I couldn't add you as an official reviewer.

@juliebuard
Copy link
Contributor

nice clean up of files and especially operator.jl!

@ianfiske
Copy link
Collaborator Author

A note for reviewers: this new version is based on https://github.com/JuliaOpt/JuMP.jl/blob/master/test/JuMPExtension.jl, reviewing that first will help make sense of this PR.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
src/LinearFractional.jl Show resolved Hide resolved
src/LinearFractional.jl Outdated Show resolved Hide resolved
src/LinearFractional.jl Show resolved Hide resolved
test/arrayvars.jl Show resolved Hide resolved
@ianfiske ianfiske removed the request for review from kenahoo June 25, 2019 17:05
@juliebuard
Copy link
Contributor

nice overall improvements @ianfiske thanks to those API! " lu et approuvé" ;)

@ianfiske ianfiske merged commit f088416 into master Jun 25, 2019
@ianfiske ianfiske deleted the jump0.19 branch July 2, 2019 19:50
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

Successfully merging this pull request may close these issues.

None yet

2 participants