eqasim-org / eqasim-java

The eqasim framework features an integrated transport simulation environment. It is based on the agent-based transport simulation framework MATSim with added components for simulation of discrete choice models.
http://www.eqasim.org
GNU General Public License v2.0
23 stars 40 forks source link

Inconsistent leg routingModes in some plans of the Corsica test scenario #184

Closed tkchouaki closed 7 months ago

tkchouaki commented 9 months ago

I'm in the process of replacing the EqasimMainModeIdentifier with the RoutingModeMainModeIdentifier and I noticed it breaks the test in the ile de france package, the leg counts of the outputs of the cut-out of the corsica simulation changed.

After investigating it turns out that there are a few agents in the original corsica population with inconsistent routingMode such as person with id 194390 with a plan that looks like

<activity type="home" link="11711" facility="home_85954" x="1229261.93" y="6126404.59" end_time="06:56:14" >
</activity>
<leg mode="walk" dep_time="06:56:14" trav_time="20:00:48">
    <attributes>
        <attribute name="routingMode" class="java.lang.String">pt</attribute>
    </attributes>
    <route type="generic" start_link="11711" end_link="26202" trav_time="20:00:48" distance="86457.72488805738"></route>
</leg>
<activity type="work" link="26202" facility="work_2699" x="1219523.487796" y="6192193.670357" start_time="07:51:14" end_time="15:06:14" >
</activity>

This caused the EqasimMainModeIdentifier to interpret it as a walk trip when called from the ModeAwareTripProcessor. The trip is then then re-routed as walk in the cutting process. With the RoutingModeMainModeIdentifier however, it is recognized as a pt trip and re-routed with swissrail raptor. Causing the plan elements to change. Perhaps the corsica scenario was generated without using the TransitWalkConstraint.

We can quickly fix it by performing a re-routing of the population and replacing reference counts in the test. But we can also remove the corsica scenario and use, in the ile-de-france module, the melun scenario present in the core module. This issue is so that we don't forget about this topic. for now i'll just replace the reference counts in the test to make it work.

sebhoerl commented 9 months ago

The functionality to "fix" only-walk trips in routing has been introduced recently. Eventually, we will remove the Corsica test case, so changing the counts is fine.