[sumo-user] How to replace a intersection with a roundabout from an openstreetmap file

2020-05-09 Thread lenri001
Hello all,
I am new to this software, so I apologize if this question is trivial. My
goal is to import a map from openstreetmap and replace some intersections
with roundabouts. After importing a map to sumo, I followed this tutorial
https://sumo.dlr.de/docs/NETEDIT.html#converting_an_intersection_into_a_roundabout,
however when I right click the lanes it does not show the option ''split
edges in both directions''. I used osmWebWizard.py to obtain the xml; I am
not sure if that is the problem. 
Also as a side note, I saw a roundabout being programmed like so:
https://sumo.dlr.de/docs/Networks. What is the pro/cons of coding in the
roundabout compared to first method shown above. I was a little confused
about this. Thank you for the help.

/SUMO_Road_Networks.html#roundabouts 

 




--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] TRACI geo coordinates

2020-05-09 Thread nithin reddy
Thanks Jacob . The issue is I have written a code for this alredy but I am not 
getting that output in tripsout.xml file.
However if I print those coordinates I can print them on the console .
Any idea how I can print the output into a file.
If you have the working  code how I can put those coordinates could you please 
me to edit as I am not great with programming please.

Regards,
Nithin
“Not my Efforts, all by his Grace”
On 10 May 2020, 1:58 AM +0530, Jakob Erdmann , wrote:
> https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#coordinate_transformations
>
> > Am Sa., 9. Mai 2020 um 17:37 Uhr schrieb nithin reddy 
> > :
> > > Dear all,
> > >
> > > I would like to get the geo coordinates using Traci in SUMO. I am not 
> > > very good with programming so kindly request Somone to share the code to 
> > > convert the x,y coordinates to geo coordinates please.
> > >
> > > Regards,
> > > Nithin
> > > “Not my Efforts, all by his Grace”
> > > ___
> > > sumo-user mailing list
> > > sumo-user@eclipse.org
> > > To unsubscribe from this list, visit 
> > > https://www.eclipse.org/mailman/listinfo/sumo-user
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit 
> https://www.eclipse.org/mailman/listinfo/sumo-user
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] node-node route

2020-05-09 Thread Raheleh Zarei
Yes, I did. But this one, as you said may create trips with disconnected
routes.

On Sat, May 9, 2020 at 4:27 PM Jakob Erdmann  wrote:

> did you try this?
> python randomTrips.py -n RoutingSim1.net.xml -o test.trips.xml
> --juntion-taz
>
> Am Sa., 9. Mai 2020 um 17:08 Uhr schrieb Raheleh Zarei <
> raheleh.za...@gmail.com>:
>
>> I installed version 1.6.0. Then I copied randomTrips.py to my working
>> directory but it still creates edge-to-edge trips.
>> I attached the script I'm using to create random trips.
>>
>> On Fri, May 8, 2020 at 2:02 AM Jakob Erdmann 
>> wrote:
>>
>>> No. You can still get disconnected trips this way. If you need validated
>>> trips, then add option --validate
>>> However, I noticed that the combination of --junction-taz and --validate
>>> were not working as expected. It's fixed now but you will have to update
>>> sumo to todays version to make use of this.
>>>
>>> You can also replicate the validation by calling
>>> randomTrips.py -n RoutingSim1.net.xml  -r tmp.rou.xml
>>> duarouter -n RoutingSim1.net.xml -r tmp.rou.xm --ignore-route-errors
>>> --write-trips.junctions -o validated_junction_trips.xml
>>>
>>> Am Do., 7. Mai 2020 um 21:04 Uhr schrieb Raheleh Zarei <
>>> raheleh.za...@gmail.com>:
>>>
 Does it validate the route automatically?

 On Thu, May 7, 2020 at 1:54 PM Jakob Erdmann 
 wrote:

> your route output is overwriting your trip output.
> try
> python randomTrips.py -n RoutingSim1.net.xml -o test.trips.xml
> --juntion-taz
> then check whether the trips have the correct format
> The --route-file output will never contain fromJunction or toJunction
> because it contains vehicles rather than trips.
>
> Am Do., 7. Mai 2020 um 18:40 Uhr schrieb Raheleh Zarei <
> raheleh.za...@gmail.com>:
>
>> Hello Harald,
>>
>> I created a linux bash script, that creates random trips using
>> command below and run it from linux terminal on windows :
>>  python randomTrips.py -n ./RoutingSim1.net.xml -o
>> ./Trips$j/RoutingSim$i.rou.xml -e $j --junction-taz true   --route-file
>> ./Trips$j/RoutingSimRoute$i.rou.xml --validate true
>>
>> randomTrips.py that I call in this command, is the new installation
>> of SUMO (1.6) that I copied to my working directory folder in windows.
>> I don't get any error, but the output still is not correct. It
>> creates trips, from edge to edge instead of from junction to junction.
>>
>> Thanks,
>> Raheleh
>>
>>
>> On Thu, May 7, 2020 at 3:41 AM Harald Schaefer 
>> wrote:
>>
>>> Hi Raheleh,
>>>
>>> have you tried  --junction-taz without the value true?
>>>
>>> Does your SUMO version support --junction-taz (see output of "python
>>> randomTrips.py --help")?
>>>
>>> Greetings,
>>>
>>> Harald
>>> Am 06.05.20 um 19:35 schrieb Raheleh Zarei:
>>>
>>> I'm calling command below in Linux:
>>>
>>> python randomTrips.py -n ./net1.net.xml -o ./routing1.rou.xml -e 10
>>> --junction-taz true --route-file ./Tripstest
>>>
>>> But I get the following error:
>>>
>>> Error: On processing option '--junction-taz':
>>>  No option with the name 'junction-taz' exists.
>>>
>>> On Wed, May 6, 2020 at 1:12 PM Jakob Erdmann 
>>> wrote:
>>>
 You can use randomTrips option --junction-taz
 The metrics are still the same (all outgoing edges at the
 fromJunction are considered for departure and all incoming edges of the
 toJunction for arrival).

 Am Mi., 6. Mai 2020 um 18:42 Uhr schrieb Raheleh Zarei <
 raheleh.za...@gmail.com>:

> Hello,
>
> Thank you. I was wondering how I can use these options with
> randomtrips.py scripts? Because this is the way I generate random 
> trips.
> Also, if I use fromJuncation and toJunction, do the routing
> algorithms use different metrics for finding the shortest path?
>
> On Sun, May 3, 2020 at 5:34 PM Jakob Erdmann <
> namdre.s...@gmail.com> wrote:
>
>> Yes. Set option --junction-taz and then define trips with
>> attributes 'fromJunction' and 'toJunction'.
>>
>> Am Fr., 1. Mai 2020 um 01:00 Uhr schrieb Raheleh Zarei <
>> raheleh.za...@gmail.com>:
>>
>>>
>>> Hello
>>>
>>> I noticed in SUMO, trips, route, flows and etc, are from edge to
>>> edge, and based on the routing algorithm option, they return the 
>>> shortest
>>> path between those edges. Is there a way to make trips and other
>>> assignments model to work from node to node and return the shortest 
>>> path
>>> from a node to another node in the network?
>>>
>>> Thanks,
>>> Raheleh
>>>
>>> --
>>> *RAZ*
>>> 

Re: [sumo-user] TRACI geo coordinates

2020-05-09 Thread Jakob Erdmann
https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#coordinate_transformations

Am Sa., 9. Mai 2020 um 17:37 Uhr schrieb nithin reddy <
nithinredd...@gmail.com>:

> Dear all,
>
> I would like to get the geo coordinates using Traci in SUMO. I am not very
> good with programming so kindly request Somone to share the code to convert
> the x,y coordinates to geo coordinates please.
>
> Regards,
> Nithin
> “Not my Efforts, all by his Grace”
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] node-node route

2020-05-09 Thread Jakob Erdmann
did you try this?
python randomTrips.py -n RoutingSim1.net.xml -o test.trips.xml --juntion-taz

Am Sa., 9. Mai 2020 um 17:08 Uhr schrieb Raheleh Zarei <
raheleh.za...@gmail.com>:

> I installed version 1.6.0. Then I copied randomTrips.py to my working
> directory but it still creates edge-to-edge trips.
> I attached the script I'm using to create random trips.
>
> On Fri, May 8, 2020 at 2:02 AM Jakob Erdmann 
> wrote:
>
>> No. You can still get disconnected trips this way. If you need validated
>> trips, then add option --validate
>> However, I noticed that the combination of --junction-taz and --validate
>> were not working as expected. It's fixed now but you will have to update
>> sumo to todays version to make use of this.
>>
>> You can also replicate the validation by calling
>> randomTrips.py -n RoutingSim1.net.xml  -r tmp.rou.xml
>> duarouter -n RoutingSim1.net.xml -r tmp.rou.xm --ignore-route-errors
>> --write-trips.junctions -o validated_junction_trips.xml
>>
>> Am Do., 7. Mai 2020 um 21:04 Uhr schrieb Raheleh Zarei <
>> raheleh.za...@gmail.com>:
>>
>>> Does it validate the route automatically?
>>>
>>> On Thu, May 7, 2020 at 1:54 PM Jakob Erdmann 
>>> wrote:
>>>
 your route output is overwriting your trip output.
 try
 python randomTrips.py -n RoutingSim1.net.xml -o test.trips.xml
 --juntion-taz
 then check whether the trips have the correct format
 The --route-file output will never contain fromJunction or toJunction
 because it contains vehicles rather than trips.

 Am Do., 7. Mai 2020 um 18:40 Uhr schrieb Raheleh Zarei <
 raheleh.za...@gmail.com>:

