<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Ivan,<br>
    <br>
    After sending my previous post, I realized that the example sshF.awk
    script actually did not search for the report title and count lines,
    but rather just picked out the exact lines because they had unique
    patterns ( 0TOTAL, 0MAX).  Therefore, I'm attaching this time two
    other awk scripts, one that picks out the total annual heating and
    cooling energy consumptions from the SS-F report, which counts
    lines, and another that picks out the annual end-uses from the BEPS
    report, which doesn't count lines but looks for the end-use names. 
    I think those show better the "technique" that I use to extract data
    from DOE-2/eQUEST *.OUT/*.SIM files.<br>
    <br>
    To run these awk scripts, you need of course a copy of awk, of which
    there are many version freely available on the Web.  Then, to run it
    on a file, just type in a command line terminal:<br>
       <br>
        awk  -f  [awk script name]   [any options] = [option name] 
    [name of file to be processed]  >  [name of output file]<br>
    <br>
    If  "> [name of output file]"  is left off, the result will just
    appear on the monitor.  For example, If you were to run ssf.awk to
    get total annual loads,  type<br>
     <br>
        awk -f ssf.awk yourfile.SIM > yourfile.SSF<br>
    <br>
    If you want the loads normalized per square foot, type<br>
    <br>
        awk -f ssf.awk o=sf yourfile.SIM > yourfile.SSF.a<br>
    <br>
    Joe<br>
    <br>
    <pre class="moz-signature" cols="90">Joe Huang
White Box Technologies, Inc.
346 Rheem Blvd., Suite 108D
Moraga CA 94556
<a class="moz-txt-link-abbreviated" href="mailto:yjhuang@whiteboxtechnologies.com">yjhuang@whiteboxtechnologies.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.whiteboxtechnologies.com">www.whiteboxtechnologies.com</a>
(o) (925)388-0265
(c) (510)928-2683
"building energy simulations at your fingertips"
</pre>
    <br>
    On 5/22/2013 5:35 PM, Yf Sun wrote:
    <blockquote
cite="mid:CAPz2vbM+mRarcax9-07KpXpe-mqozP3WC9EDOB0KMW4RKoW2PA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Joe
        <div style=""><br>
        </div>
        <div style="">Im trying to do configuration perturbation analyse
          like you and your colleague did before, there's large amount
          of simulations to do and thats why i need to automate some
          data process, finally i got a solution from the specialist
          like you.</div>
        <div style=""><br>
        </div>
        <div style="">Thanks!</div>
        <div class="gmail_extra"><br>
          <br>
          <div class="gmail_quote">On Wed, May 22, 2013 at 11:33 PM, Joe
            Huang <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:yjhuang@whiteboxtechnologies.com"
                target="_blank">yjhuang@whiteboxtechnologies.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
              0.8ex; border-left: 1px solid rgb(204, 204, 204);
              padding-left: 1ex;">
              <div text="#000000" bgcolor="#FFFFFF">
                <div>As others have pointed out, eQUEST runs DOE-2.2
                  which outputs a text file originally renamed *.OUT in
                  DOE-2 but now renamed *.SIM in eQUEST.   As a
                  long-time DOE-2 user, I've written lots of awk scripts
                  to extract out the variables of interest from the
                  *.OUT/*.SIM files.  In fact, I only look at the
                  *.OUT/*.SIM file during the debugging phase of a
                  project, or when some results look suspicious.  <br>
                  <br>
                  I don't know how many people still use awk, but I've
                  found it absolutely indispensible in my work (no
                  exaggeration).  Basically, awk is a scripting language
                  with C-like syntax, but more contextual than formal
                  languages like C or Fortran, i.e., you don't have to
                  define variable types, set array sizes, etc. <br>
                  <br>
                  When I use awk to extract data from a *.OUT/*.SIM
                  file, I basically do a pattern search for the title of
                  the report (SS-A, SS-H, etc.), and when I find it, I
                  start counting lines.  Then, when I get to the correct
                  line number, I pull out the variables of interest,
                  which in awk are simply the strings with a blank as
                  the "field separator".  I've done this so many times
                  that it takes me only a few minutes to write an awk
                  script for what you're trying to do.   For your info,
                  I'm attaching a sample awk script that I use to pull
                  out the heating and cooling loads and peak loads from
                  an SS-H file.<br>
                  <br>
                  Awk has been around since the 1980's.  I'm sure you
                  can do the same with Ppython, Perl,  VB, etc., but
                  I've never felt the need because awk worked so well
                  for me.<br>
                  <br>
                  Joe
                  <div>
                    <div class="h5"><br>
                      <br>
                      On 5/21/2013 6:48 PM, Yf Sun wrote:<br>
                    </div>
                  </div>
                </div>
                <blockquote type="cite">
                  <div>
                    <div class="h5">
                      <div dir="ltr">Hi,dear Equesters!<br>
                        <div>Im currently doing my ph.d research using
                          equest to analyse building energy performance,
                          i found its time consuming to find the data i
                          need from sim result, as the data i need
                          almost the same for every simulation, do you
                          know a way to extract the specific text
                          data(for importing to excel) quickly by using
                          some third party program maybe?</div>
                        <div><br>
                        </div>
                        <div>-- </div>
                        <div dir="ltr">
                          <div>Best regards<br>
                          </div>
                          <div>Ivan</div>
                        </div>
                      </div>
                      <br>
                      <fieldset></fieldset>
                      <br>
                    </div>
                  </div>
                  <pre>_______________________________________________
Equest-users mailing list
<a moz-do-not-send="true" href="http://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org" target="_blank">http://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org</a>
To unsubscribe from this mailing list send  a blank message to <a moz-do-not-send="true" href="mailto:EQUEST-USERS-UNSUBSCRIBE@ONEBUILDING.ORG" target="_blank">EQUEST-USERS-UNSUBSCRIBE@ONEBUILDING.ORG</a>
</pre>
                </blockquote>
                <br>
              </div>
              <br>
              _______________________________________________<br>
              Equest-users mailing list<br>
              <a moz-do-not-send="true"
href="http://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org"
                target="_blank">http://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org</a><br>
              To unsubscribe from this mailing list send  a blank
              message to <a moz-do-not-send="true"
                href="mailto:EQUEST-USERS-UNSUBSCRIBE@ONEBUILDING.ORG">EQUEST-USERS-UNSUBSCRIBE@ONEBUILDING.ORG</a><br>
              <br>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div dir="ltr">
            <div>Best regards<br>
            </div>
            <div>孙一峰</div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>