SLEUTH Automation

This project aims to ease the running of the SLEUTH urban growth model mostly by automating the creation of scenario files and by a convenient object oriented interface that will do the necessary system calls, including the use of MPI for multi-core parallel execution and HT-Condor for distributed multi-host execution.

This software has been tested with Open MPI 1.6.5 and HT-Condor 8.4.6.

It is distributed through pypi, a public repo is available at GitHub.

Installation

Install it using pip, perhaps within a virtualenv. Like so:

pip install sleuth_automation

It should install all python library requirements.

Other dependencies

GDAL. This library is used to convert GIF to TIFF. Its executables are expected to be in the PATH.

orpheus. This library is used to stich together the output GIFs.

Simplified Command Line Interface

The full pipeline can be run by supplied script. Run thusly:

sleuth_run.py [-h] --sleuth_path SLEUTH_PATH
                   --location_dir LOCATION_DIR
                   --location_name LOCATION_NAME
                   --predict_end PREDICT_END
                   [--mpi_cores MPI_CORES]
                   [--montecarlo_iterations MONTECARLO_ITERATIONS]

Arguments:

-h, --help show this help message and exit
--sleuth_path SLEUTH_PATH
 path to SLEUTH directory
--location_dir LOCATION_DIR
 path to location directory
--location_name LOCATION_NAME
 name of location
--mpi_cores MPI_CORES
 number of cores available for MPI, if 0 (default) don’t use MPI
--predict_end PREDICT_END
 ending year of prediction interval
--montecarlo_iterations MONTECARLO_ITERATIONS
 monte carlo iterations

Batch running of SLEUTH

A script is included that will create a HT-Condor submit file.

Usage:

create_sleuth_condor_batch.py [-h] --sleuth_path SLEUTH_PATH
                                   --locations_dir LOCATIONS_DIR
                                   --predict_end PREDICT_END
                                   [--mpi_cores MPI_CORES]
                                   [--montecarlo_iterations MONTECARLO_ITERATIONS]

Arguments:

-h, --help show this help message and exit
--sleuth_path SLEUTH_PATH
 path to SLEUTH directory
--locations_dir LOCATIONS_DIR
 path to regions dir
--mpi_cores MPI_CORES
 number of cores available for MPI, if 0 (default) don’t use mpi
--predict_end PREDICT_END
 ending year of prediction interval
--montecarlo_iterations MONTECARLO_ITERATIONS
 monte carlo iterations

Running this script will create a submit.condor file in the supplied LOCATIONS_DIR, with proper invocations of the sleuth_run.py script.

This file can then be submited for execution:

$ cd LOCATIONS_DIR
$ condor_submit submit.condor

Python interface to SLEUTH

The Location class

ControlStats module

ConstrolStats class

Indices and tables