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

Re: Fw: [EnergyPlus_Support] Run a lot of input files (attached files embedded)



Lee,

I should have explained things in the scripts in more detail. I hope you are
generally familiar with DOS batch commands.  In the first batch script,
doepall.bat, each line represents one call to run EnergyPlus using the
runEPmacro(.bat) script, with the following arguments being passed
sequentially as %1, %2, %3, %4, etc.  These are substituted in runEPmacro in
place of %1, %2, %3, %4, etc.  For example, the first line of  my sample
doEPall.bat is:

call runEPmacro VAV    0  04  cool  t24  t24  t24

This translates into running runEPmacro.bat with VAV=%1, 0=%2, 04=%3,
cool=%4, etc.
Starting with the 5th line, runEPmacro. says:

  echo ##set1 lec_systems %1 >> in.imf
  echo ##set1 evap_ach %2 >> in.imf
  echo ##set1 location %3 >> in.imf
  echo ##set1 cooling %4 >> in.imf
....

Substituting the arguments from doEPall, this tells EPmacro to produce a
file called in.imf that start as


##set1 lec_systems VAV
##set1 evap_ach 0
##set location 04
##set1 cooling cool
...

runEPmacro.bat then appends to in.imf a master EnergyPlus input file with
macros. This file is called in.imf because that is what EPMacro will look
for

 copy in.imf + LgOff_t24_baselineSATR13.imf in.imf
  c:\EnergyPlus\EP-Macro\EPMacro

If you have a simple in.idf file instead, i.e., a file without macros, then
there would be no change and no point in doing the macro substitutions.
Similarly, with the weather files, runEPmacro.bat picks the appropriate
weather file and copies it to in.epw, the file name needed by EnergyPlus:

 pkunzip c:\Energy~3\WEATHER\ctz%3c.zip
 rem
 move ctz%3cDO.epw in.epw
 rem
le
Here, since %3 was passed from DoEPall as 04, the selected weather file will
be ctz04c.zip.
The only wrinkle is that I keep the weather files in *.zip form to save
space, and so have to unzip the weather file before renaming it  in in.epw.
Also, I keep my weather files in the WEATHER subdirectory in the
EnergyPlus_Working directory, the 8-letter name of which in DOS  is
Energy~3.  This will vary depending on the file structure on your machine.

If you are confused by all this, I suggest you review DOS command language,
since my batch scripts are using very common DOS commands.

Joe

....
----- Original Message -----
From: "Wong, S L" <bclwong@xxxxxxxxxxxx>
To: <EnergyPlus_Support@xxxxxxxxxxxxxxx>
Sent: Tuesday, November 18, 2003 7:17 PM
Subject: Re: Fw: [EnergyPlus_Support] Run a lot of input files (attached
files embedded)


