.. _method-mesh_adaptive_search-use_surrogate-inform_search:

"""""""""""""
inform_search
"""""""""""""


Surrogate informs evaluation order in mesh adaptive search


.. toctree::
   :hidden:
   :maxdepth: 1



**Specification**

- *Alias:* None

- *Arguments:* None


**Description**


When ``inform_search`` is specified with ``use_surrogate``,
``mesh_adaptive_search`` uses the surrogate to sort list of trial points
and subsequently the true function is evaluated on the most promising
points first.  Both true function and surrogate are used
interchangeably within the method.

*Default Behavior*

``inform_search`` is not the default surrogate usage mode.

*Expected Output*

The user can expect to see both the number of true model evaluations
and the number of approximation (i.e., surrogate) evaluations reported
in the Dakota screen output.  The former captures the sum of truth
evaluations done for the surrogate construction and for the
optimization.

*Usage Tips*

When ``inform_search`` is specified, the
``maximum_function_evaluations`` keyword applies to only the optimization
method and does not account for evaluations needed to construct the
surrogate.  If the user has a strict evaluation budget, they should
set ``maximum_function_evaluations`` such that evaluation budget =
number of evaluations to construct surrogate +
``maximum_function_evaluations``.



**Examples**


The following example shows the syntax used to set ``use_surrogate`` to
``optimize``.


.. code-block::

    method,
     mesh_adaptive_search
     model_pointer = 'SURROGATE'
     use_surrogate inform_search
    
    model,
     id_model = 'SURROGATE'
     surrogate global
     polynomial quadratic
     dace_method_pointer = 'SAMPLING'
    
    variables,
     continuous_design = 3
       initial_point   -1.0    1.5   2.0
       upper_bounds    10.0   10.0  10.0
       lower_bounds   -10.0  -10.0 -10.0
       descriptors      'x1'  'x2'  'x3'
     discrete_design_range = 2
       initial_point      2     2
       lower_bounds       1     1
       upper_bounds       4     9
       descriptors      'y1'   'y2'
           discrete_design_set
             real = 2
               elements_per_variable = 4 5
               elements = 1.2 2.3 3.4 4.5 1.2 3.3 4.4 5.5 7.7
               descriptors      'y3'   'y4'
             integer = 2
               elements_per_variable = 2 2
               elements = 4 7 8 9
               descriptors      'z1'   'z2'
    
    method,
     id_method = 'SAMPLING'
     model_pointer = 'TRUTH'
     sampling
       samples = 55
    
    model,
     id_model = 'TRUTH'
     single
       interface_pointer = 'TRUE_FN'
    
    interface,
     id_interface = 'TRUE_FN'
           direct
       analysis_driver = 'text_book'
    
    responses,
     objective_functions = 1
     no_gradients
     no_hessians


The following will appear toward the end of the screen output when
Dakota is run on this example.  The number of true function
evaluations includes the 55 evaluations that were done to construct
the surrogate (as specified in the SAMPLING method block) plus the
number of truth evaluations done by ``mesh_adaptive_search``.


.. code-block::

    <<<<< Function evaluation summary (APPROX_INTERFACE): 1660 total (1660 new, 0 duplicate)
    <<<<< Function evaluation summary (TRUE_FN): 795 total (795 new, 0 duplicate)




