Grasshopper

algorithmic modeling for Rhino

Hello everyone!

I am currently thinking of Agent Based Models (ABM) for building assessment, specifically to understand how behavioural patterns affect building performance and vice versa.

The way I see it, and I could be wrong, to some extend these types of analyses are already included in E+ (and HB) in the sense that we can assign schedules of certain building components and systems (e.g. shading, windows aka n.v., thermostats, etc.) according to other independent variables (mainly outdoor temperature and irradiance) that we attribute to imaginary agents.

However, this mostly represents analyses using external (to the model itself) data, and not internally calculated outputs, which are essential for assessing occupant behaviour (e.g. open window when outdoor temperature is lower than..). Thankfully, HB already includes an array of advanced components able to calculate these parameters, especially comfort parameters and daylighting.

Does that mean that we could potentially use that information as input to agents that would populate the space of our model? I am thinking here in the same terms as a wind driven rain simulation workflow would work, where first a CFD study would analyse the wind velocity for every point of the mesh and the droplets would then be dropped in that  mesh and their probabilities of their routes would be calculated. In the same way I would imagine we can calculate probabilities of occupant actions in 'points in time', where occupants would change their environments given the results of the simulation. This isn't really real-time but it is still a start and it is a quite good approximation of the nowadays-popular, low-control, mechanically ventilated buildings.

Now, I believe that I could model these type of agents, and their parameters, rules, probabilities, etc. If so, how interesting and especially how difficult would it be to create the component that would take the results of the simulation for a space as inputs for these agents?

I know the above is not totally clear but bare with me as this is shaped along your comments and ideas.

