Option List is the
element for defining agent attributes that have limited choice of
alternative options, e.g.:
For example, you can define the sex agent attribute as a Sex option list with the following elements: Male, Female.
To create an option
In the project tree, option lists appear on the upper level, grouped in the Option Lists branch.
Having defined the option list, you can choose this list as the agent parameter's type.
Now you can assign values (Male or Female) to the sex agent's parameter.
To set a default value, specify an option list's value in the parameter's Default value field, e.g: Male.
To change the value at the model runtime, type sex = Female;
If you need to assign values for the whole agent population, you may do it e.g. in the top level agent's Startup code.
For example, you have the option list named Gender. To randomly select one option from this option list, use one of the following functions: