[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EnergyPlus_Support] How to properly set the random seed for stochastic processes in EMS?





Without having the documentation at hand, I can only offer my thoughts on an option.  You could generate those 1000 seeds separately, and set them for each of the 1000 runs.  I am assuming you are running this as a script, so you could use a command line tool such as `sed` to search and replace a string in each case, pulling from a pre-calculated base of 1000 random numbers.


On Tue, Jun 4, 2013 at 7:11 PM, Ryan_Element <ryan_element@xxxxxxxxx> wrote:
 

Greetings,

I have a working energyplus model that uses the @SeedRandom object (function) in the EnergyManagementSystem.

I understand that to ensure a repeatable sequence of numbers, the argument to the @SeedRandom field must be the same each time.

My question is, what is the proper range of numbers that I can use to specify the random seed? 0-100? 1-1,000,000? And given the proper range, will every unique integer result in a unique sequence of random numbers? I ask for two reasons

1. large numbers (e.g. 3867681373) cause something deep in energyplus to break (Energyplus Version 8.0.0), resulting in a fortran runtime language error:
--error snip--
forrtl: error (140): floating inexact
Image PC Routine Line Source

Stack trace terminated abnormally.
/Applications/EnergyPlus-8-0-0/runenergyplus: line 493: 78098 Abort trap: 6 "$ENERGYPLUS_DIR/bin/$PRG_N"
--error snip--

2. In the past (Energyplus Version 7.0.0), I noticed that very large numbers that are close to one another (e.g. 3867681373 and 3867681374) result in the same sequence of random numbers in spite of being unique integers.

The I/O reference provides this detail on the argument to @SeedRandom:
The argument is rounded to the nearest whole number and then used to set the size and values of the seed for the number generator.

Can anyone provide more information? I want to ensure that 1000 simulations get 1000 unique sequences of random numbers. And then I want to be able to repeat those 1000 simulations, and get the same results, so I need to explicitly set 1000 unique random seeds.

Cheers,
Ryan




--
Edwin Lee, PhD
Oklahoma State University



__._,_.___


Primary EnergyPlus support is found at:
http://energyplus.helpserve.com or send a message to energyplus-support@xxxxxxxx

The primary EnergyPlus web site is found at:
http://www.energyplus.gov

The group web site is:
http://groups.yahoo.com/group/EnergyPlus_Support/

Attachments are currently allowed but be mindful that not everyone has a high speed connection.  Limit attachments to small files.

EnergyPlus Documentation is searchable.  Open EPlusMainMenu.pdf under the Documentation link and press the "search" button.




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___