[sumo-user] DFROUTER Detector type is discarded for most of detectors

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[sumo-user] DFROUTER Detector type is discarded for most of detectors

anilbaral
Hi,
I am trying to generate a traffic flow simulation around a loop in Texas. I
have hourly flow data for 24 hr at different locations. When I  used
DFROUTER to determine the type (source or sink) of the detector, most of my
detectors are classified as TYPE: discarded.
/The code is :
dfrouter -n fparis.net.xml -d detectors.xml --detectors-output det.out.xml/

I read that flowrouter.py can be more useful in generating a flow in
circular networks, so I even tried to use the flowrouter.py for generating
the routes. The codes are:

/python detector\flowrouter.py -n fparis.net.xml -d det.out.xml -f flow.txt
-o out.rou.xml -e out.add.xml -v  --vclass passenger --source-sink-output
sourceSink.xml --revalidate-detectors/

when I see the sourceSink.xml file generated from flowrouter.py, I just see
one source and one sink. what is the reason for this? I have attached the
file!

What should be the unit of time when defining the flow in the above code? is
it minute or seconds?

when converting the OSM to the sumo network, is the length of the network
always in meters? How can i see in what unit the length of network is being
considered in the simulation? Should the speed be assigned in m/s or other
units?

The simulation works when I run the following code:
sumo-gui --net-file fparis.net.xml --additional-files demo.add.xml

There are no vehicles in some lanes which I think is due to type discarded
assigned to the detectors. why most of my detectors are under type discarded
and how can this be improved?

The files are attached. ParisLoop.zip
<http://sumo-user-mailing-list.90755.n8.nabble.com/file/t411/ParisLoop.zip>  

Thank you in advance.

Regards,
Anil




--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] DFROUTER Detector type is discarded for most of detectors

Jakob Erdmann
answers inline...


 When I  used
DFROUTER to determine the type (source or sink) of the detector, most of my
detectors are classified as TYPE: discarded.
when I see the sourceSink.xml file generated from flowrouter.py, I just see
one source and one sink. what is the reason for this? I have attached the
file!

detector classification is done by checking whether the detector has any predecessor or successor edges. This works for networks that are cut after at the motorway  ramps (on ramps would be sources and off-ramps would be sinks).

What should be the unit of time when defining the flow in the above code? is
it minute or seconds?
flow files use minutes (this is for historical reasons because these files used to come from a highway authority in that format). everything else in SUMO uses seconds

when converting the OSM to the sumo network, is the length of the network
always in meters?
yes

Should the speed be assigned in m/s or other
units?
always m/s
 
why most of my detectors are under type discarded
and how can this be improved?
 
You could use routeSampler.py instead of DFROUTER or flowrouter.py. This avoids the need for detector classification and has a number of other advantages. See https://sumo.dlr.de/docs/Tools/Turns.html#routesamplerpy

regards,
Jakob

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] DFROUTER Detector type is discarded for most of detectors

anilbaral
Hi Jakob,
Thanks for your answers and your presentation at the user conference on
youtube.

I still have a question about the flow data units to be used in flow files
for DFROUTER and flowrouter.py. The documentation in two different pages
seems inconsistent, which inturns create confusion about the unit of speed
and time.

https://sumo.dlr.de/docs/DFROUTER.html
<https://sumo.dlr.de/docs/DFROUTER.html>  

The documentation in above-mentioned link says to use the speed in km/hr and
time is in minutes.
In your previous email, you replied to me that speed to be used in the flow
file is in m/s. Could you please confirm the unit for speed once again?

one of the tutorials in DFROUTER says to input the time in second:
https://sumo.dlr.de/docs/Tutorials/HighwayDetector.html
<https://sumo.dlr.de/docs/Tutorials/HighwayDetector.html>  

could you also please confirm the unit of time to be used in the flow file?

Also, After I generated the demand in sumo using flowrouter.py, I checked
the flow in detectors using flowFromRoutes.py. The output is:

Detector;RouteFlow;DetFlow;ratio
139D2_L;4997.0;4997.0;0.0
139D2_R;4997.0;4997.0;0.0
139H116_SB;4652.0;4652.0;0.0

could you please tell me what RouteFlow, DetFlow, ratio in this output of
flowFromRoutes.py represent?

Thank you,
Anil  






--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] DFROUTER Detector type is discarded for most of detectors

Jakob Erdmann

The documentation in above-mentioned link says to use the speed in km/hr and
time is in minutes.
In your previous email, you replied to me that speed to be used in the flow
file is in m/s. Could you please confirm the unit for speed once again?

