Skip to content

Conversation

@henriquebecker91
Copy link
Contributor

I have only did it for MOI.ScalarAffineFunction constraints. This is merely a performance improvement. JuMP and MathOptInterface already have batch constraint deletion fallbacks and they will correctly call this method when it is the case. I did not add new tests nor benchmarks, but did call JuMP.delete in my code (that had performance problems), checked if the method was really called (with a println already removed), and the performance difference was from 23.2 seconds to 0.531 seconds (~29k constraints deleted from ~36k constraints, the speedup was probably higher than the ~43x because I am timing two batch variable deletions in these measurements, instead of just the constraint deletion, and they did not change performance with the changes introduced by this commit).

I executed the Gurobi tests as usual:
2020-04-20-17-41-37-1920x1080.png

@odow can you give it a look? If you want me to stop pinging you in these cases just tell me, I am never sure if I should or not. If you think it needs extra tests or a "minimal working benchmark" I can work on them asap.

…eFunction constraints. This is merely a performance improvement. JuMP and MathOptInterface already batch constraint deletion fallbacks and they will correctly call this method.
@odow
Copy link
Member

odow commented Apr 20, 2020

You are welcome to ping me :)

Does this get called in the MOI tests? At minimum, we need to ensure that added code is called. This can either be in the MOI tests, or via a specific test in Gurobi.jl.

@henriquebecker91
Copy link
Contributor Author

This is a screenshot of the Gurobi.jl tests after the last commit but with a println added in the code to be extra sure the method is called.

2020-04-20-19-11-34-1920x1080.png

henriquebecker91 added a commit to henriquebecker91/GuillotineModels.jl that referenced this pull request Apr 21, 2020
…jump-dev/Gurobi.jl#313). Change the PPG2KP flag no-unreachable-check to do-not-purge-unreachable. Improved performance of _print_unreachable. Added more timings.
@henriquebecker91
Copy link
Contributor Author

Thanks for the fast response!

@blegat blegat merged commit 4bc24ef into jump-dev:master Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants