Sample Scripts
This page contains sample scripts for the IPAT-S scripting language.
IPAT-S is a scripting language for developing scenarios of sustainable futures.
It can be downloaded for free. It is
open source software, and can be used at no charge in personal and commercial
applications.
The scripts on this page illustrate many (but not all)
of the features of IPAT-S. For more information about the language, please see the
documentation. For more information
about sustainability and scenarios, please see the
resources page.
IPAT & ImPACT
Escaping the IPAT Form
-
Lognormal income distribution
A calculation that does not use the IPAT form. Features a lognormal income
distribution, implemented with the built-in normal distribution function.
-
Trade balance for a small open economy
Another calculation that does not use the IPAT form. Uses a textbook
version of the current account and balance of payments to look at trade-offs between
investment, domestic savings, exports and growth. Illustrates use of the IPAT-S
rate function and interpolate procedure. (Note: you must use IPAT-S
ver. 3.6 or later for this script to run properly.)
The IPAT-S Standard Library
-
Using an external library
A simple script that calls an external procedure from a dynamic link library (DLL).
-
Performing a loglet decomposition
Another example of an external procedure. A loglet decomposition represents a time series
as a sum of logistic curves. For more information on loglets see the
Loglet Lab site.
-
Generating random numbers
Yet another example of an external procedure. The IPAT-S standard library has
routines to generate pseudo-random numbers. In this script, different scenarios
show a different, random, variation around a central trend. This script also
demonstrates the foreach loop.
Linear Programming
-
Linear programming (LP) example
A script that implements an energy ladder by optimizing convenience
in a linear programming model.
-
Land-use change
Land-use change implemented via an area transition matrix (ATM). A
reference ATM is used as a goal in a linear goal program (LGP).
-
Input-Output model
An input-output (IO) model implemented using the IPAT-S linear programming
(LP) syntax. This example is explained in detail in the IPAT-S Language Reference.
Please see the documentation page.
-
Transport scenarios using an LP
As a final example of using a linear programming (LP) model, this script calculates
changes in transport mode choices by exploiting the (controversial)
constant travel time concept.
Formatted Output