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

Discrete optimizer. More...

Inheritance diagram for DiscreteOptimizer:
Inheritance graph
[legend]

Public Member Functions

function DiscreteOptimizer (var varargin)
 Class constructor. 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

Discrete optimizer.

Constructor & Destructor Documentation

function DiscreteOptimizer ( var  varargin)
inline

Class constructor.

Returns
instance of the class
Todo:
if input not discrete
Todo:
discrete parameters assumed to be natural numbers ideally we can get a list of possible values each discrete parameter can take Simulation script can scale from 1:n to whatever they need

Member Function Documentation

function getBounds ( )
inherited

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)
inherited

Gets a hint to the optimizer.

Returns a particular hint setting.

Parameters
keyproperty name
Return values
valueproperty value
function getInitialPopulation ( )
inherited

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 ( )
inherited

Returns the number of input variables.

Return values
nvarsNumber of input variables
function getOutputDimension ( )
inherited

Returns the number of cost functions.

Returns the number of output variables.

Return values
nobjectivesNumber of cost functions
function getPopulationSize ( )
inherited

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 ( )
inlineinherited

Gets some extra information.

Return values
statestructure
function optimize ( var  arg)
inherited

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 
)
inherited

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 
)
inherited

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 
)
inherited

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)
inherited

Sets the starting positions for the search.

Sets the initial population.

Parameters
popmatrix of initial values
function setInputConstraints ( var  con)
inherited

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)
inlineinherited

Sets some extra information.

Parameters
statestructure

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