1 / 24

Social networks module, MATSim Castasegna meeting, October 2007

Social networks module, MATSim Castasegna meeting, October 2007. Jeremy Hackney. Social interactions in transportation science. Long term how travel technology and other factors influence contacts Short term

tia
Download Presentation

Social networks module, MATSim Castasegna meeting, October 2007

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Social networks module, MATSim Castasegna meeting, October 2007 Jeremy Hackney

  2. Social interactions in transportation science • Long term • how travel technology and other factors influence contacts • Short term • how social contacts influence activity travel choices, mental maps, spatial discovery

  3. Social interaction and travel behavior Geography Transportationsupply Transportplanning Sociology New areas Statisticalphysics Socialbehavior Activity travelbehavior

  4. Features of the Social Network Module • Initial social network • Face to face interactions (spatial) • Modify social network • Other interactions (non-spatial) • Modify activity plans using social influence model • Re-evaluate plans • Calculate complex network statistics • Output movements, socializing, and statistics

  5. Module API classes • EgoNetwork (Person.knowledge) • A map of affiliated Persons andSocialLinks to them • CoolPlaces (Person.knowledge.map) • Facilities <> Activities • SocialNetwork • A map of EgoNetworks • Initialization, modification methods • Knowledge is modified (Person) • Ego Network • CoolPlaces • Interactors (SocialNetwork) • Spatial (face to face) • NonSpatial (not observed, not face to face) • SocialNetworkStatistics • Probes of social and travel behavior

  6. MATSim Controller Startup Choose Strategyand Scoring .xml: Plans World Network Facilities Matrix Census Etc. Load Data ReplanStrategy Adjust Plans Shutdown

  7. Social Network Controller Startup Choose Strategyand Scoring .xml: Plans World Network Facilities Matrix Census Etc. Load Data SocialNetInteractions InitializeSocialNet Adjust Plans Shutdown

  8. NOTE: Scoring • For quickly generating the social network, new evaluation of the new plans is necessary. However, precise traffic assignment is not important. MobSim in RePlanning can be a simple Euclidean distance. I have not programmed this, though. • Instead, I generate the social network quickly by iterating outside of the RePlanning loop. I have had to write my own scoring function (not a standard MATSim scoring function, which is tied to the replanning package). • IMPROVEMENT: I want to use the MATSim scoring package but I need a simpler plan scoring device than full assignment

  9. NOTE: Coupling • Partial relaxation technique used for socializing • Number of iterations of socializing before replanning is adjustable • This amounts to variable coupling strength between social network algorithm and travel algorithms • This will be very important, I think (see sample results)

  10. Input SocialNetand Plans SNInteractions SpatialInteractions NonspatialInteractions Wrapup Map agents <>activity locations ExchangeKnowledge Write outSocial Net Agents interactatlocations (Negotiateactivities) Calculate andwrite out Statistics Link Removal Return SocialNet

  11. Input SocialNetand Plans SN Plan Adjustments ProbeKnowledge Change CopiedPlan EvaluateChange Pick Typeof Activity Pick Activityof same Typefrom Plan Either Re-Assignor other Measure Pick Facilityof this Typefrom Knowledge Replaceits Facilityfrom Knowledge Calculate andwrite out Statistics Copy SelectedPlan Return Plans

  12. Example "experiment" • Initial social network Erdös/Renyi • Face to face interactions Renew link or make friend • Modify social network Remove "old" links • Other interactions Exchange info about locations • Introduce friends of friends • Modify activity plans Switch secondary location • Re-evaluate plans Select: shortest total length • Calculate complex network statistics • Output movements, socializing, and statistics

  13. Example "experiment" • 1008 randomly generated agents • 0-3 random out of home activities • Random activity destinations • Equal time for each activity • 1 day • Network: Source: Michael Balmer 2007

  14. Sample Configuration File

  15. Analysis 1: Overview • Calculating statistics in MATSim run requires • JUNG library • Support libraries for JUNG • Costs time, information not used in run (analysis only) • Other statistics from output network (iterations) in Space-ASCII • Postprocess with R and Pajek • Postprocessing will be impossible with larger networks/bigger files

  16. Analysis 2: Some output files • Agent file (nodes) • iter id homeid deg asd1 asd2 asd3 clust plantype numknown • 0 1 110 0 NaN 193.54 610.6 0.0 hlwhh 0 • 0 640 101 1 120.93 0.0 0.0 0.0 hhh 0 • 0 300 105 3 151.87 0.0 0.0 0.0 hhhhh 0 • 0 850 102 6 133.96 40.0 160.0 0.0 hehh 0 • ... • Edge file (edges) • iter tlast tfirst dist egoid alterid purpose timesmet • 0 0 0 200.0 437 382 initialized 1 • ... • 100 86 86 0.0 463 67 renewwork 1 • 100 91 91 200.0 108 319 newrandomintro 1 • 100 95 95 175.0 649 400 newleisure 1 • ... • Graph file (statistics) • iter deg clust clustratio asd1 asd2 asd3 dyad_dist link_age meet_freq • 0 2.994 0.0019 0.672 125.961 127.277 383.09 127.54 0.0 Infinity • 1 3.049 0.0071 2.353 124.953 126.152 378.26 126.74 0.95 1.00 • 2 3.134 0.0143 4.616 123.515 125.556 374.77 125.32 1.87 0.50 • ...

  17. Analysis 3: Analysis tools • Network statistics: • MATSim  /socialnets/stats  R  .pdf's  single .pdf • Visualization: • MATSim  /socialnets/pajek  Pajek  .svg • Movies of "Evolution" would be possible if I wrote out the format • KML is no problem except HUGE files and not sure what it shows • Automatic detection of clusters, different stats from MATSim would give more insight

  18. For output example • See Frontiers in Transportation presentation • (inserted 22.10.2007) • Model 1 no optimization of activities: only iterate social network (friends-of-friends meeting, spatial meeting) • Model 2 optimize secondary locations: each social network iteration (friends-of-friends meeting, spatial meeting, exchange of spatial information), replan by changing secondary location. Choose path with shortest-length chain (no MobSim)

  19. Validation of social network output • Exponential degree distribution P(ij)~exp(N(z)) • Average degree • Clustering coefficient > random • Short path lengths • Homophily (assortativity) • Geographic attributes • Visit frequency vs. distance, etc.

  20. Analysis: Sample Degree Distribution Log-normal Activities constant Activities optimized Log-log

  21. Analysis: Sample Graph Statistics, N=1008  The 2 social network graphs have exponentially distributed degree which isthe same whether activities are replanned or not. However othergraph and travel statistics are very different in the two models.

  22. Analysis: Sample Activity Space Measures Sum of arrow length is Euclidean-based length of plan (activity chain) (asd3) Circle representation of average distance to all activities (asd1) Circle representation of average distance to all friends (asd2) Plan type = "hwlh"

  23. Analysis: Sample Activity Space Measures No replanning of secondary activity location Replanning secondary activity locationeach iteration of social network

  24. Calculation size • Interaction calculation scales as N * degree • ~ pN * N where p is the percent of population that agent knows, i.e. a function of 1/N • Knowledge exchange calculation scales as N * q * degree • where q is the number of places known to the agent • Introducing friends calculation scales as N * degree

More Related