-
Notifications
You must be signed in to change notification settings - Fork 180
faq 81723402
by Rolando Armas on 2016-09-02 05:06:10
Hi, friends!
I have created my toy multimodal transportation scenario (network,plans, transit schedule and vehicles xml files). Initial plans have only car legs. When I try to run my scenario I get the next error:
ERROR AbstractTransitDriverAgent:296 java.lang.RuntimeException: Transit
vehicle is not yet at last stop! vehicle-id = tr_1; next-stop = 11
The transit schedule has only one pt line with the next configuration:
<transitStops>
<stopFacility id="11" x="5.3" y="12.4" linkRefId="1211" name="Main" isBlocking="true"/>
<stopFacility id="21" x="9.6" y="17.6" linkRefId="1121" name="First" isBlocking="true"/>
<stopFacility id="31" x="14.8" y="12.2" linkRefId="2131" name="Second" isBlocking="true"/>
<stopFacility id="41" x="19.8" y="17.6" linkRefId="3141" name="Third" isBlocking="true"/>
</transitStops>
<transitLine id="Line1">
<transitRoute id="11to41">
<transportMode>pt</transportMode>
<routeProfile>
<stop refId="11" departureOffset="00:00:00"/>
<stop refId="21" departureOffset="00:04:20"/>
<stop refId="31" departureOffset="00:08:00"/>
<stop refId="41" arrivalOffset="00:10:00" />
</routeProfile>
<route>
<link refId="1121"/>
<link refId="2131"/>
<link refId="3141"/>
</route>
<departures>
<departure id="1" departureTime="06:00:00" vehicleRefId="tr_1" />
<departure id="2" departureTime="06:15:00" vehicleRefId="tr_2" />
<departure id="3" departureTime="06:30:00" vehicleRefId="tr_1" />
...
</departures>
</transitRoute>
The network has the "car,bus" links to guaranteed the bus route. However, I do not understand what is wrong.
I have attached the log and scenario files.
Any suggestion?
Thanks!
by Joschka Bischoff on 2016-09-02 06:42:04
Hi Rolando,
the route of your transit line must contain all links of the network route including those with stops.
In Your case link 1211 is not part of the route, but stop 11 is.
Adding
<route>
<link refId="1211"/>
<link refId="1121"/>
<link refId="2131"/>
<link refId="3141"/>
</route>
should do the trick.
by Patrick Boesch on 2016-09-02 06:50:07
Explanation: The route (the actual link-sequence the vehicle has to drive) you provided does not contain the link of the first stop (link 1211). So the vehicle drives the full route but never reaches the first stop (you see in the error message that vehicle tr_1 is still looking for stop 11), and it is ergo never even looking for the other stops. At the end of the route it realizes that it "is not yet at the last stop", which results in the error message.
Bugfix: Add
<link refId="1211"/>
as the first entry of the route (assuming that link 1121 can be reached from link 1211).
by Kai Nagel on 2016-09-02 09:29:51
There is also a validator to check this:
[laptop:toy]$ java -cp ~/matsim/releases/matsim-0.8.0/matsim-0.8.0.jar org.matsim.pt.utils.TransitScheduleValidator transitScheduleDMQ.xml DMQMultimodalToyNet02.xml
2016-09-02 11:27:48,576 INFO MatsimXmlParser:145 starting to parse xml from file DMQMultimodalToyNet02.xml ...
2016-09-02 11:27:48,639 INFO MatsimNetworkReader:98 using network_v1-reader.
2016-09-02 11:27:48,640 INFO MatsimXmlParser:253 Trying to load http://www.matsim.org/files/dtd/network_v1.dtd. In some cases (e.g. network interface up but no connection), this may take a bit.
2016-09-02 11:27:48,964 INFO NetworkImpl:134 node # 1
2016-09-02 11:27:48,965 INFO NetworkImpl:134 node # 2
2016-09-02 11:27:48,965 INFO NetworkImpl:134 node # 4
2016-09-02 11:27:48,966 INFO NetworkImpl:134 node # 8
2016-09-02 11:27:48,971 INFO NetworkImpl:130 link # 1
2016-09-02 11:27:48,972 INFO NetworkImpl:130 link # 2
2016-09-02 11:27:48,972 INFO NetworkImpl:130 link # 4
2016-09-02 11:27:48,973 INFO NetworkImpl:130 link # 8
2016-09-02 11:27:48,979 DEBUG MatsimFileTypeGuesser:147 Detected public id: null
2016-09-02 11:27:48,979 DEBUG MatsimFileTypeGuesser:148 Detected system Id: http://www.matsim.org/files/dtd/transitSchedule_v1.dtd
2016-09-02 11:27:48,981 INFO MatsimXmlParser:145 starting to parse xml from file transitScheduleDMQ.xml ...
2016-09-02 11:27:48,983 INFO MatsimXmlParser:253 Trying to load http://www.matsim.org/files/dtd/transitSchedule_v1.dtd. In some cases (e.g. network interface up but no connection), this may take a bit.
Schedule is NOT valid!
Validation errors:
Transit line Chaguarkingo, route 11to41: Stop 11 cannot be reached along network route.
[laptop:toy]$
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq