func
func is the name of a function with the following declaration:
bool func(
pState state, // array of agent state variables
int x, // X-coordinate of agent
int y, // Y-coordinate of agent
pState *nbr, // array of neighbours
int nbrCount, // size of nbr array, nbr[0..nbrCount-1]
int feaMode, // calling mode, one of feaBegin, feaContinue or feaEnd
double *var, // workspace
int varCount // size of workspace
);
The details of this function are the same as that for forEachAgent except for the addition of two extra parameters, var and varCount. var[0..varCount-1] is an array of double values (allocated by the model programmer) which are passed through the call to forEachAgentVar to the function func, providing storage space.