(an example for inspiration from 2011, agent based model architecture: https://vimeo.com/18967658)

Kind regards,

Theodore.

Views: 1001

Replies are closed for this discussion.

Replies to This Discussion

Theodore,

I had meant to respond to this sooner and I think that this statement is very relevant and well-timed. My one point of feedback is to be mindful of the tendency to incorporate new technologies and ideas (in this case agent-based modelling) simply because they are the new cool thing to do and, if we think carefully about how the integration of agent-based modeling will improve the accuracy and usefulness of our models, we are more likely to make lasting contributions through their integration. 

For example, it seems vital to me that such agent-based models be grounded in some clear quantifiable observations of human behavior in real buildings as opposed to relying on our own coefficients to represent how valuable we think certain things are to the occupants.  I will give an example of two agent-based ideas that I have had - one of which has turned out to seem much more valuable in the long-run because of it's grounding in real-world data and I plan to implement soon.

To start with the more valuable example, ever since I read this awesome book on adaptive thermal comfort (https://books.google.com/books?id=vE7FBQAAQBAJ&printsec=frontco...), I have had several ideas for how to integrate the findings of recent comfort surveys into our energy models.  Generally, the focus of thermal comfort research seems to be shifting from theoretical human energy balance calculations to surveys of occupant behavior, giving us a lot of great data that helps incorporate these behavioral factors in our energy models.  To continue one of the ideas that you mention, Theodore, here is a plot from the book that describes the window-opening behavior of occupants as the indoor temperature increases:

Currently, EnergyPlus does not easily allow you to set such a function for window-opening, as you point out but the incorporation of this behavior seems necessary to produce an accurate model of a naturally ventilated building (since opening all of the windows as soon as the indoor temperature hits 21 C is far from realistic).  To get around this, I was thinking of including an option on the nat vent component that will put in a series of IF/THEN nat vent objects that approximate this smooth function through a step function:

IF 19 < indoor temperature < 20 THEN WindowOpening = 10%

IF 20 < indoor temperature < 21 THEN WindowOpening = 15%

IF 21 < indoor temperature < 22 THEN WindowOpening = 21%

IF 22 < indoor temperature < 23 THEN WindowOpening = 35%

...

I am hoping to implement this soon.

To describe the example that I have realized was not so helpful with time, when I was first drafting the idea for high-resolution comfort maps (https://www.youtube.com/playlist?list=PLruLh1AdY-Sj3ehUTSfKa1IHPSiu...), I originally thought that I would develop computer models an animations of occupants moving around the thermally diverse space to make themselves more comfortable.  Once I started to get into this, however, I realized that the social characteristics of a space usually have a much larger impact on where people place themselves than the thermal characteristics and it is not until the thermal characteristics become very uncomfortable or the presence of other people is completely removed that the thermal environment dominates the movement behavior. Thus, in order to model the occupant behavior, I would have to code in the relative importance of a large number of these social characteristics in relation to thermal comfort, which would have been a process of me simply making up coefficients to produce cool-looking but somewhat meaningless animations.  It is only when my nicely-designed thermal environments were aligned with the social/programmatic characteristics of the space that I could argue that I was justifiably adding value since the thermal characteristics were not in contradiction to or being weighted against the social ones.  So, in the end, realized that all I needed in order to produce a good design was to align the thermal environment with the placing of program and the agent-based modelling would not have enabled the production of a much better design.  This is the reason why the human silhouettes are manually placed in the thermal animations on the youtube playlist in the above link and is the reason why I do not intend to incorporate agent-based modelling in this particular manner.

Let me know your thoughts on this as I realize I may also be looking at this from a narrow perspective that is not informed by all that agent-based modelling has to offer.

-Chris

Hi Chris,

Thanks for the answer. Sorry for the late reply.

Indeed that is exactly what i was thinking. Even though I was excited when I was acquainted to NetLogo and ABM, I do realize that ABM can be a bit hip atm as it is being introduced in more and more fields. I also realize that thermal conditions of a space are not the only determinants for human behaviour. So I would not attempt to model human behavior right away in that sense.

From the very limited review I did I also thought the way to go was to use research out there that approximates behaviour on specific human tasks by statistics, like the example you gave. I was actually reading an interesting thesis that included statistical formulas for a  wide range of actions within a building. I could compile a set of these formulas and step functions for a few different rules if you want. Cause I think your idea of using the if/then rules will give allow a different kind of modeling of adaptive behaviors.

Now time to go see if I can acquire that book somehow :)

Kind regards,

Theodore Galanos.

Theodore,

It sounds like you are looking at some good stuff and I am very excited to hear what you come up with.  Compiling a set of formulas would be a great resource and, if that thesis is available for download or purchase anywhere, I would love to read it.

The pointing out of the "hipness" of ABM was not meant to be a critique of it as much a wariness of the "hype cycle" that is useful to view new technologies with (https://en.wikipedia.org/wiki/Hype_cycle).  I am certain that there is a huge plateau of productivity for ABM as we come to understand its most valuable applications.

-Chris

Hi Chris,

This is the thesis I was referring too http://infoscience.epfl.ch/record/142386/files/EPFL_TH4587.pdf.  I haven't gone through the whole thing to make sure but from what I see it provides a pretty good literature review and compilation of behavioral modelling for important user actions on different building components like windows, doors, thermal parameters, etc. He also goes through a lot of different mathematical frameworks one can use to model these.

I'll try and extract useful information out of this and other papers and perhaps make my own review of sorts and share it with everyone here. See where that takes us.

I did find another interesting thing looking around, researchers from UPENN were combining ABM methodology and EnergyPlus. They used the MLE+ framework (http://mlab.seas.upenn.edu/mlep/) to connect matlab and E+ and allow the actions of the agent in their example to interact with the E+ simulation at each timestep. Is something like that available today in GH or LB/HB? Sounds like an interesting platform, allowing for these connections to E+ but man don't let me go into Matlab :(

(link of the paper http://www.ibpsa.org/proceedings/BS2013/p_2464.pdf)

Kind regards,
Theodore.

I haven't read the whole discussion but in case you're interested to do what MLE+ does you don't really need MATLAB. It is an interface for BCVTB (https://simulationresearch.lbl.gov/bcvtb) which you can connect to directly.

Thanks Mostapha!

BCVTB looks very promising! All I need now is more hours in a day!

Kind regards,

Theodore.

Hi Theodore, I'm very interested in the topic of using agent-based modeling for behavioral modeling. One of the main issues for integrating similar features in energyplus is the difficulties to tap into the simulation during the run. I think we need to get into EMS for making any solutions similar to this to work. I have never played with EMS but it looks like one of those things that will be easy once you figure it out once. EnergyPlus developers are very good in developing not user-friendly workflows.

Interestingly enough I know 2 of the current developers of MLE+. I'm currently working with them on a different project. I didn't know that they are currently involved in MLE+. I can also ask them about their approach next time that I see them in person (will be early next year). Looks like they have made so many changes during the last 5 years which was the last time that I tried MLE+.

Hi Mostapha,

Thanks for your reply. It would be amazingly helpful if we can get their input on how to develop a co-simulation between EnergyPlus and an agent-based model. I've seen from the BCTVB site that they are either using what they calll ExternalInteface objects or EMS components. I think the EMS would be the best solution as well, just for matters of consistency. Apparently there are a couple of examples given along with the software.

Unfortunately, after a couple of hours browsing the site I came into my usual "wall". It's kind of hard for me to understand the underlying code of the thing given I'm not very familiar with E+ scripting language. I will keep trying though. I could move a lot faster if I had practical experience. I wonder if they already have examples of co-simulation (other than the templates offered with the software) that they would be willing to share.

Anyways, I've decided to turn my Christmas holidays to a mini sabbatical. I'll focus on collecting literature on agent based models of thermal comfort as well as mathematical models and statistics on human behavior in buildings. Hopefully, we can use all the above once we understand how to link E+ to such models.

Kind regards,

Theodore.

I went around GitHub for a bit, there seem to be a lot of interesting projects on ABM.

What is good for us, I suppose, is that most of them seem to be built on the Python environment, like

pyabm (https://github.com/azvoleff/pyabm),

agentum (https://github.com/unthingable/Agentum),

and the perhaps the most promising looking

mesa (https://github.com/projectmesa/mesa).

Would being coded in python make it easier for someone to port them in GH?

There are also some others written in javascript like agentbase (https://github.com/wybo/agentbase). Another potential interesting project is focusing on crowd dynamics (https://github.com/VT-ESM-CrowdDynamics/model) which might be relevant for us.

Finally, there's pandora (https://github.com/xrubio/pandora), a framework that can scale up to handle complex simulations. I would imagine this fits to the type of simulations we would want to do.

This is just a first read of course, I will give a try in some of them hopefully. I hope this is helpful.

Merry Christmas!

Kind regards,

Theodore. 

Actually, upon reading a bit more, it seems that pyabm is a good place to start. It seems to be a basic python toolkit for creating ABM models, classes, agent parameters, etc. which would be a nice start I guess.

I do think it has stopped developing by now however.

http://doc.azvoleff.com/PyABM/

Spam continues on Christmas Day!

I'm now playing around with NetLogo again to remember my uni days. I've also come across AnyLogic. It seems like a highly developed ABM software so I think I will go over some (MIT) lectures on it to get both a practical and theoretical refreshing on things. Cool thing about it is even though it's probably an expensive software it has a free personal learning edition!

Regards,

Theodore.

Theodore,

Sorry for being away from the conversation for a couple of weeks.  As Mostapha points out, a lot of your criteria for a good ABM package are going to be related to the means by which you plan to dynamically interact with the E+ simulation.  If you are going to interact with it via MLE+, then an ABM package that is in Matlab would likely be the best.  Mostapha, is there a way to use MLE+ without having to buy Matlab?

If you are going to go with a BCTVT approach, then an ABM package that is in Modelica would probably be best.  I know a colleague who is working with the BCTVT and I remember seeing some great stuff that he was doing with Modelica. I remember that he was using the Dymola interface to access the modlelica building components library that Michael Wetter put together and that this library had really only been validated with Dymola and not the other interfaces for Modelica (Dymola is not free, although it is a lot less expensive than MATLAB).  Still, Modelica is an open language unlike MATLAB and there are free interfaces for it that are getting better.  Thus, there may be some long-term benefits to developing with that.  Let me know if you want to be put in touch with my colleague who is working with the Modelica building components library.

Finally, the agent behavior that you are trying to model will also shape how you integrate it into the simulation.  If the behavior is triggered by temperature, solar radiation, or glare/daylight values that you get from a Radiance simulation, then you don't have a need for these very complex interfaces and you can get what you are after with just the objects that are already in E+ and with csv schedules.  For understanding all of the objects that you have at your disposal in E+, I recommend using the IDF Editior that comes with E+ (C:\EnergyPlusV8-3-0\PreProcess\IDFEditor) and the online Input/Output Reference.  I had no knowledge of E+ objects a year and a half ago and both of these resources were critical for my tapping into E+.

Once you have a good understanding of the specific behaviors that you are trying to model and the capabilities that E+ already has, I think you will be in a better position to decide what tools are most valuable to you.

Hope this helps,

-Chris

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service