***value#

Description#

The ***value command is used to initialize the variables to be optimized. The initial value of the variables is used to normalize them. It is also possible to indicate min and max values for the variable. Some algorithms need these values (an error message will be given if they are missing).

Variables can conveniantly be taken out of the optimization by using the fixed keyword in the variable initialization. All fixed variables will still be substituted in the tmpl files, but they remain at the given initial value throughout the optimization.

Syntax#

The syntax for variable initialization follows. The sub-commands will be described in the next pages of the manual.

***value \(~\,\) [ **init_from_file fname ] \(~\,\) [ **auto_init_from_file fname ] \(~\,\) [ **format fmt ] \(~\,~\,~\,\) vname1 [fixed] vini1 [min vmin1 ] [max vmax1 ] [-log|+log] \(~\,~\,~\,\)\(~\,~\,~\,\) vnameN [fixed] viniN [min vminN ] [max vmaxN ] [-log|+log]

where vname the variable name, vini its initial value (also used for scaling) (double), vmin its min value and vmax its max value. Scaling is important, particularly when the variables that are handled are of widely differing magnitudes. Without scaling, matrices used by the optimization algorithms are typically ill-conditionned. Scaling is automatically performed in Z-set using vname/vini instead of vname. It is possible to have different initial and scaling values using the *init_from_file command.

fixed

fix the value to the initial, and remove the variable from the optimization problem.

min

set the minimum allowable value for the variable.

max

set the maximum allowable value for the variable.

[-log|+log]
1this is very useful for variables which span orders of magnitude. A classical example is a creep law of the form \(A \sigma^n\) where \(A\) much change orders of magnitude in response to small changes in \(n\) for similar values of \(\sigma\). Sometimes a better approach is to re-formulate, for example with \((\sigma/K)^n\)

treat variables as being log’s of the values to be substituted in the files (the .tmpl substitutions) 1this is very useful for variables which span orders of magnitude. A classical example is a creep law of the form \(A \sigma^n\) where \(A\) much change orders of magnitude in response to small changes in \(n\) for similar values of \(\sigma\). Sometimes a better approach is to re-formulate, for example with \((\sigma/K)^n\). if +log is selected the variables ? entries in the .tmpl file will be substituted not with the variable, but instead \(e^x\). If the option -log is chosen the program will use \(-e^x\).

Note that the order in which the values are given is not the order in which they are handled (thus printed) by the optimizers. For instance, when reading the results of the evolution optimizer, care should be taken not to misinterprete the order of the variables. THE REAL ORDER is given in the “.msg” files, for instance.

Example#

***values
**auto_init_from_file levenberg.best
    C1      fixed 200. min  1.e-5 max 1.e6
    f_trans fixed 1.   min  0.3   max 1.1

    m       0.2        min  0.05  max 20.
    M       2.01       min  0.01  max 40.
    f_crit  0.85       min  0.0   max 0.95

**auto_init_from_file#

Description#

This option is used to conveniantly re-start an optimization from the last best values.

Syntax#

The syntax takes the name of an ascii file which has the format of the problem.best file. This file is written each time a trial of the function is less than the previous best value.

**auto_init_from_file file

Example#

Supposing the following values entry is given:

***values
 **auto_init_from_file levenberg.best
    K    700.           min  600.     max  5000.
    n    4.47           min  1.2      max  20.
    K2   500.           min  200.     max  5000.
    n2   35.            min  3.       max  75.
    C1   290.           min  3.0      max  800.
    D1   600.           min   5.      max  5000.

An example of the levenberg.best file is:

# best objective function : 6.050340e-01
# best values :
n 6.101396e+00
K 1.314714e+03
n2 5.967421e+01
K2 5.244540e+02
C1 3.100267e+02
D1 6.302586e+02

**init_from_file#

Description#

The option *init_from_file filename enables initiating the optimization from the point written in filename. This can be handy in some cases where one does not wish to change the .inp file. The initial values of the design variables are given as real numbers. The order is the order of the variables (cf. note above, this is the order of the .msg and .tra files). When this option is used, the syntax for the rest of the **value is unchanged. The value that follows the variable name is no longer the starting value (since the starting value is read in filename) but it is used as scaling variable. Therefore, the option *init_from_file filename permits separated initial and reference values.

**format#

Description#

The option format controls the output format of the variables declared as ?x in the .tmpl files. It can be important to output lots of decimals to reduce numerical noise (for example in order to have accurate gradient calculation).

Example#

***value A 10. min 1.
 **format %30.15e
 **init_from_file init
         b  2. min 1. max 50.
         c  9.