Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question
1

BCVTB: How to run something before the SDF director starts?

asked 2016-07-05 08:15:59 -0500

updated 2016-07-05 08:16:17 -0500

I'm thinking of parsing some stuff out of my EnergyPlus file in order to have a more flexible workflow (using Eppy), that includes filling out the typical timeStep and endTime variables that are used in all of the E+ examples that ship with the Building Control Virtual Test Bed.

How can I effectively run my script before the proper simulation integrated with E+ actually starts?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-07-05 10:23:08 -0500

updated 2016-07-05 12:22:12 -0500

I am not sure I understand your question fully but here is a "potential" answer: You could prepare your BCVTB system model (xml), manipulate your EnergyPlus input file in Python for instance, write your new idfs file and then from Python invoke the BCVTB to run your system model whenever you will want it to do so. See http://simulationresearch.lbl.gov/bcv... which describes how to invoke the BCVTB from the command line.

Hope this answers your question.

edit flag offensive delete link more

Comments

Sorry if the question isn't clear. I want to trigger IDF parsing (which I've written already) just once to pull out variables, before the actual E+ simulation starts.

I can parse out the Timestep object and the RunPeriod object to calculate the timestep and endTime used by the SDF. I'm wondering how I can trigger this before. That way if I suddenly use a timestep of 6 per hour in the IDF, I don't have to manually edit the timeStep variable to be = 10*60.

(this is an example, I do want to do more to pull variables from the IDF that I then use in my control algorithm within ptolemy).

Julien Marrec gravatar image Julien Marrec  ( 2016-07-05 10:39:21 -0500 )edit

Do you want to do all that within the BCVTB or do you want to do the parsing from a script which once done will invoke the BCVTB?

Thierry Nouidui gravatar image Thierry Nouidui  ( 2016-07-05 11:24:56 -0500 )edit

I was planning on staying inside the BCVTB.

I think I need to look into sockets and/or FMUImport or something, right now all of what I'm doing in the BCVTB is hacky at best (using Jython to check if update needed, and calling my system Python if so to generate an array for the next day, reuse the same array if not, etc). Wish I had more time to explore :)

Julien Marrec gravatar image Julien Marrec  ( 2016-07-05 11:32:30 -0500 )edit

If you want to manipulate the BCVTB input file, then my guess will be to do all your parsing from an external script. Once that script is done and the output is written, call the BCVTB with the appropriates start, end time and time step.

Thierry Nouidui gravatar image Thierry Nouidui  ( 2016-07-05 11:46:11 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2016-07-05 08:15:59 -0500

Seen: 163 times

Last updated: Jul 05 '16