optimisationAppendDataPoints

Append data points to an output structure

 

This function appends data points to an OptionsMatlab output structure from a second OptionsMatlab output structure. The function can either copy all of the points, specified points, or the best point returned by the optimiser, from the second output structure.

 

The edited structure is returned as an output argument.

 

Syntax

STRUCTOUTEDIT = optimisationAppendDataPoints(STRUCTOUT, STRUCTOUT2)

STRUCTOUTEDIT = optimisationAppendDataPoints(STRUCTOUT, STRUCTOUT2, POINTS) 

 

Description

STRUCTOUTEDIT = optimisationAppendDataPoints(STRUCTOUT, STRUCTOUT2) where STRUCTOUT is the results structure returned by OptionsMatlab containing data points in a field OBJTRC (and CONSTRC) or RSMTRC to which the data points are appended. STRUCTOUT2 is a results structure from which all data points are copied. STRUCTOUTEDIT is a copy of STRUCTOUT to which all of the points are copied.

 

Note that RSM results can only be copied from to a structure containing RSM results (RSMTRC). Also unconstrained data points cannot be copied to a structure containing constrained data.

 

STRUCTOUTEDIT = optimisationAppendDataPoints(STRUCTOUT, STRUCTOUT2, POINTS)  as above where POINTS is a string specifying the mode of operation, or a vector specifying the points to be copied. POINTS may be a string with the following values:

all

all points from STRUCTOUT2 will be appended to STRUCTOUT. This is the default operation if POINTS is empty ([]).

best

the best point returned specified by STRUCTOUT2 will be appended to STRUCTOUT.

If POINTS is a vector it must contain the indices of points in STRUCTOUT2.OBJTRC.OBJFUN (or STRUCTOUT2.RSMTRC.OBJFUN) to be appended to STRUCTOUT.

 

Examples

These examples will demonstrate the three modes of operation of optimisationAppendDataPoints:

 

structin = createBeamStruct(2.8);

structin.NITERS = 10;               %Do a DoE of ten points

structout = OptionsMatlab(structin);

 

structin2 = structin;

structin2.OMETHD = 4;               %Do a GA of ten points

structout2 = OptionsMatlab(structin2);

           

In this example all data points from the second output structure will be appended to the first.

 

structoutedit = optimisationAppendDataPoints(structout, structout2);

structoutedit.OBJTRC

structoutedit.CONSTRC

 

ans =

    OBJFUN: [1x20 double]

      VARS: [2x20 double]

    NCALLS: 20

 

ans =

      CONS: [5x20 double]

      VARS: [2x20 double]

     LCONS: [5x20 double]

     UCONS: [5x20 double]

    NCALLS: 20

 

In this example the best data point from the second output structure will be appended to the first.

 

structoutedit2 = optimisationAppendDataPoints(structout, structout2, 'best');

structoutedit2.OBJTRC

structoutedit2.CONSTRC

 

ans =

    OBJFUN: [1x11 double]

      VARS: [2x11 double]

    NCALLS: 11

 

ans =

      CONS: [5x11 double]

      VARS: [2x11 double]

     LCONS: [5x11 double]

     UCONS: [5x11 double]

    NCALLS: 11

 

In this example the first, fifth and tenth data points from the second output structure will be appended to the first.

 

structoutedit3 = optimisationAppendDataPoints(structout, structout2, [1,5,10]);

structoutedit3.OBJTRC

structoutedit3.CONSTRC

 

ans =

    OBJFUN: [1x13 double]

      VARS: [2x13 double]

    NCALLS: 13

 

ans =

      CONS: [5x13 double]

      VARS: [2x13 double]

     LCONS: [5x13 double]

     UCONS: [5x13 double]

    NCALLS: 13

 

See also

optimisationCropDataPoints, optimisationReplaceDataPoints

 

 

 

 



Bump problem

contents

optimisationCropDataPoints

Copyright © 2007, The Geodise Project, University of Southampton