Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] How to controll multiple connections to the same sumo server efficiently.

Hello,
 That covers me.

Thank you for your time!

Quoting Jakob Erdmann <namdre.sumo@xxxxxxxxx>:

No, that is currently not supported. You will have to ensure that all
clients play along.
In fact, all clients should be structured around a loop as below:

while keepRunning():
   optionallyDoStuff()
   traci.simulationStep()

If you need to coordinate among the clients, you could use the getParameter
/ setParameter API  (e.g. on the ego vehicle, a POI or some other
pre-selected simulation object) to exchange arbitrary information.



2018-08-09 16:53 GMT+02:00 <cchadj01@xxxxxxxxxxxx>:

Hello,
 Thank your for the answer!
 I tried that and it indeed gives the turn to the other client,
 the other client freezes on the next traci command until control is
released.

 What if the client doesn't want to give up the turn and make a couple of
simulation
 steps without losing control?
 I think I could use  traci.SimulationStep(anyNumberOfSteps)but that
wouldn't allow me to dynamically change the state of the simulation (except
with the use
of listeners).
 Is there a way to make multiple single simulation steps without losing
control?

Thank you,
Tom



Quoting Jakob Erdmann <namdre.sumo@xxxxxxxxx>:

To give up the turn, the client can just call traci.simulationStep()

regards,
Jakob

2018-08-09 12:12 GMT+02:00 <cchadj01@xxxxxxxxxxxx>:

Hello,

 I have a Sumo server fire up from sumo-gui.exe from the command line
like
so:
 sumo-gui.exe -c simpgrid.sumocfg --remote-port 9999 --num-clients 2

 I have a client in python and I want to connect two of them at the same
server.
 I do so and set then the connection1.setOrder(1) for the first client
and
connection1.setOrder(2)
 for the second one.
 This works properly but I noticed that you can send a number of requests
from the first client
 and then the other clients just waits until it is its turn to send
requests.

 I was wondering if a client can give up its turn if it doesn't need to
send any requests at the
 given moment.
 I want to do this in order to send only some commands from the second
client and have the first
 client do most of the work.

Thanks,
Tom

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
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
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user





Back to the top