Discrete optimizer.
More...
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
Returns bounds for optimizers that need it.
Only needed for optimization methods that support it.
- Return values
-
LB | lower bound |
UB | upper bound |
function getHint |
( |
var |
key | ) |
|
|
inherited |
Gets a hint to the optimizer.
Returns a particular hint setting.
- Parameters
-
- Return values
-
function getInitialPopulation |
( |
| ) |
|
|
inherited |
Gets the starting positions for the search.
pop may be a matrix for population-based, multi-start, etc. methods
- Return values
-
startx | matrix of initial values |
function getInputDimension |
( |
| ) |
|
|
inherited |
Returns the number of input variables.
- Return values
-
nvars | Number of input variables |
function getOutputDimension |
( |
| ) |
|
|
inherited |
Returns the number of cost functions.
Returns the number of output variables.
- Return values
-
nobjectives | Number of cost functions |
function getPopulationSize |
( |
| ) |
|
|
inherited |
Get the number of individuals in the population.
The base method assumes only 1 individual.
- Return values
-
Population-based optimization methods should override this
Gets some extra information.
- Return values
-
function optimize |
( |
var |
arg | ) |
|
|
inherited |
This function optimizes the given function handle, subject to constraints.
- Parameters
-
- Return values
-
x | optimal input point(s) |
fval | optimal 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
-
LB | lower bound |
UB | upper 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
-
inDim | Number of input variables |
outDim | Number 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
-
key | property name |
value | property value |
Only supports 'maxTime', time atm.
function setInitialPopulation |
( |
var |
pop | ) |
|
|
inherited |
Sets the starting positions for the search.
Sets the initial population.
- Parameters
-
pop | matrix of initial values |
function setInputConstraints |
( |
var |
con | ) |
|
|
inherited |
Sets input constraints.
By default the optimizer doesn't support constraints (gives error).
- Parameters
-
con | constraint objects (cell array) |
Derived classes should override this method if they do support it.
function setState |
( |
var |
state | ) |
|
|
inlineinherited |
Sets some extra information.
- Parameters
-
The documentation for this class was generated from the following file: