Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Traci importing a new traffic light program

You have to load it as an additional file at simulation start, see https://sumo.dlr.de/docs/SUMO.html#format_of_additional_files

 

 

 

-----Original-Nachricht-----

Betreff: Re: [sumo-user] Traci importing a new traffic light program

Datum: 2019-10-24T11:47:27+0200

Von: "Roman, Charlotte" <C.D.Roman@xxxxxxxxxxxxx>

An: "Sumo project User discussions" <sumo-user@xxxxxxxxxxx>

 

 

 

I know that that is the correct function to use but I don't know how to use the program file as input.
 

Kind regards,

 

Charlotte

 

 

University of Warwick | MathSys CDT

 

From: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> on behalf of Jakob Erdmann <namdre.sumo@xxxxxxxxx>
Sent: Wednesday, October 23, 2019 4:50 PM
To: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Subject: Re: [sumo-user] Traci importing a new traffic light program
 
traci.trafficlight.setProgram

Am Mi., 23. Okt. 2019 um 16:56 Uhr schrieb Roman, Charlotte <C.D.Roman@xxxxxxxxxxxxx>:
I have written a program like that and saved it as a file, I'm just not sure how to call the program using traci.
 

Kind regards,

 

Charlotte

 

 

From: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> on behalf of Jakob Erdmann <namdre.sumo@xxxxxxxxx>
Sent: Wednesday, October 23, 2019 3:49 PM
To: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Subject: Re: [sumo-user] Traci importing a new traffic light program
 

Am Mi., 23. Okt. 2019 um 16:46 Uhr schrieb priyank soni <priyanksonigeca7@xxxxxxxxx>:
Write this piece of code in your script. 
Or read relevant values from external. xml 
file and feed here. 

On Wed 23 Oct, 2019, 7:58 PM Roman, Charlotte, <C.D.Roman@xxxxxxxxxxxxx> wrote:
Hi all,
 
I want to know how to load an additional file with a traffic light program to change just one of the traffic lights using traci. I have a network with 4 traffic lights in a grid and I want to change just one of them to a different program. I can't change it in the net file because I initialise the traffic light program separate to this. 
 
I want to do something like this:
 
newprogram = 'myfiles/differenttlprogram.xml'
 
traci.trafficlight.setProgram(tl_1, newprogram)
 
but I'm not sure how to get the syntax right for importing the additional file. Thanks for your help!
 
Kind regards,
 
Charlotte
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user


Back to the top