Re: [sumo-user] Vehicles not following Traffic Signal with traci.

2020-12-13 Thread Jakob Erdmann
The command  traci.vehicle.setSpeedMode(vehID,0) makes vehicles (among
other things) ignore right of way and traffic lights. Unfortunately, you
did not included this in your first question.

regards,
Jakob

Am Sa., 12. Dez. 2020 um 20:11 Uhr schrieb Shah Sultan <
syedshahsul...@gmail.com>:

> Roundabout.rar
> <
> http://sumo-user-mailing-list.90755.n8.nabble.com/file/t507/Roundabout.rar>
>
>
> The zipped folder containing all the relevant files of the model is
> attached
> for your consideration.
>
>
>
> --
> 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
>
___
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] Vehicles not following Traffic Signal with traci.

2020-12-12 Thread Shah Sultan
Roundabout.rar
  

The zipped folder containing all the relevant files of the model is attached
for your consideration. 



--
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] Vehicles not following Traffic Signal with traci.

2020-12-11 Thread Jakob Erdmann
If you provideyour scenario including the traci script and all files needed
to run it (zipped) then I will take a look.

Am Fr., 11. Dez. 2020 um 20:38 Uhr schrieb Shah Sultan <
syedshahsul...@gmail.com>:

> <
> http://sumo-user-mailing-list.90755.n8.nabble.com/file/t507/Screenshot1.png>
>
> <
> http://sumo-user-mailing-list.90755.n8.nabble.com/file/t507/Screenshot2.png>
>
> <
> http://sumo-user-mailing-list.90755.n8.nabble.com/file/t507/Errors_with_Traci.png>
>
>
> Attached are the screenshots of the model running with Traci. Actually none
> of my vehicles following traffic lights. Screenshot (Error with Traci) is
> showing the list of warning messages that I am receiving while running the
> model with Traci only. When I am running the model with sumo-gui directly,
> I
> am not getting any error messages, and my vehicles also following signal
> lights.
>
> I created my traffic signals manually through NETEDIT. Looking forward to
> hearing from you at your earliest.
>
>
>
> --
> 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
>
___
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] Vehicles not following Traffic Signal with traci.

2020-12-11 Thread Shah Sultan
 
 

 

Attached are the screenshots of the model running with Traci. Actually none
of my vehicles following traffic lights. Screenshot (Error with Traci) is
showing the list of warning messages that I am receiving while running the
model with Traci only. When I am running the model with sumo-gui directly, I
am not getting any error messages, and my vehicles also following signal
lights. 

I created my traffic signals manually through NETEDIT. Looking forward to
hearing from you at your earliest.



--
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] Vehicles not following Traffic Signal with traci.

2020-12-10 Thread Jakob Erdmann
- how did you create the traffic signals?
- are the traffic signals visible when running your simulation in sumo-gui
with traci?
- can you attach a screenshot of a vehicle that is violating a traffic
signal?

Am Do., 10. Dez. 2020 um 12:42 Uhr schrieb Shah Sultan <
syedshahsul...@gmail.com>:

> Thanks a lot for your reply.
>
> How can find if the problem is in xml file?  Actually, I use netconvert
> command as written below to generate my network file.
>
> "netconvert --osm-files oz.osm --output-file oz.net.xml --geometry.remove
> --roundabouts.guess --ramps.guess --junctions.join --tls.guess-signals
> --tls.discard-simple --tls.join"
>
> Through this netconvert command, my network was not showing traffic signals
> on any intersections (I don't know whether it should show or not). So I
> created some after generating trips and routes files. For the trips, I took
> help from randomTrips.py from Cmd, and for the routes, I used duarouter
> command.
>
>
>
> --
> 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
>
___
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] Vehicles not following Traffic Signal with traci.

2020-12-10 Thread Shah Sultan
Thanks a lot for your reply. 

How can find if the problem is in xml file?  Actually, I use netconvert
command as written below to generate my network file. 

"netconvert --osm-files oz.osm --output-file oz.net.xml --geometry.remove
--roundabouts.guess --ramps.guess --junctions.join --tls.guess-signals
--tls.discard-simple --tls.join"

Through this netconvert command, my network was not showing traffic signals
on any intersections (I don't know whether it should show or not). So I
created some after generating trips and routes files. For the trips, I took
help from randomTrips.py from Cmd, and for the routes, I used duarouter
command. 



--
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] Vehicles not following Traffic Signal with traci.

2020-12-09 Thread Jakob Erdmann
There is no good reason why this should ever be the case unless you are
using traci to override the junction model (doesn't appear in the listed
code) or sumoCmd is quite different from what you are running in sumo-gui
(i.e. sumoCmd is loading xml definitions where vehicles are explicitly
configured to violate traffic signals).


Am Di., 8. Dez. 2020 um 11:31 Uhr schrieb Shah Sultan <
syedshahsul...@gmail.com>:

> Hello everyone
>
> I am new with Traci. I am trying to run my model with that. What I am
> observing is that the vehicles in my models are not following traffic
> signals. On the other hand, with sumo-gui, they are completely following
> it.
> Am I missing something?
>
> import traci
> traci.start(sumoCmd)
> print("Starting SUMO")
> traci.gui.setSchema("View #0", "real world")
>
> step = 0
> while step < 3600:
> traci.simulationStep()
>
> vehicles=traci.vehicle.getIDList();
> if (step%10)==0: #every 10 sec
> for i in range(0,len(vehicles)):
> print("Speed ", vehicles[i], ": ",
> traci.vehicle.getSpeed(vehicles[i]), " m/s")
> print("CO2Emission by vehicle", vehicles[i], ": ",
> traci.vehicle.getCO2Emission(vehicles[i]), " mg/s")
> print("EdgeID of veh ", vehicles[i], ": ",
> traci.vehicle.getRoadID(vehicles[i]))
> print('Distance covered by vehicle', vehicles[i], ": ",
> traci.vehicle.getDistance(vehicles[i]), " m")
> print('Waiting time by vehicle', vehicles[i], ": ",
> traci.vehicle.getWaitingTime(vehicles[i]), " sec")
> step +=1
> traci.close()
>
>
>
> --
> 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
>
___
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user