1 /*-------------------------------------------------------------------------------------*/ 2 /* NOMAD - Nonlinear Optimization by Mesh Adaptive Direct search - version 3.7.2 */ 3 /* */ 4 /* Copyright (C) 2001-2015 Mark Abramson - the Boeing Company, Seattle */ 5 /* Charles Audet - Ecole Polytechnique, Montreal */ 6 /* Gilles Couture - Ecole Polytechnique, Montreal */ 7 /* John Dennis - Rice University, Houston */ 8 /* Sebastien Le Digabel - Ecole Polytechnique, Montreal */ 9 /* Christophe Tribes - Ecole Polytechnique, Montreal */ 10 /* */ 11 /* funded in part by AFOSR and Exxon Mobil */ 12 /* */ 13 /* Author: Sebastien Le Digabel */ 14 /* */ 15 /* Contact information: */ 16 /* Ecole Polytechnique de Montreal - GERAD */ 17 /* C.P. 6079, Succ. Centre-ville, Montreal (Quebec) H3C 3A7 Canada */ 18 /* e-mail: nomad@gerad.ca */ 19 /* phone : 1-514-340-6053 #6928 */ 20 /* fax : 1-514-340-5665 */ 21 /* */ 22 /* This program is free software: you can redistribute it and/or modify it under the */ 23 /* terms of the GNU Lesser General Public License as published by the Free Software */ 24 /* Foundation, either version 3 of the License, or (at your option) any later */ 25 /* version. */ 26 /* */ 27 /* This program is distributed in the hope that it will be useful, but WITHOUT ANY */ 28 /* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A */ 29 /* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. */ 30 /* */ 31 /* You should have received a copy of the GNU Lesser General Public License along */ 32 /* with this program. If not, see <http://www.gnu.org/licenses/>. */ 33 /* */ 34 /* You can find information on the NOMAD software at www.gerad.ca/nomad */ 35 /*-------------------------------------------------------------------------------------*/ 36 /** 37 \file Speculative_Search.hpp 38 \brief Speculative search (headers) 39 \author Sebastien Le Digabel 40 \date 2010-04-12 41 \see Speculative.cpp 42 */ 43 #ifndef __SPECULATIVE_SEARCH__ 44 #define __SPECULATIVE_SEARCH__ 45 46 #include "Search.hpp" 47 #include "Mads.hpp" 48 49 namespace NOMAD { 50 51 /// Speculative search. 52 /** 53 The speculative search consists in looking further away along 54 the successful direction after an improvement. 55 */ 56 class Speculative_Search : public NOMAD::Search , private NOMAD::Uncopyable { 57 58 public: 59 60 /// Constructor. 61 /** 62 \param p Parameters -- \b IN. 63 */ Speculative_Search(NOMAD::Parameters & p)64 Speculative_Search ( NOMAD::Parameters & p ) 65 : NOMAD::Search ( p , NOMAD::SPEC_SEARCH ) {} 66 67 /// Destructor. ~Speculative_Search(void)68 virtual ~Speculative_Search ( void ) {} 69 70 /// The speculative search. 71 /** 72 - x_k = x_{k-1} + Delta^m_{k-1} d \n 73 s_k = x_{k-1} + Delta^m_{k-1} d if ell_{k-1} > 0 \n 74 or tau * Delta^m_{k-1} d otherwise. 75 - The directions that we use already contain Delta^m: 76 direction = Delta^m_{k-1} d 77 - The following test 78 \code 79 if ( new_feas_inc || new_infeas_inc ) 80 \endcode 81 is equal to \c true and has already been made in \c Mads.cpp. 82 83 \param mads NOMAD::Mads object invoking this search -- \b IN/OUT. 84 \param nb_search_pts Number of generated search points -- \b OUT. 85 \param stop Stop flag -- \b IN/OUT. 86 \param stop_reason Stop reason -- \b OUT. 87 \param success Type of success -- \b OUT. 88 \param count_search Count or not the search -- \b OUT. 89 \param new_feas_inc New feasible incumbent -- \b IN/OUT. 90 \param new_infeas_inc New infeasible incumbent -- \b IN/OUT. 91 */ 92 virtual void search ( NOMAD::Mads & mads , 93 int & nb_search_pts , 94 bool & stop , 95 NOMAD::stop_type & stop_reason , 96 NOMAD::success_type & success , 97 bool & count_search , 98 const NOMAD::Eval_Point *& new_feas_inc , 99 const NOMAD::Eval_Point *& new_infeas_inc ); 100 }; 101 } 102 103 #endif 104