Home > Source > Helper > set_precision.m

set_precision

PURPOSE ^

==============================================================

SYNOPSIS ^

function [precision_required] = set_precision(iterations_ratio, precision_automation_type)

DESCRIPTION ^

 ==============================================================
 SET_PRECISON: Set precisoon required for the optimiser

    GENERAL

      [precision_required] = set_precision(iterations_ratio)

    INPUT/S

      -iterations_ratio:
            The ratio between the current iteration and the total number of iterations.

           
      -precision_automation_type
            The way in which precision is chosen

    OUTPUT/S

      -precision_required:
            The precsion required

    PENDING WORK

      -

    KNOWN BUG/S

      -None.

    COMMENT/S

      -

    RELATED FUNCTION/S

      

    ABOUT

      -Created:     May 5th, 2004
      -Last update: May 5th, 2004
      -Revision:    0.0.1
      -Author:      R. S. Schestowitz, University of Manchester
 ==============================================================

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [precision_required] = set_precision(iterations_ratio, precision_automation_type)
0002 
0003 % ==============================================================
0004 % SET_PRECISON: Set precisoon required for the optimiser
0005 %
0006 %    GENERAL
0007 %
0008 %      [precision_required] = set_precision(iterations_ratio)
0009 %
0010 %    INPUT/S
0011 %
0012 %      -iterations_ratio:
0013 %            The ratio between the current iteration and the total number of iterations.
0014 %
0015 %
0016 %      -precision_automation_type
0017 %            The way in which precision is chosen
0018 %
0019 %    OUTPUT/S
0020 %
0021 %      -precision_required:
0022 %            The precsion required
0023 %
0024 %    PENDING WORK
0025 %
0026 %      -
0027 %
0028 %    KNOWN BUG/S
0029 %
0030 %      -None.
0031 %
0032 %    COMMENT/S
0033 %
0034 %      -
0035 %
0036 %    RELATED FUNCTION/S
0037 %
0038 %
0039 %
0040 %    ABOUT
0041 %
0042 %      -Created:     May 5th, 2004
0043 %      -Last update: May 5th, 2004
0044 %      -Revision:    0.0.1
0045 %      -Author:      R. S. Schestowitz, University of Manchester
0046 % ==============================================================
0047 
0048 
0049 switch precision_automation_type,
0050     
0051   case 'default'
0052     if (iterations_ratio > 9),
0053      precision_required = 1e-3;
0054     elseif (iterations_ratio > 8),
0055      precision_required = 1e-4; 
0056     elseif (iterations_ratio > 6),
0057      precision_required = 1e-5;            
0058     elseif (iterations_ratio > 4),
0059      precision_required = 1e-6;              
0060     elseif (iterations_ratio > 3),
0061      precision_required = 1e-7;                          
0062     elseif (iterations_ratio > 2),
0063      precision_required = 1e-8;
0064     else
0065      precision_required = 1e-10;  
0066     end
0067   case 'smart'
0068      % do some good choice of precision here... use knowledge about
0069      % optimisation state
0070     precision_required = 1e-5;
0071 end

Generated on Thu 13-May-2004 18:00:46 by m2html © 2003