eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.42k stars 1.37k forks source link

od2trips(resulted trips files are error) #4956

Closed shuowang572875852 closed 5 years ago

shuowang572875852 commented 5 years ago

I used od2trips to generating the trips files,it is succeed ,but some of 'from' or 'to' are empty. How can i do?

namdre commented 5 years ago

This should not happen. Possibly related to invalid inputs that were not properly checked by od2trips.

shuowang572875852 commented 5 years ago

this is my taz files :


<tazs>
   <taz id="road1" edges="119460288 "/>
   <taz id="road2" edges="119460292 "/>
   <taz id="road3" edges="119460298 "/>
   <taz id="road4" edges="119460299 "/>
   <taz id="road5" edges="119460311 "/> 
   <taz id="road6" edges="134218044 "/>
   <taz id="road7" edges="160131328 "/>
   <taz id="road8" edges="173489136 "/>
   <taz id="road9" edges="173489140 "/>
   <taz id="road10" edges="183019562 "/>
   <taz id="road11" edges="193722093 "/>
   <taz id="road12" edges="223463853 "/>
   <taz id="road13" edges="223463854 "/>
   <taz id="road14" edges="223463859 "/>
   <taz id="road15" edges="223463860 "/>
   <taz id="road16" edges="228278329 "/>
...........
</tazs>

the OD-matrix is following:

$VMR

and the sumo version : SUMO Version 0.32.0 Build features: x64 Release PROJ GDAL GUI Copyright (C) 2001-2017 German Aerospace Center (DLR) and others; http://sumo.dlr.de License EPLv2: Eclipse Public License Version 2 https://eclipse.org/legal/epl-v20.html Use --help to get the list of options.

looking forward to your reply.

namdre commented 5 years ago

please zip all input files (network, taz-files, matrix, ...) and attach that, also specify the exact command line used.

shuowang572875852 commented 5 years ago

shengzhen.zip

shuowang572875852 commented 5 years ago

the command line is : C:\Users\Administrator\Desktop\shengzhen>F:\software\sumo\bin\od2trips --taz-files shengzhen.taz.xml --od-matrix-files shengzhen_OD_Matrix.mtx -o shengzhen.trips.xml Success.time 86399.74

namdre commented 5 years ago

The problem is caused by invalid taz edges. The finale space in edges="119460288 " is not allowed. Also you have multiple invalid edge ids. Example, edge 26968094 does not exist and the taz definition should probablybe <taz id="road37" edges="26968094#0 26968094#1 26968094#2 26968094#3 26968094#4 -26968094#0 -26968094#1 -26968094#2 -26968094#3 -26968094#4"/>

shuowang572875852 commented 5 years ago

Thanks for your help and I have corrected that mistake,but the 'from' or 'to' have also empty value ,and when I use the trips files ,the sumo-gui start an error :

Loading configuration... done. Loading net-file from 'C:\Users\Administrator\Desktop\shengzhen\shengzhen.net.xml'... done (439ms). Loading done. Error: whitespace expected In file 'C:\Users\Administrator\Desktop\shengzhen\shengzhen.trips.xml' At line/column 22/90.

Quitting (on error).

and how can i do?Looking forward to your reply. shengzhen.zip

namdre commented 5 years ago

when calling od2trips you can ony pass a vType id to the vtype option (e.g. 'type1'). The definition must be placed in an additional file as below and loaded with sumo option --additional-files


<add>
   <vType id="type1" accel="2.6" decel="4.5" sigma="0.5" length="5" maxSpeed="70"/>
</add>