ecole
ecole copied to clipboard
BoundsIntegral performance improvement
Describe the problem or improvement suggested
Right now, the complete history of bounds is stored in the event handler and the integral is recomputed from start before taking a difference.
Describe the solution you would like
Only store the values since the last call to extract
and compute directly the integral difference from this.
Something like
auto const& primal_bounds = ...
auto inegral = Reward{0.};
if(...){
integral = compute_primal_integral(primal_bounds);
} else {
...
}
handler.clear_all_but_last();
// No need to compute diff anymore
return integral;
Additional context
#144
We can further improve the code, and get rid of the vector altogether by accumulating the integral on-the-fly without storing all intermediate bound values.
Let's keep this issue open until we do it when we have time.