10 Parameter File
The parameter file is used to specify the initial values for the switches that are to be used in the Gadget model (see What Does The # Mean?, section 2.2). This file is specified by a “-i \(<\)filename\(>\)” command line option when Gadget is started, for example, this would take the parameter information from a file called “inputfile.txt”:
gadget -s -i inputfile.txt
This file contains a list of all the switches, their initial value, the lower and upper bounds and a flag to note whether the optimiser should optimise that switch or not. The first line of this file must contain the column headings, and then subsequent lines should list all switches that are used. An example of this file format is shown below:
switch value lower upper optimise
<name> <value> <lower> <upper> <0 or 1> ; 1 to optimise this parameter
Note that if Gadget is performing a simulation run, then the “optimise” column is still required, although the value of the optimise flag will have no affect on the outcome of the simulation.
In some cases an initial value for a parameter is not known, or a random starting point is wanted (for example, to ensure that the value of the starting point has little affect on the outcome of the optimisation). This is done by specifying the keyword “random” instead of an initial value, which will ensure that Gadget will set the initial value for that parameter to a random point within the bounds. This is shown in the example below, where the initial value for the parameter “age2” will be set to a random point between 1 and 10:
age2 random 1 10 1 ; random value between 1 and 10