OptionsMatlab integrates the Options design exploration and optimization package [1] into the Matlab environment [2]. The advantages of this approach include; the potential to rapidly prototype and debug objective and constraint functions, and the ability to directly leverage the functionality available within the Matlab environment. Matlab provides data analysis and visualisation capabilities. Additional functionality is available from a variety of toolboxes, including the Geodise toolboxes for Grid-enabled computational and data management [3].
OptionsMatlab provides access to all of the design search and optimisation algorithms within the Options package whilst retaining the maximum flexibility. Users define the objective and constraint functions that describe their problem as Matlab functions. These functions can therefore include interpreted Matlab, compiled MEX functions, or callbacks to external applications or to the Grid. The modular structure of OptionsMatlab is shown by Figure 1.
Figure 1 The modular structure of OptionsMatlab.
OptionsMatlab is invoked by calling the Matlab function OptionsMatlab. An input structure describes the user’s problem, and configures the design search and optimisation algorithm to be used. Additionally a large number of optional fields may be used to adjust the Options control parameters. The results are returned to the Matlab workspace in an output structure
The usage of OptionsMatlab differs from the original Options interface. A programme of design search and optimisation is based upon a sequence of invocations of the OptionsMatlab function from the Matlab workspace. By comparison the Options interface supports a number of operations upon a data-set managed by the internal Options database. OptionsMatlab can be used to perform operations upon the results of a previous optimisation, such as building a Response Surface Model, by passing the results as a second input argument.
The modular structure of OptionsMatlab also allows the user to customise the evaluation of the objective and constraint functions by replacing the function OPTJOB. For example, the default implementation of OPTJOB supplied with OptionsMatlab, optjob.m, evaluates the objective and constraint functions in serial. An alternative job manager is provided which supports parallel function evaluations (see section 5.10).
This document provides an introduction to the use of the OptionsMatlab package. For further details of the theory of design search and optimisation, and the use of the Options package, please consult the Options manual [1].
OptionsMatlab has three modes of operation:
These modes are invoked depending upon the fields of the input structure (Figure 2).
Figure 2 OptionsMatlab’s modes of operation. Hyper-parameter tuning will be invoked if the input field TUNEHYPER is set (#1). If the input field OBJMOD (or CONMOD) is set the specified optimisation will be run over a RSM (#2). In all other conditions a direct search over the user's objective function is used.
This section describes the steps needed to install OptionsMatlab.
Gendat licenses are linked to the MAC address (Windows) or hostid (UNIX) of the machine running OptionsMatlab, and are available from Prof. Andy Keane.
OptionsMatlab looks for a Gendat license file at the location specified by the environment variable GENDAT_CODES. If this environment variable is not specified then the UNIX version of OptionsMatlab looks for a Gendat license in the file /usr/local/geodise/OptionsMatlab/gendat.cds and if this file does not exist it will look for gendat.cds in the current directory. The Windows version of OptionsMatlab will look for a Gendat license in the file C:\fortran\gendat\GENDAT.CDS if the environment variable does not exist.
The directory containing the OptionsMatlab functions should be added to the Matlab search path.
If using the Matlab desktop navigate to the 'Set Path' dialog ('File' > 'Set Path'). Click the 'Add Folder' button and browse to the directory containing the OptionsMatlab, select 'OK' to confirm. You may wish to click the 'Save' button to preserve the configuration between sessions. Click 'Close' to dismiss the dialog.
If using Matlab via the Unix terminal use the addpath function at the Matlab command line.
>> addpath /home/USER/OptionsMatlab
System administrators configuring a multi-user Matlab installation may find it preferable to edit $MATLABROOT/toolbox/local/pathdef.m to make changes to the Matlab search path available to all users.
To confirm that the Matlab search path has been successfully configured run:
>> str = which('OptionsMatlab')
The variable str should contain the path of the OptionsMatlab function.
To read the OptionsMatlab documentation type 'help OptionsMatlab' at the Matlab command prompt. This text contains details of the input arguments to OptionsMatlab and the output structures returned. For information about the interfaces required by user-defined objective and constraint functions type 'help optjob'.
Copyright © 2007, The Geodise Project, University of Southampton