Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] flowrouter.py module 'detector' has no attribute 'DetectorReader'

1) unlike dfrouter, flowrouter will treat the network border (edges without successor or predecessor) as unlimited sinks and sources and will use them to generate flows that satisfy the given upstream and downstream counts.
2) by default flowrouter generates traffic for 1h. To change this, set the option --interval which will generated traffic for multiple time slices of the given duration (in minutes).

Note, that the input flow file must also specify times in minutes (https://sumo.dlr.de/docs/Demand/Routes_from_Observation_Points.html#computing_flows)

regards,
Jakob

Am So., 6. Dez. 2020 um 01:51 Uhr schrieb Zhang Jackie <zhangzuoting@xxxxxxxxx>:
Hi Giuliana,

Thanks for your help, I tried with the ordered flow file, it worked.
And a few questions with the output files, after I use the command below,
flowrouter.py -n Tokyo.net.xml -d detectors.xml -f flow.txt -o out.add.xml -e out.rou.xml -v --vclass passenger --source-sink-output sourceSink.xml --revalidate-detectors  

the output is:
Reading net
748 edges read
Reading detectors
Warning! Edge '854532682' is simultaneously source and sink.
Loaded 0 sources and 0 sinks from detector file. Added 14 sources and 15 sinks from the network
Reading flows
Calculating routes
14 sources, 13 unlimited
15 sinks, 14 unlimited
Writing 3548548 vehicles from 9 sources between time 0 and 60 (minutes)
  unused sources: 437896359#0 45170906 648167166#0 667868686#0 759377422

1) 13 unlimited and 14 unlimited, what's the meaning of this?
2) The flow data I used is collected by every 5 minutes, and the time range is 0 minute to 1435minutes, 
but the results showed that only data of time range 0 ~ 60 (minutes) has been calucated.
I checked the out.rou.xml file, the definition of each flow is with time range 0~3600s, 1 hour.
<flow id="173954139_45018427.qPKW" departSpeed="max" departPos="last" departLane="best" route="173954139_45018427.qPKW" number="22869" begin="0" end="3600"/>
So, is there a limitation for the time range?   

For your reference, I attached with the refreshed zip file.
Thanks a lot.

<Maria.Armellini@xxxxxx> 于2020年12月6日周日 上午1:53写道:

Hi,

 

I think you just need to sort the flow file in ascending time. Attached I send you your file in order, try again with that file, I hope it works 😊

 

Regards,

Giuliana

 

Von: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> Im Auftrag von Zhang Jackie
Gesendet: Samstag, 5. Dezember 2020 12:40
An: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Betreff: [sumo-user] flowrouter.py module 'detector' has no attribute 'DetectorReader'

 

Hi All,

I am working on how to simulate the traffic senario with real traffic data of Tokyo, which is downloaded from UTD 19 dataset.


I searched on the SUMO documentation, and tried DFROUTER first, but there's warning called: "could not close route for ~~~“

So I checked the SUMO user maillist and get a similar case.

 

Following the possible solution, I change to use flowrouter.py. Here is what  I have done.

flowrouter.py -n Tokyo.net.xml -d detectors.xml -f flow.txt -o out.add.xml -e out.rou.xml -v --vclass passenger --source-sink-output sourceSink.xml --revalidate-detectors

 

The output is:

Reading net
748 edges read
Reading detectors
Traceback (most recent call last):
  File "D:\Program Files (x86)\Eclipse\ST\flow\flowrouter.py", line 989, in <module>
    sources, sinks = reader.readDetectors(options.detfile)
  File "D:\Program Files (x86)\Eclipse\ST\flow\flowrouter.py", line 845, in readDetectors
    self._detReader = detector.DetectorReader(detFile, self._lane2edge)
AttributeError: module 'detector' has no attribute 'DetectorReader'


The SUMO version I used is the latest one: 1.8.0, winx64, 

my system is win10 1809, and Python version is also the latest one: 3.9.0

 

I also attached the files in the email. 

What maybe the possible reasons for that error? How to fix it?

Thanks for your help in advance!

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top