My client program can not be web-based. So I am left with the first option and I am using C++ Traci API.
When using TraCI in multi-client mode, all clients have to connect at the beginning and all of them have to run at least a loop similar to while True: traci.simulationStep() According to document: "Please note that in multi client scenarios you must explicity specify the execution order of the clients using the SetOrder-command<http://sumo.dlr.de/wiki/TraCI/Control-related_commands#Command_0x03:_SetOrder>." Do I also have to do it here? If so how can I do it? I don't need my client to interfere with the simulation. I just want the simulation to run and the clients will get info as needed. Muktadir ________________________________ From: [email protected] <[email protected]> on behalf of Jakob Erdmann <[email protected]> Sent: Friday, September 7, 2018 5:19:58 PM To: Sumo project User discussions Subject: Re: [sumo-user] Getting information from simulated vehicle When using TraCI in multi-client mode, all clients have to connect at the beginning and all of them have to run at least a loop similar to while True: traci.simulationStep() Alternatively, you can use TraaS (TraCI as a Service) which acts as a single client and collects commands from an arbitrary number of web service clients and forwards them to sumo. (http://traas.sourceforge.net/cms/) TraaS is already part of sumo and can be found in sumo/bin. regards, Jakob 2018-09-07 13:12 GMT+02:00 Muktadir R Chowdhury (mrchwdhr) <[email protected]<mailto:[email protected]>>: Thanks for your reply. Ok I will upgrade my SUMO. According to this http://sumo.dlr.de/wiki/TraCI#V2X_simulation , "When started with the --remote-port <INT><http://sumo.dlr.de/wiki/Basics/Notation#Referenced_Data_Types> option, SUMO<http://sumo.dlr.de/wiki/SUMO> only prepares the simulation and waits for all external applications to connect and take over the control. ". That means client connected to SUMO is responsible for running the simulation. But, what I want to do is SUMO will run as soon as I issue the command "sumo --remote-port <INT> --num-clients <INT>". Then each client (correspond to a vehicle) will connect to SUMO and request some vehicle specific information (like current position etc.). Can you please give me a pointer on how can I do this? Muktadir ________________________________ From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> on behalf of Jakob Erdmann <[email protected]<mailto:[email protected]>> Sent: Friday, September 7, 2018 4:58:36 PM To: Sumo project User discussions Subject: Re: [sumo-user] Getting information from simulated vehicle Multi-client support is only available since version 0.31.0. I recommend upgrading to version 1.0.0, though. regards, Jakob 2018-09-07 12:56 GMT+02:00 Muktadir R Chowdhury (mrchwdhr) <[email protected]<mailto:[email protected]>>: How can I specify the number of clients when starting SUMO, I am using SUMO version 0.25 and it is saying "no option with the name 'num-clients' exists." Muktadir ________________________________ From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> on behalf of Jakob Erdmann <[email protected]<mailto:[email protected]>> Sent: Friday, September 7, 2018 4:19:59 PM To: Sumo project User discussions Subject: Re: [sumo-user] Getting information from simulated vehicle Yes, as long as you know the number of clients in advance. 2018-09-07 12:05 GMT+02:00 Muktadir R Chowdhury (mrchwdhr) <[email protected]<mailto:[email protected]>>: I want to achieve the following in SUMO: (1) SUMO will run in a specified port. Let's say there are "n" vehicles in the simulation. (2) SUMO will keep running while "n" client will connect to SUMO, and each client will print location information of each of the vehicles in regular interval. Is it possible to do? Muktadir Chowdhury _______________________________________________ sumo-user mailing list [email protected]<mailto:[email protected]> To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user _______________________________________________ sumo-user mailing list [email protected]<mailto:[email protected]> To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user _______________________________________________ sumo-user mailing list [email protected]<mailto:[email protected]> To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________ sumo-user mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user
