void oops_do(void f(oop*)) { if (is_filled()) { outer.oops_do(f); if(is_inner()) inner.oops_do(f); } }
// launch Hansen test bool Optimizer::update_real_loup() { IntervalVector epsbox(loup_point); // ==================================================== // solution #1: we inflate the loup-point and // call Hansen test in contracting mode. // TODO: replace default_equ_eps by something else! // epsbox.inflate(default_equ_eps); // PdcHansenFeasibility pdc(equs->f, false); // ==================================================== // ==================================================== // solution #2: we call Hansen test in inflating mode. PdcHansenFeasibility pdc(equs->f, true); // ==================================================== // TODO: maybe we should check first if the epsbox is inner... // otherwise the probability to get a feasible point is // perhaps too small? // TODO: HansenFeasibility uses midpoint // but maybe we should use random if (pdc.test(epsbox)==YES) { Interval resI = sys.goal->eval(pdc.solution()); if (!resI.is_empty()) { double res=resI.ub(); if (res<loup) { //TODO : in is_inner, we check again all equalities, // it's useless in this case! if (is_inner(pdc.solution())) { loup = res; loup_box = pdc.solution(); cout << setprecision (12) << " *real* loup update " << loup << " loup box: " << loup_box << endl; return true; } } } } //=========================================================== return false; }
bool is_outer() const { return !is_inner(); }