Ps-i 2.4 - statistics

General description

The statistics section allows the user to specify the information Ps-i should collect during each step and log into a specified file.

Section format

Example:

statistics 
	file 		'simple.stat1.csv'
	distribution 	'activated' 	20 "applicable" "display_cache"
	sum		'identity1' 	"ind_identity1" "display_tension"
	sum		'active_agents' "true"	"true"
end

The section is composed of keyword statistics followed by a number of directives, followed by the keyword end.

The following directives are available:

file 'filename'
- has one parameters: specifies the file to log information in. Must be unique.
sum 'stat_name' "condition" "expression"
- has three parameters: name of the data entry, function that determines which agents should be sampled and function which values should be sampled for applicable agents.
probe 'stat_name' 'field' X Y "expression"
- computes value of "expression" for agent located on field 'field' at coordinates (X,Y).
distribution 'stat_name' N "condition" "expression"
- has four parameters: name of the data entry, maximum possible value of the function to sample, function that determines whether a particular agent should be used and function which values should be sampled for applicable agents
dist_sum 'stat_name' 'parent_stat' "condition" "expression"
- works like sum, except it is called N times with $1 varying from 0 to N-1. 'parent_stat' must be the name of some distribution directive specified earlier.
dist_sum_single 'stat_name' 'parent_stat' "condition" "expression"
- works like dist_sum, except it is called once with $1 set to the value of the function specified in the corresponding distribution directive module N. 'parent_stat' must be the name of some distribution directive specified earlier.
dist_probe 'stat_name' 'parent_stat' 'field_name' X Y "expression"
- called N times with $1 varying from 0 to N-1.

Related

See also About Ps-i 2.4.