How do InteractionActivities work and how do they relate to trips? #1222
-
I've spent the morning experimenting with giving minor activities in my plan the "interaction" suffix with the intent of altering what is included in a trip and subsequent RoutingRequest. The idea of my run is a plan: Where an ev travels and can charge either at location1 or out on the trip. When location2 isn't an interaction, the trips for the first part are handled as two separate trips between location1 -> location2 and then location2 -> location1. When this is the case it is difficult to say at what time optimal charging would take place. While, if the interaction suffix is used, all trips would be given as location1 -> location1 and then the entire trip where there is a potential demand for charging can be handled at once. With this as a background I wonder how and where the interaction activities are created. My main issue is that I need to be able to set a duration for the interaction activities based on what is set as the maximum duration in the plans file. Perhaps I'm searching for a solution in the wrong place and am trying to use MATSim in an unintened way. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Interaction activities are created by the I'm not sure, I completely follow your example on charging. In any case, if you are referring to the car mode, the class that creates your route (including the "car interaction" activities) is the |
Beta Was this translation helpful? Give feedback.
-
From the above comments, it feels to me like the interaction activities (in the matsim sense) have nothing to do with your problem. The interaction activities were "invented" a long time ago, when we needed to go to hierarchical trips, such as "walk to pt stop", "take bus to destination bus stop", "walk to destination". These are all "legs" (in the matsim sense), but the original data model needed an activity between any two legs. Keeping that data model meant that all visualizers kept working. However, those interaction activities are really part of the trip as a whole, and it would be quite involved to give additional meaning to them. |
Beta Was this translation helpful? Give feedback.
Interaction activities are created by the
RoutingModule
s which are in turn created by theTripRouter
whenever a trip (between two activities needs to be routed). On the other end of the logic, a "trip" is identified by finding activities which are not interaction activities. So for mode choice and other purposes, there is functionality (TripStructureUtils
) that can identify the sequence of trips in a plan (by skipping the interaction activities). Interaction activities are identified by looking for the "interaction" suffix in their name.I'm not sure, I completely follow your example on charging. In any case, if you are referring to the car mode, the class that creates your route (includi…