> Joe,
>
> Thanks for your files!  I don't know what the meanings of the following
> statements in the doepall.bat and
> runEPMacro.bat files.
>
> doepall.bat
> rem ----- CTZ04 Sunnyvale
>      call runEPmacro VAV    0  04  cool  t24  t24 t24
> rem call runEPmacro VAV    0  04 none none none
> rem call runEPmacro Evap1  4  04  cool  t24  t24 t24
> rem call runEPmacro Evap1  8  04  cool  t24  t24 t24
> rem call runEPmacro Evap1 12  04  cool  t24  t24 t24
> rem call runEPmacro Evap2  4  04  cool  t24  t24 t24
> rem call runEPmacro Evap2  8  04  cool  t24  t24 t24
> rem call runEPmacro Evap2 12  04  cool  t24  t24 t24
>
> runEPMacro.bat
> echo ##set1 lec_systems %1 >> in.imf
> echo ##set1 evap_ach %2 >> in.imf
> echo ##set1 location %3 >> in.imf
> echo ##set1 cooling %4 >> in.imf
> echo ##set1 people %5 >> in.imf
> echo ##set1 lights %6 >> in.imf
> echo ##set1 equip %7 >> in.imf
> copy in.imf + LgOff_t24_baselineSATR13.imf in.imf
> c:\EnergyPlus\EP-Macro\EPMacro
>
> Can I use in.idf instead of in.imf in the file?
>
> Thanks a lot!
>
> lee
>
> At 01:23 PM 11/18/2003 -0800, you wrote:
> >I guess EnergyPlus_Support does not accept attached files, so I've
attached
> >them manually to the end of this e-mail.
> >
> >Joe
> >----- Original Message -----
> >From: "Joe Huang" <YJHuang@xxxxxxx>
> >To: <EnergyPlus_Support@xxxxxxxxxxxxxxx>
> >Sent: Tuesday, November 18, 2003 1:19 PM
> >Subject: Re: [EnergyPlus_Support] Run a lot of input files
> >
> >
> > > I have written some simple batch procedures to run EnergyPlus
repetitively
> > > using a two-step process that utilizes EPMacro to preprocess a master
> >input
> > > file containing macros.
> > >
> > > (1) doepall.bat passes to runepmacro.bat the arguments for the macro
> > > definitions for each simulation.
> > >
> > > (2) runepmacro.bat echos the macro arguments as ##set1's to the
in.imf,
> >and
> > > then adds the master input file (here called
> >LgOff_t24_baselineSATR13e.imf)
> > > containing macros. This file is then run through epmacro and then
through
> > > EnergyPlus itself.  There are some postprocessing procedures
afterwards
> > > using the "awk"  programming language, but those are incidental to the
> >whole
> > > procedure.
> > >
> > > Both doeplus.bat and runepmacro.bat are attached.
> > >
> > > Joe Huang
> > >
> > > ----- Original Message -----
> > > From: "leeslwong" <bclwong@xxxxxxxxxxxx>
> > > To: <EnergyPlus_Support@xxxxxxxxxxxxxxx>
> > > Sent: Monday, November 17, 2003 10:16 PM
> > > Subject: [EnergyPlus_Support] Run a lot of input files
> > >
> > >
> > > > Dears,
> > > >
> > > > I wonder if someone can give me an example file of runeplus.bat for
> > > > running a lot of numbers of input files for e+ simulation at the
same
> > > > time? And what is the procedures to use it and run it?
> > > >
> > > > Thanks
> > > >
> > > > lee
> > > >
> >
> >doepall.bat
> >-------------
> >rem                 lec evap ctz systm
> >rem                 typ  ach wth contrl peop lites eqp
> >rem --------------------------------------------
> >rem ----- CTZ04 Sunnyvale
> >     call runEPmacro VAV    0  04  cool  t24  t24  t24
> >rem call runEPmacro VAV    0  04 none none none
> >rem call runEPmacro Evap1  4  04  cool  t24  t24  t24
> >rem call runEPmacro Evap1  8  04  cool  t24  t24  t24
> >rem call runEPmacro Evap1 12  04  cool  t24  t24  t24
> >rem call runEPmacro Evap2  4  04  cool  t24  t24  t24
> >rem call runEPmacro Evap2  8  04  cool  t24  t24  t24
> >rem call runEPmacro Evap2 12  04  cool  t24  t24  t24
> >rem ----- CTZ07 San Diego
> >rem call runEPmacro VAV    0  07  cool  t24  t24  t24
> >rem call runEPmacro Evap1  4  07  cool  t24  t24  t24
> >rem call runEPmacro Evap1  8  07  cool  t24  t24  t24
> >rem call runEPmacro Evap1 12  07  cool  t24  t24  t24
> >rem call runEPmacro Evap2  4  07  cool  t24  t24  t24
> >rem call runEPmacro Evap2  8  07  cool  t24  t24  t24
> >rem call runEPmacro Evap2 12  07  cool  t24  t24  t24
> >rem ----- CTZ09 Pasadena
> >rem call runEPmacro VAV    0  09  cool  t24  t24  t24
> >rem call runEPmacro Evap1  4  09  cool  t24  t24  t24
> >rem call runEPmacro Evap1  8  09  cool  t24  t24  t24
> >rem call runEPmacro Evap1 12  09  cool  t24  t24  t24
> >rem call runEPmacro Evap2  4  09  cool  t24  t24  t24
> >rem call runEPmacro Evap2  8  09  cool  t24  t24  t24
> >rem call runEPmacro Evap2 12  09  cool  t24  t24  t24
> >rem ----- CTZ12 Sacramento
> >rem call runEPmacro VAV    0  12  cool  t24  t24  t24
> >rem call runEPmacro Evap1  4  12  cool  t24  t24  t24
> >rem call runEPmacro Evap1  8  12  cool  t24  t24  t24
> >rem call runEPmacro Evap1 12  12  cool  t24  t24  t24
> >rem call runEPmacro Evap2  4  12  cool  t24  t24  t24
> >rem call runEPmacro Evap2  8  12  cool  t24  t24  t24
> >rem call runEPmacro Evap2 12  12  cool  t24  t24  t24
> >
> >runEPMacro.bat
> >------------------
> >echo !- ******* begin of "macro&runcontrol.inc" include file ****** >
in.imf
> >echo !-  ======= LEC Parametric variables ====== >> in.imf
> >echo !- For now, lets put all the parametric run variable in this top
> >section >> in.imf
> >echo ##set1 lec_systems %1 >> in.imf
> >echo ##set1 evap_ach %2 >> in.imf
> >echo ##set1 location %3 >> in.imf
> >echo ##set1 cooling %4 >> in.imf
> >echo ##set1 people %5 >> in.imf
> >echo ##set1 lights %6 >> in.imf
> >echo ##set1 equip %7 >> in.imf
> >copy in.imf + LgOff_t24_baselineSATR13.imf in.imf
> >c:\EnergyPlus\EP-Macro\EPMacro
> >rem
> >rem  clean up from EP-Macro
> >rem
> >rem pause
> >erase in.imf
> >erase audit.out
> >copy out.idf %1.%2ach.ctz%3.idf
> >copy out.idf in.idf
> >erase out.idf
> >rem
> >echo ===== running EnergyPlus with LgOff_t24_baselineSATR13 with %1 and
> >ctz%3c weather =====
> >copy c:\EnergyPlus_Working\DATA\"Energy+03_0911.idd"  "Energy+.idd"
> >pkunzip c:\Energy~3\WEATHER\ctz%3c.zip
> >rem
> >move ctz%3cDO.epw in.epw
> >rem
> >c:\EnergyPlus_Working\Executables\EnergyPlus03_0911
> >rem
> >c:\EnergyPlus\Release\PostProcess\ReadVarsESO
> >awk -f UTIL\readhrly.awk eplusout.csv > OUTPUTS\%1.%2ach.ctz%3.hrl
> >erase HEAD.1
> >erase HEAD.2
> >rem
> >move audit.out OUTPUTS\%1.%2ach.ctz%3.audit
> >move eplusout.err OUTPUTS\%1.%2ach.ctz%3.err
> >move eplusout.end OUTPUTS\%1.%2ach.ctz%3.end
> >move eplusout.eio OUTPUTS\%1.%2ach.ctz%3.eio
> >move eplusout.eso OUTPUTS\%1.%2ach.ctz%3.eso
> >move eplusout.bnd OUTPUTS\%1.%2ach.ctz%3.bnd
> >move eplusout.mtd OUTPUTS\%1.%2ach.ctz%3.mtd
> >move eplusout.mtr OUTPUTS\%1.%2ach.ctz%3.mtr
> >move eplusout.dxf OUTPUTS\%1.%2ach.ctz%3.dxf
> >move eplusout.audit OUTPUTS\%1.%2ach.ctz%3.audit
> >move eplusout.zsz OUTPUTS\%1.%2ach.ctz%3.zsx
> >move eplusout.rdd OUTPUTS\%1.%2ach.ctz%3.rdd
> >move eplusout.ssz OUTPUTS\%1.%2ach.ctz%3.ssz
> >move eplusout.csv OUTPUTS\%1.%2ach.ctz%3.csv
> >move eplusout.cif OUTPUTS\%1.%2ach.ctz%3.cif
> >erase eplusout.dbg
> >del in.idf >nul
> >del in.epw >nul
> >del "Energy+.idd" >nul
> >del "Energy+.ini" >nul
> >echo ===== EnergyPlus with LgOff_t24_baselineSATR13 with %1 and ctz%3c
> >weather completed =====
> >:end
> >
> >
> >Yahoo! Groups Sponsor
> >ADVERTISEMENT
>
><http://rd.yahoo.com/SIG=12cqdnl9i/M=267637.4116730.5333196.1261774/D=egrou
pweb/S=1705007389:HM/EXP=1069276937/A=1853618/R=0/*http://www.netflix.com/De
fault?mqso=60178338&partid=4116730>4ad527.jpg
> >4ad5c8.jpg
> >
> >To unsubscribe from this group, send an email to:
> >EnergyPlus_Support-unsubscribe@xxxxxxxxxxxxxxx
> >
> >The primary EnergyPlus web site is found at:
> ><http://www.energyplus.gov>http://www.energyplus.gov
> >
> >The group web site is:
>
><http://groups.yahoo.com/group/EnergyPlus_Support/>http://groups.yahoo.com/
group/EnergyPlus_Support/
> >
> >Attachments are not allowed -- please post any files to the appropriate
> >folder in the Files are of the Support Web Site.
> >
> >
> >
> >
> >
> >
> >Your use of Yahoo! Groups is subject to the
> ><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
>
>   ----------
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> To unsubscribe from this group, send an email to:
> EnergyPlus_Support-unsubscribe@xxxxxxxxxxxxxxx
>
> 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 not allowed -- please post any files to the appropriate
folder in the Files are of the Support Web Site.
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/dkFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
EnergyPlus_Support-unsubscribe@xxxxxxxxxxxxxxx

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 not allowed -- please post any files to the appropriate folder in the Files are of the Support Web Site.




 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/