[Equest-users] eQuest & NoteTab Question

David Reddy david at 360-analytics.com
Thu Sep 10 08:55:41 PDT 2015


We typically use RegExs for tasks like this as well, but I had not run 
across the Regular Expressions 101 <https://regex101.com/> site before; 
what a great resource Julien!  Very cool way to keep track of 
expressions and share. Thanks for circulating these examples!
David

On 9/10/2015 12:26 AM, Julien Marrec wrote:
> Jesse,
>
> I've created an example here : https://regex101.com/r/iZ5jO8/1. This 
> should really help understanding how I'm getting the result, by 
> decomposing each step of the regex.
>
> Note that I added names to capturing groups, you don't have to do 
> that, you could use just positional:
>
> Look for: (SYSTEM *\n *?TYPE *= )HP(.*?FURNACE-HIR +?= 
> [.0-9]+)\n(.*?\.\.\n)(\".*?\")
>
> Replace with: \1PSZ\2\n   CONTROL-ZONE     = \4\n\3\4
>
> A few things: dot (.) has to match newline characters for it to work.
> Also, in notepad++ to replace with named capturing groups, you use 
> $+{Name}
> You have to replace \n (unix convention) by \r\n.
>
>
> Anyways, for notepad++ try:
>
> Search:
> (?<System1>SYSTEM *\r\n *?TYPE *= )HP(?<System2>.*?FURNACE-HIR +?= 
> [.0-9]+)\r\n(?<System3>.*?\.\.\r
> \n)(?<ZoneName>\".*?\")
>
> Replace with:
> $+{System1}PSZ$+{System2}\n   CONTROL-ZONE     = 
> $+{ZoneName}\n$+{System3}$+{ZoneName}
>
>
>
> I've loaded it up in eQuest, seems to do the job just fine. Let me 
> know if you are trouble implementing. I've also attached the file 
> back, but I'd be a shame to not take this as an opportunity to learn regex
>
> PS: By the way, you should really use floor multipliers.
>
> Best,
> Julien
>
>
> --
> Julien Marrec, EBCP, BPI MFBA
> Energy&Sustainability Engineer
> T: +33 6 95 14 42 13
>
> LinkedIn (en) : www.linkedin.com/in/julienmarrec 
> <http://www.linkedin.com/in/julienmarrec>
> LinkedIn (fr) : www.linkedin.com/in/julienmarrec/fr 
> <http://www.linkedin.com/in/julienmarrec/fr>
>
> 2015-09-09 22:32 GMT+02:00 Phillips, Jesse <jphillips at rdkengineers.com 
> <mailto:jphillips at rdkengineers.com>>:
>
>     Thanks Julien.
>
>     I’ve attached the inp file.  I am not familiar with Regex at all
>     but I’ll check out that website.  If you could send me some
>     examples tomorrow though, that would be great!
>
>     thanks,
>
>     Jesse
>
>     *From:*Julien Marrec [mailto:julien.marrec at gmail.com
>     <mailto:julien.marrec at gmail.com>]
>     *Sent:* Wednesday, September 09, 2015 4:27 PM
>     *To:* Phillips, Jesse <jphillips at RDKEngineers.com>
>     *Cc:* Nathan Miller <nathanm at rushingco.com
>     <mailto:nathanm at rushingco.com>>;
>     equest-users at lists.onebuilding.org
>     <mailto:equest-users at lists.onebuilding.org>
>     *Subject:* Re: [Equest-users] eQuest & NoteTab Question
>
>     Hi,
>
>     I don't know Notetab, but as long as you have one system for each
>     zone, this is pretty easy if your editor supports Regular
>     Expressions (Regex).
>
>     As you might know, inp files has what I call a positional input
>     for a few things (space > surface > window/door, same for system >
>     zone). Meaning if you find something that is a system, everything
>     that's right after (which are zones) below to this system until
>     you find another system. As opposed to having a keyword linking
>     those two objects.
>
>     So you could use a regex for this job. Especially using positive
>     lookaheads to delimit a single system and its zone (singular here,
>     could be plural).
>
>     If you do have only a single zone per system, it's even easier.
>
>     Just look for a system and it's zone below it.
>
>     If you are not familiar with regex and can't manage to build it,
>     let me know, I'll try to find a few tomorrow to help you out (send
>     me your file or an extract or it so I don't have to create a dummy
>     one to play with it).
>
>     By the way, here's a website I wish existed when I first started
>     playing with regex: https://regex101.com/. Fyi, Notepad++ uses the
>     prce engine.
>
>     Cheers,
>
>     Julien
>
>
>     --
>     Julien Marrec, EBCP, BPI MFBA
>     Energy&Sustainability Engineer
>     T: +33 6 95 14 42 13 <tel:%2B33%206%2095%2014%2042%2013>
>
>     LinkedIn (en) : www.linkedin.com/in/julienmarrec
>     <http://www.linkedin.com/in/julienmarrec>
>     LinkedIn (fr) : www.linkedin.com/in/julienmarrec/fr
>     <http://www.linkedin.com/in/julienmarrec/fr>
>
>     2015-09-09 22:04 GMT+02:00 Phillips, Jesse
>     <jphillips at rdkengineers.com <mailto:jphillips at rdkengineers.com>>:
>
>         I don’t think you can create macros in NoteTab. What would
>         that macro look like in boxer?
>
>         Jesse Phillips
>
>         Energy Engineer
>
>         RDK Engineers
>
>         P: 857-221-5957
>
>         *From:* Nathan Miller [mailto:nathanm at rushingco.com
>         <mailto:nathanm at rushingco.com>]
>         *Sent:* Wednesday, September 09, 2015 3:38 PM
>         *To:* Phillips, Jesse <jphillips at RDKEngineers.com
>         <mailto:jphillips at RDKEngineers.com>>;
>         equest-users at lists.onebuilding.org
>         <mailto:equest-users at lists.onebuilding.org>
>         *Subject:* RE: eQuest & NoteTab Question
>
>         Can you create a macro that searches for each instance of
>         “=ZONE”, copies the text before the “=” to get the zone name,
>         and the pastes in the lines necessary to create a new single
>         zone system, using the zone name now stored in the clip-board
>         to paste in the control zone?
>
>         I’m not familiar with NoteTab, but you can do that in boxer.
>
>         **
>
>         *Nathan Miller, PE, LEED AP BD+C**– */Mechanical
>         Engineer/Senior Energy Analyst/
>
>         *RUSHING*| *D*206-788-4577 |*O*206-285-7100
>
>         *www.rushingco.com <http://www.rushingco.com/>*
>
>         *From:* Equest-users
>         [mailto:equest-users-bounces at lists.onebuilding.org] *On Behalf
>         Of *Phillips, Jesse
>         *Sent:* Wednesday, September 09, 2015 3:23 PM
>         *To:* equest-users at lists.onebuilding.org
>         <mailto:equest-users at lists.onebuilding.org>
>         *Subject:* [Equest-users] eQuest & NoteTab Question
>
>         Hi,
>
>         I have a model with 233 zones.  Right now, every zone has a
>         water loop heat pump.  I want to convert these all to packaged
>         single zone systems.  To do this, I am working in the .inp
>         file and doing a “find and replace” in NoteTab.  The replacing
>         of the system type is easy.  I simply search for the
>         “type      = HP” line and replace with “type     = PSZ”.
>         However, the PSZ system requires a control zone.  I would like
>         each control zone to be the zone in which that particular
>         system resides. Which means, for each of my 233 zones, I will
>         have a different control zone (i.e. no longer a simple find
>         and replace search).
>
>         Does anyone know of a way to use “find and replace” (or
>         another method) to set each control zone with the zone name
>         which the system resides?
>
>         This is what the .inp file should look like for a packaged
>         single zone system:
>
>         "EL1 Sys1 (PTAC) (G.SSW1)" = SYSTEM
>
>            TYPE             = PSZ
>
>         HEAT-SOURCE      = HEAT-PUMP
>
>         ZONE-HEAT-SOURCE = NONE
>
>         SIZING-RATIO     = 1
>
>         COOL-SIZING-RATI = 1
>
>         MIN-SUPPLY-T     = 58
>
>         FAN-SCHEDULE     = "S1 Sys1 (PTAC) Fan Sch"
>
>         CW-LOOP          = "DEFAULT-CW"
>
>         COOLING-CAPACITY = 15752
>
>         COOL-SH-CAP      = 11839
>
>         HP-SUPP-SOURCE   = NONE
>
>         FURNACE-HIR      = 1.24067
>
>         CONTROL-ZONE = "EL1 SSW Perim Zn (G.SSW1)"
>
>         C-EER95          = 8.24
>
>         C-COP47          = 0.78
>
>         C-AFUE           = 0.78
>
>         C-SF-MTR-TYPE    = 1
>
>         C-RF-MTR-TYPE    = 1
>
>         C-OSA-DMPR-CTRL  = 1
>
>         C-HTG-DUCT-LOCN  = *Ceiling Plenum*
>
>         C-HTG-DUCT-RVAL  = 7
>
>         C-CLG-DUCT-LOCN  = *Ceiling Plenum*
>
>         C-CLG-DUCT-RVAL  = 7
>
>         C-CLG-CAP-CATEG  = 14
>
>         For my next system, everything would be exactly the same
>         except the highlighted lines (and so on for all 233 systems):
>
>         "EL1 Sys1 (PTAC) (G.W2)" = SYSTEM
>
>            TYPE = PSZ
>
>         HEAT-SOURCE      = HEAT-PUMP
>
>         ZONE-HEAT-SOURCE = NONE
>
>         SIZING-RATIO     = 1
>
>         COOL-SIZING-RATI = 1
>
>         MIN-SUPPLY-T     = 58
>
>         FAN-SCHEDULE     = "S1 Sys1 (PTAC) Fan Sch"
>
>         CW-LOOP          = "DEFAULT-CW"
>
>         COOLING-CAPACITY = 15752
>
>         COOL-SH-CAP      = 11839
>
>         HP-SUPP-SOURCE   = NONE
>
>         FURNACE-HIR      = 1.24067
>
>         CONTROL-ZONE = "EL1 Sys1 (PTAC) (G.W2)"
>
>         C-EER95          = 8.24
>
>         C-COP47          = 0.78
>
>         C-AFUE           = 0.78
>
>         C-SF-MTR-TYPE    = 1
>
>         C-RF-MTR-TYPE    = 1
>
>         C-OSA-DMPR-CTRL  = 1
>
>         C-HTG-DUCT-LOCN  = *Ceiling Plenum*
>
>         C-HTG-DUCT-RVAL  = 7
>
>         C-CLG-DUCT-LOCN  = *Ceiling Plenum*
>
>         C-CLG-DUCT-RVAL  = 7
>
>         C-CLG-CAP-CATEG  = 14
>
>         thank you,
>
>         Jesse Phillips | Energy Engineer
>
>
>         _______________________________________________
>         Equest-users mailing list
>         http://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org
>         To unsubscribe from this mailing list send a blank message to
>         EQUEST-USERS-UNSUBSCRIBE at ONEBUILDING.ORG
>         <mailto:EQUEST-USERS-UNSUBSCRIBE at ONEBUILDING.ORG>
>
>
>
>
>
>
> _______________________________________________
> Equest-users mailing list
> http://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org
> To unsubscribe from this mailing list send  a blank message to EQUEST-USERS-UNSUBSCRIBE at ONEBUILDING.ORG

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20150910/ab837c22/attachment-0005.htm>


More information about the Equest-users mailing list