Input Parameters

The model's parameters are set by TCL variables in model.tcl. The actual data structures of the model are initialised the first time the model's generate step is called. An example input set is:

# initial condition
ecolab.species {1 2}
ecolab.density {100 100} 
ecolab.create {0 0}
ecolab.repro_rate {.1 -.1}
ecolab.interaction.diag {-.0001 -1e-5}
ecolab.interaction.val {-0.001 0.001}
ecolab.interaction.row {0 1}
ecolab.interaction.col {1 0}
ecolab.migration {.1 .1}

# mutation parameters
ecolab.mutation {.01 .01}
ecolab.sp_sep .1
ecolab.repro_min -.1
ecolab.repro_max .1
ecolab.odiag_min -1e-3
ecolab.odiag_max 1e-3
ecolab.mut_max .01

Model variables define a TCL command of the same name as they appear in the C++ source. So in the Eco Lab model, the C++ object ecolab defines a set of TCL commands such as ecolab.density that can be used for setting or querying the values of ecolab's members. If an argument is specified, then that argument is used to set the variable's value, otherwise, the variable's value is returned. Array members in the model are initialised by specifying an TCL list argument to the variables name, and return TCL lists when no argument is specified. The above example starts the ecology off with a single predator and prey (based on pred-prey.tcl).