CityScope / CS_Simulation_GAMA

Agent Based Simulation platform for CityScope
GNU General Public License v3.0
30 stars 21 forks source link

MicroFromMacro: Agents to have sequence of activities from '/od' field on cityIO #66

Closed doorleyr closed 4 years ago

doorleyr commented 4 years ago

As discussed in the meeting with @Kent-Larson on Friday Oct/25, agents should have a list of desired activities informed by the NHTS data. The Mobility_Service repo has been updated with d1c8e484dea9f2618a589ab0e54648223cfc9968 so that the data posted to the '/od' field now contains a list of desired activities for each agent. An agent's activity list can have an arbitrary number of activities (depending on the NHTS data). I've also included a list of start_times (seconds from midnight) of each activity (also based on the NHTS data) which we can use to determine when an agent proceeds to their next activity/location. The first activity is always home and the home activity starts at the beginning of the simulation. Therefore, the first Home activity doesn't require a start_time so if an agent has N activities, they will have N-1 start_times.

eg. if the 'activities' are ['H', W', 'G', 'H'], then the start_times could be [32580,57660,65100]

@agrignard I implemented a similar kind of activity sequencing using list of activities and start_times in https://github.com/CityScope/CS_Mobility_Service/blob/master/GAMA/models/MoBalance.gaml so we can try to implement this here?

@agrignard @RELNO @LAAP There are ~22 types of activities in the NHTS data and for now, I've simplified this to a list of 12 for now but I think we need to iterate on this to further simplify the list. The ones I've included for now are: 'H': 'Home' 'W': 'Work' 'C': 'School or College' 'D': 'Drop-off or pick-up' 'G': 'Buy groceries' 'S": 'Buy services' 'E': 'Eat' "R": 'Recreation' "X": 'Exercise' "V": 'Visit friends' "P": 'Hospital or Health Center' "Z": 'Religion'

LAAP commented 4 years ago

Hi @doorleyr ,

As a first iteration it is very good, however we have to coordinate a bit. I am glad that you are pointing out to this issue. What we call "Normalization" it is a big challenge and @agrignard @crisjf @markus and my self have spent 1h yesterday discussing about this.

When we talk about "activities", the architects understand "land use", but the truth is that after working in the urban indicators and the radar, I realize that we are defining "activities" and no only Land Use. With the word activities we are defining the correlation (or mixing) between the Land use (Houses, office, shops....) and the diversity of people using the amenity (Kids, Workers, religious, healthy people, etc.) or building, and, in some cases, like in your example, the behaviour of the people that use the amenity (timing, activity, etc.).

So, our standard needs to be an specific standard that deals with 3 parameters: "Land Use, Diversity, and Behaviour". As well, the standard needs to be able to operate with the tools (so the CityScope can understand the standard) But also needs to be able to be correlated with traditional standards from urban planning, like the traditional land use list.

I propose a Skype-Workshop, on next week, so we can coordinate this issue. Also, as I mentioned last week, by the end of this weekend I will share with all of you the first draft of a document with how the radar plot works. In that sense, I also have a "messi normalization", that, if we agree on an standard, I can translate into it.

Please, let me know your thoughts

doorleyr commented 4 years ago

@LAAP of course we need to be thinking about all these things but let's not over-complicate this issue. Activities are activities i.e. things people do. The location where an activity takes place is of course affected by the land uses. eg. eating activities can take place in a restaurant or at home, exercise can take place in a green space or a gym etc. This is just a simple extension of what has already been implemented in other GAMA simulations to a longer list of activities. I think the simplest way to approach this is to have: (i) a list of possible activity types and (ii) a mapping from activity types to land use types which facilitate the activities. This can be used by the simulation to decide where each activity will take place. I think this is all we need for mobility simulation purposes. The normalisation etc. is also important and I'm up for discussing this further but it should be a separate issue as it's not an issue for CS_GAMA_Simulation.

LAAP commented 4 years ago

Hi @doorleyr , sure. I think that we can follow the standards that we have used at the GAMA Lyon Model. Please read the "White paper - CityScope’s Urban Indicators.Radar Chart of the urban performance" that I have share. I recommend the section "7 synthetic data". 7.1 Synthetic land use", "7.2 People’s profiles" and "7.3 Synthetic behaviour and data"

doorleyr commented 4 years ago

@LAAP we could indeed use the activity types from your paper. But we have to approach it a bit differently because those sections and the Lyon model were focussed on situations where no suitable data are available. But there are actually plenty of available data for this simulation. The last time we all met, we agreed we would use the NHTS data to inform the activity profiles. This makes the simulations realistic and is actually simpler to implement because there's no need to synthesise anything.

Therefore, if we want to use the same list of activities as mentioned in your paper (home, office, restaurant, cultural, shopping), we just need a mapping from the 22 activity types that exist in the data to this simpler list of activity types.

Personally, I think that list of 5 activities is a bit too simple as it ignores some important things like dropping off kids at school/day-care and exercise. That's why I started this thread to try to converge on a suitable list.

LAAP commented 4 years ago

Hi @doorleyr , Thanks for this. I am totally in the same page than you. I think that we should NOT stick with the 5 or 6 activities (RM,RL,RS,OL,OM,OS). I have shared the doc and I am talking about it, just because it is our starting point. Since we where using LEGO colors as tags we used to have limited activities in the table. Now, that we are using "unique tags" I think that we should make our own new set of activities.

That is exactly what we are trying to do in our normalization/standardization meeting. However, I can go through the Ford Land uses and activities and make a 1st proposal/iteration.

Please, let me know your thoughts

agrignard commented 4 years ago

One input here (just in case we don't have data from an external sources) if we agree on landuse standard and profile standard (see issue https://github.com/CityScope/cityscope.github.io/issues/15) and then one generic way to define activities would be to simply a list of place to go for each profile that would form a matrices.

Like the one we are using in the Lyon Model for instance https://github.com/CityScope/CS_Simulation_GAMA/blob/master/CS_CityScope_GAMA/includes/Game_IT/ActivityPerProfile.csv

agrignard commented 4 years ago

Closing this issue for now as it seems not relevant anymore