SOT
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sot::Optimizer Class Reference

The surrogate optimization algorithm. More...

#include <optimizer.h>

Public Member Functions

 Optimizer (std::shared_ptr< Problem > &data, std::shared_ptr< ExpDesign > &expDes, std::shared_ptr< Surrogate > &surf, std::shared_ptr< Sampling > &sampling, int maxEvals)
 Constructor. More...
 
 Optimizer (std::shared_ptr< Problem > &data, std::shared_ptr< ExpDesign > &expDes, std::shared_ptr< Surrogate > &surf, std::shared_ptr< Sampling > &sampling, int maxEvals, int numThreads)
 Constructor. More...
 
Result run ()
 Runs the optimization algorithm. More...
 

Protected Member Functions

void evalBatch (const mat &batch, vec &funVals)
 Evalaute a batch of points in parallel. More...
 

Protected Attributes

std::shared_ptr< ProblemmData
 
std::shared_ptr< ExpDesignmExpDes
 
std::shared_ptr< SurrogatemSurf
 
std::shared_ptr< SamplingmSampling
 
const double mSigmaMax = 0.2
 
const double mSigmaMin = 0.005
 
int mSuccTol = 3
 
int mFailTol
 
int mMaxEvals
 
int mNumEvals
 
int mInitPoints
 
int mDim
 
vec mxLow
 
vec mxUp
 
std::string mName = "Surrogate Optimizer"
 
int mNumThreads
 
int mEvalCount = 0
 
std::mutex mMutex
 

Detailed Description

The surrogate optimization algorithm.

This is a general surrogate optimization algorithm that uses the supplied experimental design, surrogate model, and adaptive sampling to minimize the given optimization problem. The optimization algorithm starts by searching far from previously generated points and start searching closer and closer to the best solution found so far when not enough improvement is made. The algorithm restarts with a new experimental design when the search radius gets too small.

Author
David Eriksson, dme65.nosp@m.@cor.nosp@m.nell..nosp@m.edu

Constructor & Destructor Documentation

sot::Optimizer::Optimizer ( std::shared_ptr< Problem > &  data,
std::shared_ptr< ExpDesign > &  expDes,
std::shared_ptr< Surrogate > &  surf,
std::shared_ptr< Sampling > &  sampling,
int  maxEvals 
)
inline

Constructor.

Parameters
dataA shared pointer to the optimization problem
expDesA shared pointer to the experimental design
surfA shared pointer to the surrogate model
samplingA shared pointer to the adaptive sampling
maxEvalsEvaluation budget
Exceptions
std::logic_errorIf size of experimental design exceeds the evaluation budget
sot::Optimizer::Optimizer ( std::shared_ptr< Problem > &  data,
std::shared_ptr< ExpDesign > &  expDes,
std::shared_ptr< Surrogate > &  surf,
std::shared_ptr< Sampling > &  sampling,
int  maxEvals,
int  numThreads 
)
inline

Constructor.

Parameters
dataA shared pointer to the optimization problem
expDesA shared pointer to the experimental design
surfA shared pointer to the surrogate model
samplingA shared pointer to the adaptive sampling
maxEvalsEvaluation budget
numThreadsNumber of threads to use for parallel evaluations
Exceptions
std::logic_errorIf size of experimental design exceeds the evaluation budget

Member Function Documentation

void sot::Optimizer::evalBatch ( const mat batch,
vec funVals 
)
inlineprotected

Evalaute a batch of points in parallel.

Parameters
batchBatch of points to be evaluated
funValsVector to write the function values to
Result sot::Optimizer::run ( )
inline

Runs the optimization algorithm.

Returns
A Result object with the results from the run

Member Data Documentation

std::shared_ptr<Problem> sot::Optimizer::mData
protected

A shared pointer to the optimization problem

int sot::Optimizer::mDim
protected

Number of dimensions (extracted from mData)

int sot::Optimizer::mEvalCount = 0
protected

Evaluation counter for evalauting batches

std::shared_ptr<ExpDesign> sot::Optimizer::mExpDes
protected

A shared pointer to the experimental design

int sot::Optimizer::mFailTol
protected

After mSuccTol consecutive iteration without improvement the search radius is decreased

int sot::Optimizer::mInitPoints
protected

Points in the initial design (extracted from mExpDes)

int sot::Optimizer::mMaxEvals
protected

Evaluation budget

std::mutex sot::Optimizer::mMutex
protected

Mutex for assigning evaluations to the threads

std::string sot::Optimizer::mName = "Surrogate Optimizer"
protected

Strategy name

int sot::Optimizer::mNumEvals
protected

Evaluations carried out

int sot::Optimizer::mNumThreads
protected

Number of threads

std::shared_ptr<Sampling> sot::Optimizer::mSampling
protected

A shared pointer to the adpative sampling

const double sot::Optimizer::mSigmaMax = 0.2
protected

Largest search radius w.r.t. the unix box

const double sot::Optimizer::mSigmaMin = 0.005
protected

Smallest search radius w.r.t. the unix box

int sot::Optimizer::mSuccTol = 3
protected

After mSuccTol consecutive improvements the search radius is increased

std::shared_ptr<Surrogate> sot::Optimizer::mSurf
protected

A shared pointer to the surrogate model

vec sot::Optimizer::mxLow
protected

Lower variable bounds (extracted from mData)

vec sot::Optimizer::mxUp
protected

Upper variable bounds (extracted from mData)


The documentation for this class was generated from the following file: