Hi Jacob,
Thanks a lot for your reply and consideration. I tried that, but I did not get 
what I expected. I am suspicious that I have done something wrong and would be 
grateful if you could advise. Please note we are left-hand side.

I put the code, input, and output below.
Looking forward to hearing from you.
Many thanksMohsen
First: I created a taz file as follows: <tazs><taz id="1" edges="-16686683#3 
16686683#3" />   <taz id="2" edges="-256521845#1 256521845#1" /></tazs>
Second: My ofm file$O;D28.01 8.0211  2  52  1  1
Third: commandod2trips -n taz.taz.xml -d input_od_o.fma -o tripmatrix.trips.xml 
 --scale 1 

Forth: output (tripmatrix.trips.xml)<routes 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd";>    
<trip id="1" depart="28869.51" from="16686683#3" to="-256521845#1" fromTaz="1" 
toTaz="2" departLane="free" departSpeed="max"/>    <trip id="2" 
depart="28870.32" from="16686683#3" to="-256521845#1" fromTaz="1" toTaz="2" 
departLane="free" departSpeed="max"/>    <trip id="4" depart="28878.88" 
from="-16686683#3" to="256521845#1" fromTaz="1" toTaz="2" departLane="free" 
departSpeed="max"/>    <trip id="0" depart="28895.35" from="-16686683#3" 
to="256521845#1" fromTaz="1" toTaz="2" departLane="free" departSpeed="max"/>    
<trip id="3" depart="28898.16" from="-16686683#3" to="256521845#1" fromTaz="1" 
toTaz="2" departLane="free" departSpeed="max"/>    <trip id="5" 
depart="28915.65" from="-256521845#1" to="16686683#3" fromTaz="2" toTaz="1" 
departLane="free" departSpeed="max"/></routes>


As shown above, for the first 5 trips (from zone 1 to zone 2), the 'from' 
should be the negative edge (-16686683#3) and arrival should be the positive 
edge (256521845#1). Unfortunately, the first two do not follow this rule. 
One more question please: how does od2trips can detect which edge is upstream 
and downstream without having the net.xml file as a parameter?


 

    On Tuesday, May 2, 2017 4:47 AM, Jakob Erdmann <[email protected]> 
wrote:
 

 The solution lies in letting the router decide from which of the two 
directional edges to start / arrive.
This can be done using traffic assignment zones which puts both edges (positive 
and negative number) into one zone. These zones can be generated automatically.
See 
http://sumo.dlr.de/wiki/Definition_of_Vehicles,_Vehicle_Types,_and_Routes#Traffic_assignement_zones_.28TAZ.29
http://sumo.dlr.de/wiki/Tools/District#generateBidiDistricts.py
regards,
Jakob

2017-04-30 8:03 GMT+02:00 mohsen hs <[email protected]>:

Hello all,
I have some data from actual traffic devices and would like to generate the 
traffic based on the collected traffic data. My collected data is like this:
Source Street(SS), latitude of SS, longitude of SS, number of observed 
vehicles, Destination (DS), DS latitude, DS longitude, arrival time at DS
I have generated net.xml for my city and I wrote an application to extract 
edges and store them in my database (db). I also wrote an application that can 
generate trips.xml for me based on the data in my db. I also stored lat, long, 
and street names from map.osm in my db. So I can easily correlate lat and long 
(from map.osm) with edges (from net.xml). The problem that I am facing is 
related to generating the trips based on the edges (to and from). I can find 
the closest edge to my SS/SD by finding the minimum Euclidean distance between 
SS/DSs' lat/long and edges' lat/long. But, I have difficulty in selecting the 
negative edge or positive edge as from/to. For example, after calculating the 
minimum Euclidean distance,  the start point matches the following edges (see 
below screenshot) and the direction of travel (SS->SD) in my case is North. So, 
I have to select the negative one, but I can not do this manually. I was 
wondering if you could help me to find a way to automate this process.


Please let me know if you need more information.
Looking forward to hearing from you.

Regards,Mohsen


------------------------------ ------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
______________________________ _________________
sumo-user mailing list
[email protected]. net
https://lists.sourceforge.net/ lists/listinfo/sumo-user





   
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to