comment: This is an IPAT-S script. IPAT-S is an open-source scripting language for developing sustainability scenarios. It can be run using the free IPAT-S software, available from: http://ipat-s.kb-creative.net/ For more information, please contact the author of IPAT-S, Eric Kemp-Benedict (eric@kb-creative.net) :comment comment: This script demonstrates the use of random deviates in IPAT-S. The optional seed value is not used, so every time the script is run it generates a different sequence of pseudo-random numbers that have a normal (bell-curve) distribution. Five different scenarios are generated, labeled by "run1" through "run5." Because the random numbers are generated in an external library (the IPAT-S standard library), they cannot have dimensions. So, to get around the limitation of not having dimensions in external procedures, the procedure is placed inside a foreach loop. :comment baseyear 2000 scenario years 2010 to 2040 by 10 dimension scenario 'run 1' 'run 2' 'run 3' 'run 4' 'run 5' load _gauss_rand from 'IPATS_standard' as Random summvar x, xtrend summvar result{scenario} xtrend.0 = 100 chain >> gr(1.0%) -> xtrend for each scenario: call Random using x xtrend 5 :: x -> result{scenario = ?} :for report result as "Scenario Variable"