> Hello Harald,
>
> I created a linux bash script, that creates random trips using command
> below and run it from linux terminal on windows :
>  python randomTrips.py -n ./RoutingSim1.net.xml -o
> ./Trips$j/RoutingSim$i.rou.xml -e $j --junction-taz true   --route-file
> ./Trips$j/RoutingSimRoute$i.rou.xml --validate true
>
> randomTrips.py that I call in this command, is the new installation of
> SUMO (1.6) that I copied to my working directory folder in windows.
> I don't get any error, but the output still is not correct. It creates
> trips, from edge to edge instead of from junction to junction.
>
> Thanks,
> Raheleh
>
>
> On Thu, May 7, 2020 at 3:41 AM Harald Schaefer 
> wrote:
>
>> Hi Raheleh,
>>
>> have you tried  --junction-taz without the value true?
>>
>> Does your SUMO version support --junction-taz (see output of "python
>> randomTrips.py --help")?
>>
>> Greetings,
>>
>> Harald
>> Am 06.05.20 um 19:35 schrieb Raheleh Zarei:
>>
>> I'm calling command below in Linux:
>>
>> python randomTrips.py -n ./net1.net.xml -o ./routing1.rou.xml -e 10
>> --junction-taz true --route-file ./Tripstest
>>
>> But I get the following error:
>>
>> Error: On processing option '--junction-taz':
>>  No option with the name 'junction-taz' exists.
>>
>> On Wed, May 6, 2020 at 1:12 PM Jakob Erdmann 
>> wrote:
>>
>>> You can use randomTrips option --junction-taz
>>> The metrics are still the same (all outgoing edges at the
>>> fromJunction are considered for departure and all incoming edges of the
>>> toJunction for arrival).
>>>
>>> Am Mi., 6. Mai 2020 um 18:42 Uhr schrieb Raheleh Zarei <
>>> raheleh.za...@gmail.com>:
>>>
 Hello,

 Thank you. I was wondering how I can use these options with
 randomtrips.py scripts? Because this is the way I generate random 
 trips.
 Also, if I use fromJuncation and toJunction, do the routing
 algorithms use different metrics for finding the shortest path?

 On Sun, May 3, 2020 at 5:34 PM Jakob Erdmann 
 wrote:

> Yes. Set option --junction-taz and then define trips with
> attributes 'fromJunction' and 'toJunction'.
>
> Am Fr., 1. Mai 2020 um 01:00 Uhr schrieb Raheleh Zarei <
> raheleh.za...@gmail.com>:
>
>>
>> Hello
>>
>> I noticed in SUMO, trips, route, flows and etc, are from edge to
>> edge, and based on the routing algorithm option, they return the 
>> shortest
>> path between those edges. Is there a way to make trips and other
>> assignments model to work from node to node and return the shortest 
>> path
>> from a node to another node in the network?
>>
>> Thanks,
>> Raheleh
>>
>> --
>> *RAZ*
>> ___
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> ___
> sumo-user 

[sumo-user] Defining Electric Vehicles

2020-05-09 Thread Radha Reddy
Hello,

I need to analyze the Electric Vehicles.

How I can define electric vehicles in TraCI (attached runner file)?



Please help me in this.

Regards
Radha
#!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2009-2019 German Aerospace Center (DLR) and others.
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v20.html
# SPDX-License-Identifier: EPL-2.0

# @filerunner.py
# @author  Lena Kalleske
# @author  Daniel Krajzewicz
# @author  Michael Behrisch
# @author  Jakob Erdmann
# @date2009-03-26
# @version $Id$

from __future__ import absolute_import
from __future__ import print_function

import os
import sys
import optparse
import random

# we need to import python modules from the $SUMO_HOME/tools directory
if 'SUMO_HOME' in os.environ:
tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
sys.path.append(tools)
else:
sys.exit("please declare environment variable 'SUMO_HOME'")

from sumolib import checkBinary  # noqa
import traci  # noqa


def generate_routefile():
random.seed(18)  # make tests reproducible
N = 2480  # number of time steps
# demand per second from different directions
pWE = 0.1
#pEW = 1. / 10
#pNS = 1. / 10
with open("data/cross.rou.xml", "w") as routes:
print("""
 








""", file=routes)
vehNr = 0
for i in range(N):
if random.uniform(0, 1) < pWE:
print('' % (
vehNr, i), file=routes)
vehNr += 1
if random.uniform(0, 1) < pWE:
print('' % (
vehNr, i), file=routes)
vehNr += 1
if random.uniform(0, 1) < pWE:
print('' % (
vehNr, i), file=routes)
vehNr += 1

if random.uniform(0, 1) < pWE:
print('' % (
vehNr, i), file=routes)
vehNr += 1
print("", file=routes)

# The program looks like this
#
# the locations of the tls are  NESW
#
#
#
#
#


def run():
"""execute the TraCI control loop"""
step = 0
# we start with phase 2 where EW has green
traci.trafficlight.setPhase("0", 0)
while traci.simulation.getMinExpectedNumber() > 0:
traci.simulationStep()

step += 1
traci.close()
sys.stdout.flush()


def get_options():
optParser = optparse.OptionParser()
optParser.add_option("--nogui", action="store_true",
 default=False, help="run the commandline version of 
sumo")
options, args = optParser.parse_args()
return options


# this is the main entry point of this script
if __name__ == "__main__":
options = get_options()

# this script has been called from the command line. It will start sumo as a
# server, then connect and run
if options.nogui:
sumoBinary = checkBinary('sumo')
else:
sumoBinary = checkBinary('sumo-gui')

# first, generate the route file for this simulation
generate_routefile()

# this is the normal way of using traci. sumo is started as a
# subprocess and then the python script connects and runs
traci.start([sumoBinary, "-c", "data/cross.sumocfg",
 "--tripinfo-output", "tripinfo.xml"])
run()
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


[sumo-user] TRACI geo coordinates

2020-05-09 Thread nithin reddy
Dear all,

I would like to get the geo coordinates using Traci in SUMO. I am not very good 
with programming so kindly request Somone to share the code to convert the x,y 
coordinates to geo coordinates please.

Regards,
Nithin
“Not my Efforts, all by his Grace”
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] node-node route

2020-05-09 Thread Raheleh Zarei
I installed version 1.6.0. Then I copied randomTrips.py to my working
directory but it still creates edge-to-edge trips.
I attached the script I'm using to create random trips.

On Fri, May 8, 2020 at 2:02 AM Jakob Erdmann  wrote:

> No. You can still get disconnected trips this way. If you need validated
> trips, then add option --validate
> However, I noticed that the combination of --junction-taz and --validate
> were not working as expected. It's fixed now but you will have to update
> sumo to todays version to make use of this.
>
> You can also replicate the validation by calling
> randomTrips.py -n RoutingSim1.net.xml  -r tmp.rou.xml
> duarouter -n RoutingSim1.net.xml -r tmp.rou.xm --ignore-route-errors
> --write-trips.junctions -o validated_junction_trips.xml
>
> Am Do., 7. Mai 2020 um 21:04 Uhr schrieb Raheleh Zarei <
> raheleh.za...@gmail.com>:
>
>> Does it validate the route automatically?
>>
>> On Thu, May 7, 2020 at 1:54 PM Jakob Erdmann 
>> wrote:
>>
>>> your route output is overwriting your trip output.
>>> try
>>> python randomTrips.py -n RoutingSim1.net.xml -o test.trips.xml
>>> --juntion-taz
>>> then check whether the trips have the correct format
>>> The --route-file output will never contain fromJunction or toJunction
>>> because it contains vehicles rather than trips.
>>>
>>> Am Do., 7. Mai 2020 um 18:40 Uhr schrieb Raheleh Zarei <
>>> raheleh.za...@gmail.com>:
>>>
 Hello Harald,

 I created a linux bash script, that creates random trips using command
 below and run it from linux terminal on windows :
  python randomTrips.py -n ./RoutingSim1.net.xml -o
 ./Trips$j/RoutingSim$i.rou.xml -e $j --junction-taz true   --route-file
 ./Trips$j/RoutingSimRoute$i.rou.xml --validate true

 randomTrips.py that I call in this command, is the new installation of
 SUMO (1.6) that I copied to my working directory folder in windows.
 I don't get any error, but the output still is not correct. It creates
 trips, from edge to edge instead of from junction to junction.

 Thanks,
 Raheleh


 On Thu, May 7, 2020 at 3:41 AM Harald Schaefer 
 wrote:

> Hi Raheleh,
>
> have you tried  --junction-taz without the value true?
>
> Does your SUMO version support --junction-taz (see output of "python
> randomTrips.py --help")?
>
> Greetings,
>
> Harald
> Am 06.05.20 um 19:35 schrieb Raheleh Zarei:
>
> I'm calling command below in Linux:
>
> python randomTrips.py -n ./net1.net.xml -o ./routing1.rou.xml -e 10
> --junction-taz true --route-file ./Tripstest
>
> But I get the following error:
>
> Error: On processing option '--junction-taz':
>  No option with the name 'junction-taz' exists.
>
> On Wed, May 6, 2020 at 1:12 PM Jakob Erdmann 
> wrote:
>
>> You can use randomTrips option --junction-taz
>> The metrics are still the same (all outgoing edges at the
>> fromJunction are considered for departure and all incoming edges of the
>> toJunction for arrival).
>>
>> Am Mi., 6. Mai 2020 um 18:42 Uhr schrieb Raheleh Zarei <
>> raheleh.za...@gmail.com>:
>>
>>> Hello,
>>>
>>> Thank you. I was wondering how I can use these options with
>>> randomtrips.py scripts? Because this is the way I generate random trips.
>>> Also, if I use fromJuncation and toJunction, do the routing
>>> algorithms use different metrics for finding the shortest path?
>>>
>>> On Sun, May 3, 2020 at 5:34 PM Jakob Erdmann 
>>> wrote:
>>>
 Yes. Set option --junction-taz and then define trips with
 attributes 'fromJunction' and 'toJunction'.

 Am Fr., 1. Mai 2020 um 01:00 Uhr schrieb Raheleh Zarei <
 raheleh.za...@gmail.com>:

>
> Hello
>
> I noticed in SUMO, trips, route, flows and etc, are from edge to
> edge, and based on the routing algorithm option, they return the 
> shortest
> path between those edges. Is there a way to make trips and other
> assignments model to work from node to node and return the shortest 
> path
> from a node to another node in the network?
>
> Thanks,
> Raheleh
>
> --
> *RAZ*
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
 ___
 sumo-user mailing list
 sumo-user@eclipse.org
 To unsubscribe from this list, visit
 https://www.eclipse.org/mailman/listinfo/sumo-user

>>>
>>>
>>> --
>>> *RAZ*
>>> ___
>>> sumo-user mailing list
>>> sumo-user@eclipse.org
>>> 

Re: [sumo-user] Geo-coordinates

2020-05-09 Thread nithinsrinivas
Can you please send the traci control loop used in the code . i am stuck with
geting the coordinates using traci



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user


Re: [sumo-user] #Sumolib #traci Conversion of X, Y co ordinates into Geo Co-ordinates (Longitude and Latitude)

2020-05-09 Thread nithinsrinivas
Dear Sir,

How did you obtain the code. Where did you add those x,y and lat,lon lines
of code in traci. kindly help





--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user