Re: [sumo-user] A question that I would like to post

2022-06-23 Thread Βασίλης Β
Thank you so much for your answer, and for all the help, I really
appreciate it! Have a good day and take care.

With respect and appreciation
Vasileios Volakakis

On Thu, Jun 23, 2022 at 12:16 AM Jakob Erdmann 
wrote:

> Hello,
> - you can adapt the speed of the vehicle (up or down) by calling
> traci.vehicle.slowDown(vehID, newSpeed, timeToReachNewSpeed)
> - you can obtain the state and distance of upcoming traffic lights with
> traci.vehicle.getNextTLS
> - you can find tutorials for traci use here:
> https://sumo.dlr.de/docs/Tutorials/index.html#traci_tutorials
> - and a lot of further code examples here:
> https://sumo.dlr.de/extractTest.php?path=complex/traci/vehicle
> - note, that SUMO also provides the functionality out-of-the-box (if you
> need something to compare your algorithm to):
> https://sumo.dlr.de/docs/Simulation/GLOSA.html
>
> regards,
> Jakob
>
> Am Mi., 22. Juni 2022 um 15:38 Uhr schrieb Βασίλης Β :
>
>> Greetings. I hope this email finds you well. My apologies for troubling
>> you with this email, but I could really use some help on the following, so
>> I would like to post the following question if that is ok with you.
>>
>> Title: "How to control and change the speed of a vehicle approaching a
>> traffic light at an intersection, based on the state of the traffic light
>> (e.g. if red, yellow or green) in a simple two-lane intersection with
>> traffic lights simulation"
>>
>> Main body: "I am new to SUMO, and I was trying to figure this out for a
>> long time on my own, but I am really stuck, although I know this is
>> probably very easy for someone with the proper knowledge. What I want to do
>> is to provide speed advice (coming from an algorithm that I have created)
>> to vehicles that are approaching a traffic light (e.g. if at a distance of
>> 300 meters from the light, the light is red, decelerate accordingly, or if
>> green, maintain current speed, etc.). I have created a simple simulation
>> with a fixed-phased traffic light intersection, with two lanes, with
>> vehicles being generated each some seconds with a given probability.
>> My guess is that I need to use TraCI for that, but I have failed to do so
>> so far, and I also searched for possible similar problems, but couldn't
>> find anything. Connecting my algorithm to the simulation and getting the
>> speed advice directly seems even more tricky for now, so if you can provide
>> some ideas on how I can give manually the "new" speeds of each vehicle
>> approaching the traffic light, that would be amazing! Thank you in advance
>> for your time and for reading all that, I really appreciate it."
>>
>> Thank you very much, I really appreciate your help! Have a good day and
>> take care.
>>
>> With respect and appreciation
>> Vasilis Volakakis
>> ___
>> 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] FCD Output

2022-06-23 Thread Jakob Erdmann
https://sumo.dlr.de/docs/Simulation/Output/FCDOutput.html#restricting_the_set_of_vehicles_that_generate_output


Am Do., 23. Juni 2022 um 10:54 Uhr schrieb Radha Reddy <
radha.reddy@gmail.com>:

