lanl-ansi / Alpine.jl

A Julia/JuMP-based Global Optimization Solver for Non-convex Programs
https://lanl-ansi.github.io/Alpine.jl/latest/
Other
241 stars 39 forks source link

Add MOI attribute for tightened bound #200

Closed blegat closed 2 years ago

blegat commented 2 years ago

This can be useful for reusing Alpine's bound tightening for other purposes. cc @Shuvomoy

harshangrjn commented 2 years ago

@blegat Thanks! Currently we had to do Alp.l_var_tight[1:length(alp.l_var_orig)], but this is neater.

codecov[bot] commented 2 years ago

Codecov Report

Merging #200 (5dbe09f) into master (b252151) will increase coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
+ Coverage   86.85%   86.88%   +0.03%     
==========================================
  Files          16       16              
  Lines        3226     3234       +8     
==========================================
+ Hits         2802     2810       +8     
  Misses        424      424              
Impacted Files Coverage Δ
src/MOI_wrapper/MOI_wrapper.jl 86.47% <100.00%> (+0.54%) :arrow_up:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

blegat commented 2 years ago

@blegat Thanks! Currently we had to do Alp.l_var_tight[1:length(alp.l_var_orig)], but this is neater.

Yes, the issue with Alp.l_var_tight[1:length(alp.l_var_orig)] is that you don't know which bound correspond to which variable of the JuMP model. The mapping with all_variables might be nontrivial with variable bridges and the CachingOptimizer IndexMap