jump-dev / Cbc.jl

A Julia interface to the Coin-OR Branch and Cut solver (CBC)
https://projects.coin-or.org/Cbc
Other
81 stars 35 forks source link

Update to MatrixOfConstraints #189

Closed odow closed 2 years ago

odow commented 2 years ago
codecov[bot] commented 2 years ago

Codecov Report

Merging #189 (55afe91) into master (b2cd21f) will decrease coverage by 3.97%. The diff coverage is 98.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #189      +/-   ##
==========================================
- Coverage   61.61%   57.64%   -3.98%     
==========================================
  Files           3        3              
  Lines         581      510      -71     
==========================================
- Hits          358      294      -64     
+ Misses        223      216       -7     
Impacted Files Coverage Δ
src/MOI_wrapper/MOI_wrapper.jl 86.39% <98.92%> (-0.78%) :arrow_down:
src/gen/libcbc_api.jl 22.80% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b2cd21f...55afe91. Read the comment docs.

odow commented 2 years ago

@blegat was this what you had in mind?

blegat commented 2 years ago

@blegat was this what you had in mind?

Yes! I'm just wondering whether it's possible to save the creation of some index maps. Given that MatrixOfConsraints does not support variable and constraint deletion, its variable and constraint indices are usually the same as those of the solvers so the index map is the identity. This saves the creation of one index map (it could save 2 if MOI.Utilities.identity_index_map returns a special struct that does not allocate anything and just returns performs identity mapping without storing any dict, that's a future improvement we could do that would automatically benefit all MatrixOfConstraints solvers)

odow commented 2 years ago

@blegat good to go?

odow commented 2 years ago

I'm going to assume yes, but I'll hold off tagging just yet.

blegat commented 2 years ago

Yes, you can tag