The SUMO toolbox  2018a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
Optimizer Class Reference

Abstract base class for an optimizer. More...

Inheritance diagram for Optimizer:
Inheritance graph
[legend]

Public Member Functions

function Optimizer (var ip, var varargin)
 Creates an Optimizer object, not to be called directly. More...
 
function getBounds ()
 Returns bounds for optimizers that need it. More...
 
function setBounds (var LB, var UB)
 Sets bounds for optimizers that need it. More...
 
function getInitialPopulation ()
 Gets the starting positions for the search. More...
 
function setInitialPopulation (var pop)
 Sets the starting positions for the search. More...
 
function getInputDimension ()
 Returns the number of input variables. More...
 
function getOutputDimension ()
 Returns the number of cost functions. More...
 
function setDimensions (var inDim, var outDim)
 Sets the number of input and output dimensions. More...
 
function setHint (var key, var value)
 Gives a hint to the optimizer. More...
 
function getHint (var key)
 Gets a hint to the optimizer. More...
 
function setState (var state)
 Sets some extra information. More...
 
function getState ()
 Gets some extra information. More...
 
function getPopulationSize ()
 Get the number of individuals in the population. More...
 
function setInputConstraints (var con)
 Sets input constraints. More...
 
function optimize (var arg)
 This function optimizes the given function handle, subject to constraints. More...
 

Detailed Description

Abstract base class for an optimizer.

Optimization methods are to be derived from this class. It provides a logger object for the derived classes and instantiates all constraints

Constructor & Destructor Documentation

function Optimizer ( var  ip,
var  varargin 
)
inline

Creates an Optimizer object, not to be called directly.

The constructor of the derived class should be called.

Parameters
nvarsNumber of dimensions
nobjectivesNumber of cost functions
Returns
instance of the Optimizer class

Member Function Documentation

function getBounds ( )

Returns bounds for optimizers that need it.

Only needed for optimization methods that support it.

Return values
LBlower bound
UBupper bound
function getHint ( var  key)

Gets a hint to the optimizer.

Returns a particular hint setting.

Parameters
keyproperty name
Return values
valueproperty value
function getInitialPopulation ( )

Gets the starting positions for the search.

pop may be a matrix for population-based, multi-start, etc. methods

Return values
startxmatrix of initial values
function getInputDimension ( )

Returns the number of input variables.

Return values
nvarsNumber of input variables
function getOutputDimension ( )

Returns the number of cost functions.

Returns the number of output variables.

Return values
nobjectivesNumber of cost functions
function getPopulationSize ( )

Get the number of individuals in the population.

The base method assumes only 1 individual.

Return values
sizePopulation size

Population-based optimization methods should override this

function getState ( )
inline

Gets some extra information.

Return values
statestructure
function optimize ( var  arg)

This function optimizes the given function handle, subject to constraints.

Parameters
argfunction handle
Return values
xoptimal input point(s)
fvaloptimal function value(s)
function setBounds ( var  LB,
var  UB 
)

Sets bounds for optimizers that need it.

Only needed for optimization methods that support it.

Parameters
LBlower bound
UBupper bound
function setDimensions ( var  inDim,
var  outDim 
)

Sets the number of input and output dimensions.

Includes some input checking to ensure that the bounds and the initial population are still correct.

Parameters
inDimNumber of input variables
outDimNumber of cost functions

If not, these variables are reset to their default values without warning!

function setHint ( var  key,
var  value 
)

Gives a hint to the optimizer.

Sets a hint that may or not be honored by the optimizer (depends on the type...).

Parameters
keyproperty name
valueproperty value

Only supports 'maxTime', time atm.

function setInitialPopulation ( var  pop)

Sets the starting positions for the search.

Sets the initial population.

Parameters
popmatrix of initial values
function setInputConstraints ( var  con)

Sets input constraints.

By default the optimizer doesn't support constraints (gives error).

Parameters
conconstraint objects (cell array)

Derived classes should override this method if they do support it.

function setState ( var  state)
inline

Sets some extra information.

Parameters
statestructure

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