Thanks a lot for the reply Jakob. I am refactoring the Traci code to deal with the problem.
Regards, Shashank On Tue, Feb 4, 2014 at 1:34 AM, Jakob Erdmann <[email protected]>wrote: > Hello, > As far as I can, the type of parallelism you require is currently not > supported by traci. However you should be able to hack something up along > these lines: > def request_parallel(labels, fun, *args): > result = {} > for label in labels: > traci.switch(label) > result[label] = fun(*args) > return result > > and then call this like: > results = request_parallel(['a','b'], traci.vehicle.getSpeed, 'veh23') > > regards, > Jakob > > > 2014-02-01 shashank shekhar <[email protected]>: > >> Hi, >> >> I have a setup where I have to connect to multiple SUMO servers >> simultaneously. However, the TRACI python package is module based and does >> not allow multiple instances. There is an option to specify the label and >> we can switch between the connections using the label but that will happen >> serially. >> >> In my scenario, I am spawning multiple threads to connect to different >> SUMO >> servers, is there any mechanism that will allow me to connect and send >> requests to these servers in parallel? >> >> Regards, >> Shashank >> >> ------------------------------------------------------------------------------ >> WatchGuard Dimension instantly turns raw network data into actionable >> security intelligence. It gives you real-time visual feedback on key >> security issues and trends. Skip the complicated setup - simply import >> a virtual appliance and go from zero to informed in seconds. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk >> _______________________________________________ >> sumo-user mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/sumo-user >> > > ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