Sorry for that. detector flow files are pretty much the only place where speed is in km/h (just as they are the only place where time is in minutes).
The documentation at https://sumo.dlr.de/docs/Tutorials/HighwayDetector.html was incorrect and has now been fixed.
Note, that flowrouter completely ignores the speed data and only makes use of flows.
 
Detector;RouteFlow;DetFlow;ratio
139D2_L;4997.0;4997.0;0.0
139D2_R;4997.0;4997.0;0.0
139H116_SB;4652.0;4652.0;0.0

could you please tell me what RouteFlow, DetFlow, ratio in this output of
flowFromRoutes.py represent?

RouteFlow is the total number of vehicles that pass a detector according to the input route file
DetFlow is the total number of vehicle that pass a detector according to the flow file
ratio is (routeFlow - detFlow) / detFlow

regards,
Jakob

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] DFROUTER Detector type is discarded for most of detectors

anilbaral
Hi Jakob,
In response to my first email, you suggested me to use routesampler.py
instead of dfrouter and flowrouter.py. I couldn't obtain sufficient
information on routesample.py from the SUMO website. Please help me with my
following questions:
when using routesampler.py, should we provide both turn count data and edge
data file? Can turn count data be generated from the flow data that we use
in DFROUTER? I have generated edge data using edgeDataFromFlow.py, the edge
data file looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<data>
    <interval id="flowdata" begin="0" end="3600">
        <edge id="-118082207#1" qPKW="2546.0" qLKW="0" groups="1"/>
        <edge id="-143701451#0" qPKW="2738.0" qLKW="0" groups="1"/>
        <edge id="-143701507#18" qPKW="6568.0" qLKW="0" groups="1"/>
        <edge id="-216229752#1" qPKW="801.0" qLKW="0" groups="1"/>
        <edge id="-216229761#3" qPKW="940.0" qLKW="0" groups="1"/>
        <edge id="-21691403#3" qPKW="4964.0" qLKW="0" groups="1"/>
        <edge id="-21695844#4" qPKW="10142.0" qLKW="0" groups="1"/>
        <edge id="-21696190#0" qPKW="5806.0" qLKW="0" groups="1"/>

Do these outputs represent the correct attributes of the edge data file?


I have flow data from detectors no turn count data, Is it possible to use
routesampler.py to generate the vehicles?

Thank You,
Anil



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] DFROUTER Detector type is discarded for most of detectors

Jakob Erdmann
Hello,
using  only edgeData will work just fine. To make use of the edgeData that you generated (counts are stored in 'qPKW`), you need to set routeSampler option
--edgedata-attribute qPKW
If your flowfile contains temporal changes in flow, you need to update edgeDtataFromFlow.py to the latest development version because the version released with 1.6.0 does not handle the time-information correctly.  https://sumo.dlr.de/docs/Downloads.php#sumo_-_latest_development_version

regards,
Jakob



Am Fr., 26. Juni 2020 um 08:55 Uhr schrieb anilbaral <[hidden email]>:
Hi Jakob,
In response to my first email, you suggested me to use routesampler.py
instead of dfrouter and flowrouter.py. I couldn't obtain sufficient
information on routesample.py from the SUMO website. Please help me with my
following questions:
when using routesampler.py, should we provide both turn count data and edge
data file? Can turn count data be generated from the flow data that we use
in DFROUTER? I have generated edge data using edgeDataFromFlow.py, the edge
data file looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<data>
    <interval id="flowdata" begin="0" end="3600">
        <edge id="-118082207#1" qPKW="2546.0" qLKW="0" groups="1"/>
        <edge id="-143701451#0" qPKW="2738.0" qLKW="0" groups="1"/>
        <edge id="-143701507#18" qPKW="6568.0" qLKW="0" groups="1"/>
        <edge id="-216229752#1" qPKW="801.0" qLKW="0" groups="1"/>
        <edge id="-216229761#3" qPKW="940.0" qLKW="0" groups="1"/>
        <edge id="-21691403#3" qPKW="4964.0" qLKW="0" groups="1"/>
        <edge id="-21695844#4" qPKW="10142.0" qLKW="0" groups="1"/>
        <edge id="-21696190#0" qPKW="5806.0" qLKW="0" groups="1"/>

Do these outputs represent the correct attributes of the edge data file?


I have flow data from detectors no turn count data, Is it possible to use
routesampler.py to generate the vehicles?

Thank You,
Anil



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] DFROUTER Detector type is discarded for most of detectors

anilbaral
Hi Jakob,

