/*------------------------------------------------------------------------------ SMS3 function move_ind() This function controls the movement path of an Animal though the SMS Landscape from a specified source location (currently a single square defined by its X,Y co-ords) to any square which is part of a target patch (unless the target patch number is the same as the starting patch number), at which point the animal's path is terminated. The path is also terminated if the animal moves across the landscape boundary or exceeds a specified number of steps. Path-level statistics may be written to a text file (paths.csv), controlled by the compile-time parameter WRITE_PATHS. A target patch is identified as a square whose target attribute is 10 or greater. The function has an option controlled by the KICKSTART compile-time parameter, which, when set, inflates the animal's DP by a factor of 10 at the start of its path until it has gone a distance equal to its PR beyond a target patch. This option can be used if the animal starts in a low-cost target patch, and serves to give the animal a straight-line kick-start to move clear of the starting patch. The function has been developed to run in either a VCL (screen) or console (batch) environment in CodeGear C++ Builder 2007. It may need revision for other compilers or later versions of CodeGear. In the VCL environment, the co-ordinates of individual paths may also optionally be written to text files. Author: Steve Palmer, University of Aberdeen Last updated: 1 May 2012 ------------------------------------------------------------------------------*/ #ifndef MoveIndH #define MoveIndH #include #include #include "Parameters.h" #include "Landscape.h" #include "Animal.h" #include "randomc.h" #include int move_ind( Animal*, // pointer to Animal object being moved Landscape*, // pointer to the Landscape being traversed locn, // starting location (x,y) of the Animal's movement int, // starting patch number int, // path density file number for the current landscape char*, // alphnumeric control ID (i.e. a unique identifier) int // max. no. of steps permitted (unless NOLIMIT is applied) ); void close_path_file(void); //--------------------------------------------------------------------------- #endif