Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is rough code to benchmark solving the p-median (facility location) problem using SCS and GLPK through both MOI and the direct APIs.
It needs to be cleaned up before calling it official, but this at least provides the performance numbers:
Second run of
run_benchmark(num_facilities=5, num_customers=20, num_locations=10, time_limit_sec=Inf, max_iters=10000)
:Overhead of MOI for SCS is
147/132 = 1.11
(very good) and for GLPK2.38/1.4 = 1.7
(also pretty good).run_benchmark(num_facilities=10, num_customers=2000, num_locations=1000, time_limit_sec=5, max_iters=10)
(Note:solve
hits the time limit/iteration limit)Overhead of MOI for SCS is
70.8/19.4 = 3.6
(not great) and for GLPK24.1/7.93 = 3.03
(not great).These ratios are a bit fishy because they depend on how early the solve stops, but for SCS there's still apparently 50 seconds of extra overhead in the MOI version compared with the direct version.
This is using
master
of both SCS and GLPK. I haven't tried jump-dev/GLPK.jl#143.