I have downloaded the latest version of edgeDataFromFlow.py and tried to
generate the edge data. But the latest version is showing some error. The
error message is as follows:


C:\Users\Anil\Desktop\SUMO June 30>python
sumo-git/tools/detector/edgeDataFromFlow.py -d parisdetectors.xml -f
parisflow.txt -o edgedata.xml
Traceback (most recent call last):
  File "sumo-git/tools/detector/edgeDataFromFlow.py", line 124, in <module>
    main(get_options())
  File "sumo-git/tools/detector/edgeDataFromFlow.py", line 86, in main
    beginM = int(sumolib.miscutils.parseTime(options.begin, 60) / 60)
TypeError: parseTime() takes 1 positional argument but 2 were given


Can you please suggest to me what mistake I am making with the new version
of edgeDataFromFlow.py?

The old version of edgeDataFromFlow.py did not consider the temporal flow,
but was working and gave the total flow in the edges. I have attached the
files.  FILES.zip
<http://sumo-user-mailing-list.90755.n8.nabble.com/file/t411/FILES.zip>  

Using the older version of edgeDataFromFlow, I was able to generate the
vehicle (although old version did not take into account the temporal flow
data). How can I check what is the flow after the simulation to compare the
flow with the original flow or edge data? I couldn't use flowFromRoutes.py
as I don't have a separate route file.



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] DFROUTER Detector type is discarded for most of detectors

Jakob Erdmann
In order to use the updated edgeDataFromFlow.py you need to update the rest of tools/sumolib as well.
You can check the difference between input counts and routeSampler output counts directly by setting option --mismatch-output
The resulting file can be loaded and visualized in sumo-gui.
To check the simulation counts (which may be different if the network could not accommodate all vehicles) you can use sumo option --vehroute-output. Also, the simulation can generate edgeData output which you can compare to another edgeData file using tools/output/edgeDataDiff.py (for this, the intervals have to match and you have to rename attribute qPKW to 'entered' because only matching attributes will be compared)

regards,
Jakob

Am Di., 30. Juni 2020 um 09:34 Uhr schrieb anilbaral <[hidden email]>:
Hi Jakob,

I have downloaded the latest version of edgeDataFromFlow.py and tried to
generate the edge data. But the latest version is showing some error. The
error message is as follows:


C:\Users\Anil\Desktop\SUMO June 30>python
sumo-git/tools/detector/edgeDataFromFlow.py -d parisdetectors.xml -f
parisflow.txt -o edgedata.xml
Traceback (most recent call last):
  File "sumo-git/tools/detector/edgeDataFromFlow.py", line 124, in <module>
    main(get_options())
  File "sumo-git/tools/detector/edgeDataFromFlow.py", line 86, in main
    beginM = int(sumolib.miscutils.parseTime(options.begin, 60) / 60)
TypeError: parseTime() takes 1 positional argument but 2 were given


Can you please suggest to me what mistake I am making with the new version
of edgeDataFromFlow.py?

The old version of edgeDataFromFlow.py did not consider the temporal flow,
but was working and gave the total flow in the edges. I have attached the
files.  FILES.zip
<http://sumo-user-mailing-list.90755.n8.nabble.com/file/t411/FILES.zip

Using the older version of edgeDataFromFlow, I was able to generate the
vehicle (although old version did not take into account the temporal flow
data). How can I check what is the flow after the simulation to compare the
flow with the original flow or edge data? I couldn't use flowFromRoutes.py
as I don't have a separate route file.



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] DFROUTER Detector type is discarded for most of detectors

anilbaral
Thank You so much! The latest version of edgeDataFromFlow.py is working when
I updated tools/sumolib; however, I see the segregation of data on the edge
file is for 1 day. Is the code designed to segregate data for the interval
of 86400 sec (1 day)? The flow data that I provided as input contained the
flow with an interval of 1 hour.

Thanks Again,
Anil



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
Reply | Threaded
Open this post in threaded view
|

Re: [sumo-user] DFROUTER Detector type is discarded for most of detectors

Jakob Erdmann
One day is the default. For hourly aggregation you need to pass the option --interval 60

Am Di., 30. Juni 2020 um 10:34 Uhr schrieb anilbaral <[hidden email]>:
Thank You so much! The latest version of edgeDataFromFlow.py is working when
I updated tools/sumolib; however, I see the segregation of data on the edge
file is for 1 day. Is the code designed to segregate data for the interval
of 86400 sec (1 day)? The flow data that I provided as input contained the
flow with an interval of 1 hour.

Thanks Again,
Anil



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
[hidden email]
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user