> Sorry for asking.
>
> I have several traffic flow definitions, fn1, fn2, 
>
> I only need to export the FCD data for the vehicles that are generated
> under specific flow definitions, say fn1. Is this possible?
>
> Regards
> Radha
>
> On Thu, Jun 23, 2022 at 9:51 AM Jakob Erdmann 
> wrote:
>
>> see
>> https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#determine_why_the_traci_client_cannot_connect
>>
>> Am Do., 23. Juni 2022 um 10:24 Uhr schrieb Radha Reddy <
>> radha.reddy@gmail.com>:
>>
>>> Good Morning,
>>>
>>> There might be many answers regarding this query, but sorry for asking
>>> again.
>>>
>>> I wanted to get FCD out of *time, id, speed, pos, and lane* only, and
>>> for that, I gave the following command.
>>>
>>>
>>> *traci.start([sumoBinary, "-c", "data/intersection.sumocfg",
>>>  "--fcd-output.attributes time,id,speed,pos,lane",
>>> "file.xml"])*
>>> I am getting the following error:
>>> C:\Program Files (x86)\Eclipse\Sumo\tools\traci\main.py:159:
>>> UserWarning: Could not connect to TraCI server using port 55103 (TraCI
>>> server already finished). Retrying with different port.
>>>   warnings.warn(("Could not connect to TraCI server using port %s (%s)."
>>> +
>>> Traceback (most recent call last):
>>>   File "runner.py", line 89, in 
>>> traci.start([sumoBinary, "-c", "data/intersection.sumocfg",
>>>   File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\main.py", line
>>> 162, in start
>>> raise FatalTraCIError("Could not connect.")
>>> traci.exceptions.FatalTraCIError: Could not connect.
>>>
>>> Am I doing something wrong? I am not sure if I specify it correctly.
>>> Regards
>>> Radha
>>>
>>>
>>> ___
>>> 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
>
___
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] FCD Output

2022-06-23 Thread Radha Reddy
Sorry for asking.

I have several traffic flow definitions, fn1, fn2, 

I only need to export the FCD data for the vehicles that are generated
under specific flow definitions, say fn1. Is this possible?

Regards
Radha

On Thu, Jun 23, 2022 at 9:51 AM Jakob Erdmann  wrote:

> see
> https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#determine_why_the_traci_client_cannot_connect
>
> Am Do., 23. Juni 2022 um 10:24 Uhr schrieb Radha Reddy <
> radha.reddy@gmail.com>:
>
>> Good Morning,
>>
>> There might be many answers regarding this query, but sorry for asking
>> again.
>>
>> I wanted to get FCD out of *time, id, speed, pos, and lane* only, and
>> for that, I gave the following command.
>>
>>
>> *traci.start([sumoBinary, "-c", "data/intersection.sumocfg",
>>"--fcd-output.attributes time,id,speed,pos,lane",
>> "file.xml"])*
>> I am getting the following error:
>> C:\Program Files (x86)\Eclipse\Sumo\tools\traci\main.py:159: UserWarning:
>> Could not connect to TraCI server using port 55103 (TraCI server already
>> finished). Retrying with different port.
>>   warnings.warn(("Could not connect to TraCI server using port %s (%s)." +
>> Traceback (most recent call last):
>>   File "runner.py", line 89, in 
>> traci.start([sumoBinary, "-c", "data/intersection.sumocfg",
>>   File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\main.py", line
>> 162, in start
>> raise FatalTraCIError("Could not connect.")
>> traci.exceptions.FatalTraCIError: Could not connect.
>>
>> Am I doing something wrong? I am not sure if I specify it correctly.
>> Regards
>> Radha
>>
>>
>> ___
>> 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


[sumo-user] FCD Output

2022-06-23 Thread Radha Reddy
Good Morning,

There might be many answers regarding this query, but sorry for asking
again.

I wanted to get FCD out of *time, id, speed, pos, and lane* only, and for
that, I gave the following command.


*traci.start([sumoBinary, "-c", "data/intersection.sumocfg",
 "--fcd-output.attributes time,id,speed,pos,lane", "file.xml"])*
I am getting the following error:
C:\Program Files (x86)\Eclipse\Sumo\tools\traci\main.py:159: UserWarning:
Could not connect to TraCI server using port 55103 (TraCI server already
finished). Retrying with different port.
  warnings.warn(("Could not connect to TraCI server using port %s (%s)." +
Traceback (most recent call last):
  File "runner.py", line 89, in 
traci.start([sumoBinary, "-c", "data/intersection.sumocfg",
  File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\main.py", line 162,
in start
raise FatalTraCIError("Could not connect.")
traci.exceptions.FatalTraCIError: Could not connect.

Am I doing something wrong? I am not sure if I specify it correctly.
Regards
Radha
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user