optum1

Example user-defined sequential optimiser for OptionsMatlab

 

optum1 is a random sequential optimiser that demonstrates how to define an arbitrary optimisation strategy to be invoked by OptionsMatlab. This optimiser can be invoked by specifying the fields OMETHD = 2.1 and OPTUM1 = 'optum1' in the input structure of OptionsMatlab.

 

To implement your own optimiser your function should conform to the following function prototype. User-defined optimisers should minimise the objective function irrespective of the search direction specified by the input structure.

 

Syntax

[VARS, STOPOPT] = OPTUM1(VARS, FVAL, CONS, UVARS, LVARS, UCONS, LCONS, MAXCALLS, CALLNUM, TOL, STEPSIZE, OLEVEL)

 

Description

[VARS, STOPOPT] = OPTUM1(VARS, FVAL, CONS, UVARS, LVARS, UCONS, LCONS, MAXCALLS, CALLNUM, TOL, STEPSIZE, OLEVEL) where the meaning of the input arguments are:

        VARS                   vector containing the last evaluated value of VARS

        FVAL                   objective function value at VARS

        CONS                   vector of constraint values at VARS (empty if unconstrained)

        UVARS                 vector of upper limits for VARS

        LVARS                 vector of lower limits for VARS

        UCONS                 vector of upper limits for CONS (may vary)

        LCONS                 vector of lower limits for CONS (may vary)

        MAXCALLS          maximum number of function evaluations, must be honoured by your implementation of optum1

        CALLNUM            number of iterations performed

        TOL                                 requested tolerance of the optimiser

        STEPSIZE          requested step-size of the optimiser

        OLEVEL               requested output level of the optimiser

where the meaning of the output arguments are:

VARS                   vector containing the next value of VARS to be evaluated. If STOPOPT indicates that the optimiser is complete VARS should contain the minimum variable values detected by the optimiser

STOPOPT            a flag indicating the whether the optimiser has completed. The optimiser will run whilst STOPOPT = 0, and will complete when STOPOPT = 1 is returned. If STOPOPT is not set to 1 the optimiser will run indefinitely.

 

Example

This example invokes the user-defined optimiser defined by optum1 over the Beam problem.

 

input = createBeamStruct;

input.NITERS = 20;

input.OMETHD = 2.1;

input.OPTUM1 = 'optum1';

output = OptionsMatlab(input);

optimisationTrace(output,input,3)

 

Figure 20 Trace produced by random optimiser optum1

 

See also

OptionsMatlab

 



optjobparallel2

contents

Peaks4d problem

Copyright © 2007, The Geodise Project, University of Southampton