[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EnergyPlus_Support] Re: How to properly set the random seed for stochastic processes in EMS?
- To: EnergyPlus_Support@xxxxxxxxxxxxxxx
- Subject: [EnergyPlus_Support] Re: How to properly set the random seed for stochastic processes in EMS?
- From: "Ryan_Element" <ryan_element@xxxxxxxxx>
- Date: Wed, 05 Jun 2013 22:01:40 -0000
- Delivered-to: mailing list EnergyPlus_Support@xxxxxxxxxxxxxxx
- Delivery-date: Wed, 05 Jun 2013 16:01:47 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoogroups.com; s=echoe; t=1370469704; bh=ZWUwwzCzmF6CcNQcCHdhLCyAerD3ffTzhMR+rIr9gb0=; h=Received:Received:X-Yahoo-Newman-Id:X-Sender:X-Apparently-To:X-Received:X-Received:X-Received:X-Received:X-Received:X-Received:To:Message-ID:In-Reply-To:User-Agent:X-Mailer:X-Originating-IP:X-eGroups-Msg-Info:X-Yahoo-Post-IP:From:X-Yahoo-Profile:Sender:MIME-Version:Mailing-List:Delivered-To:List-Id:Precedence:List-Unsubscribe:Date:Subject:Reply-To:X-Yahoo-Newman-Property:Content-Type:Content-Transfer-Encoding; b=1wSfMSL8wdcMY39jM14Fc/S2ZIogKQb32x3oNP1m9fDM/EpU6oDSapLZ8fPV/7bzGnZZyREEz+NP1ECsduW1eNEWhlzyNf78eMobjlo14c2V7nV8kgIdL4UkR7ajhAVWoheEWritd9AW+j/UJf2IlHhN8bWFPDZ8suk7OXYvZWc=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=echoe; d=yahoogroups.com; b=bcfuaGkWZaF4O6QdowyKxAuVsBqDkfjxniWD+En5w0CiE5DAMVeKjn+k5S7wrpDXIMPL1O1WYWBIwIYzTZGGS831yKt5FizptfLmo1xkzk4BwR/98dsrttQ8ZfyvXbEK890uqaWLTyTmiFb7M4RWkpjl/qa01uorcslXzoznQnI=;
- Envelope-to: linda@xxxxxxxxxxxxxx
- In-reply-to: <CAEHD9xcPqp-RKP+0K==Zmk1Vpum0F5MR8+h6mP+7DMfZ1U1-2A@mail.gmail.com>
- List-id: <EnergyPlus_Support.yahoogroups.com>
- List-unsubscribe: <mailto:EnergyPlus_Support-unsubscribe@yahoogroups.com>
- Mailing-list: list EnergyPlus_Support@xxxxxxxxxxxxxxx; contact EnergyPlus_Support-owner@xxxxxxxxxxxxxxx
- Reply-to: EnergyPlus_Support@xxxxxxxxxxxxxxx
- Sender: EnergyPlus_Support@xxxxxxxxxxxxxxx
- User-agent: eGroups-EW/0.82
Hi Edwin,
Thanks for your input. My issue is not with the implementation, but rather with choosing the proper range of integers. As I noted in my post, sometimes energyplus crashes when the integer is too large. Specifically, 2^31 or larger numbers cause it to crash on the machine I'm using. So the solution is to never use a seed larger than (2^31-1). Thanks to Brent for providing that answer.
Ryan
--- In EnergyPlus_Support@xxxxxxxxxxxxxxx, Edwin Lee <leeed2001@...> wrote:
>
> 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@...> 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.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/EnergyPlus_Support/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/EnergyPlus_Support/join
(Yahoo! ID required)
<*> To change settings via email:
EnergyPlus_Support-digest@xxxxxxxxxxxxxxx
EnergyPlus_Support-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
EnergyPlus_Support-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/