Skip to content

Commit

Permalink
optim: fix wrong computation in anticipated filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilles Chabert committed Sep 4, 2019
1 parent 98538fe commit 3aa739d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/optim/src/strategy/ibex_Optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ Optimizer::~Optimizer() {
// the heap and the current box are contracted with y <= ymax
double Optimizer::compute_ymax() {
if (anticipated_upper_bounding) {
double ymax = loup - rel_eps_f*fabs(loup);
//double ymax = loup - rel_eps_f*fabs(loup); ---> wrong :the relative precision must be correct for ymax (not loup)
double ymax = loup>0 ?
1/(1+rel_eps_f)*loup
:
1/(1-rel_eps_f)*loup;

if (loup - abs_eps_f < ymax)
ymax = loup - abs_eps_f;
return ymax;
Expand Down

0 comments on commit 3aa739d

Please sign in to comment.