Agent-Based Building Simulation

#1

Dear forum,

I’d like to share something that I have been researching lately, namely running agent-based building simulations, which has some potentially interesting applications:

  • Analyzing the effects of occupant behaviour on micro-climates (e.g., by operating windows, fans, shading elements, etc.), based on field study data
  • Testing custom control mechanisms for HVAC systems
  • Evaluating climate-responsive kinetic facades
  • Investigating custom forms of building operation

Computing this effectively is facilitated by co-simulation, i.e. being able to stop the simulation at each time step, exchange some data with Grasshopper to compute some response (e.g. an occupant opening a window), which then affects the simulation parameters in the next EnergyPlus time step. As far as I know, this is currently not implemented in Honeybee; agent-based modelling has previously been discussed here, but doesn’t seem to have led to any specific application yet, at least not one that was shared. I’m hoping that my post might revive the subject and spark some interest.

At first, I tried implementing this using the EnergyManagementSystem, which is a function within EnergyPlus that allows you to enter custom code (e.g., through the additionalStrings input on HB’s
runEnergySimulation component). Since this is really tricky for more complex setups, I have found another workflow that has worked better for me. Unfortunately it is a bit elaborate and currently involves using MATLAB and Ptolemy II:

Here are some tests I have run so far. Window opening behaviour based on a statistical model from field study data:

Same as above, this time showing the amount of solar radiation on the facade:

A simulation of “adaptive occupancy”. In this case of a school building, a virtual environmental sensor network determines at each lesson which are the currently most comfortable classrooms, and shifts classes accordingly. You can see how the presence of classes (the black dots) increases the room temperature; by having spatial redundancies in the building, the algorithm can shift the occupants in space in order to mitigate overheating:

I’m interested to find out if anyone else has been working on similar things. Would be great to exchange ideas! Happy to share some files if anyone is interested.

Cheers,
Max

3 Likes
Matlab - Grasshopper Interaction (Advanced)
#2

Dear @MaxMarschall

Nice Topic!

I am also trying to model user-centric kinetic shading systems, which seems most of the simulators need huge adjustments if they are planning to cover this issue. For now I am working with EMS as you mentioned, however, it does not give me what I am looking for completely, but I found it really useful, and I am attempting to find a bypass for my case.

Do you have any idea what PTOLEMY or BCVTB can do that EMS cannot in terms of controlling?

Can you suggest any references to learn more about the workflow you mentioned?

Regards
Amir

#3

Hi @AMIRTABADKANI,

For me it’s mainly a matter of convenience. My first example was actually done in EMS, but I found that the scripts tend to get convoluted and confusing very quickly. I found it hard to automate the creation of IDF strings, especially when simulating larger setups with many zones. Computing the responses visually (using the familiar GH interface) seems much more intuitive and clear. No need to know EMS syntax, instead you can use GH components or GHPython which I much prefer. Also, some responses might require more advanced Python or RhinoCommon functions, which you can’t do in pure EMS. In the last example I used a Shortest Path Algorithm and the Hungarian Algorithm to assign classrooms more efficiently - that would have been a nightmare to implement in EMS.

Can you share anything about the shading system you’re planning? I’ve been meaning to look into kinetic facades, would be interesting to see what you are doing!

In terms of learning references, I followed this thread by Mostafa to link GH & MATLAB. Ptolemy II has a primer somewhere that is not very helpful…instead I just went through the BCVTB documentation. Admittedly a rather painstaking process until I got it right, and debugging is quite challenging but maybe it just takes some practice. You should definitely start with one of the example files that come with the BCVTB installation and edit it to fit your purposes. I might be able to share some files if that helps.

Apart from BCVTB, there is also another system called obFMU but I’m not sure if it has any advantages.

Cheers,
Max

#4

You re definitely right about this…

I still did not reach any clear conclusion, I am working on a similar prototype of my patent and paper that I shared here before, but in a more complicated way…This time-step-based approach is really tricky, because in case of using indoor sensors there are many current limitations that E+ suffers … like daylight/glare metrics…

My working scale is not a huge one , I am working to find a method to link occupant-behavioral patterns on shading system from different perspectives of thermal and visual comfort,

I ll check your method as well… and will be happy to share anything with you …

Cheers
Amir

#5

@AMIRTABADKANI, congrats on the publication!
When you say you want to link occupant-behavioural patterns, are you using statistical models to predict when an occupant opens & closes the blinds or shading system?

#6

@MaxMarschall
Most probably no, I am thinking of real-time controlling for each time step for each occupant in a shared work environment…