Discussion:
[sumo-user] Connection to running SUMO simulation
Tim Jänicke
2016-06-07 11:14:02 UTC
Permalink
Hey all,
I was trying to connect to a running SUMO-Simulation via traci. My Code looks like this:
InetSocketAddress socket = new InetSocketAddress("139.25.55.81", remotePort);
SocketAddress socket1 = (SocketAddress) socket;
       
SumoTraciConnection conn = new SumoTraciConnection(socket1);conn.runServer();...

I insert the remote Port manually. There is no error-message or so. But I still don't have access to the simulation.
For example I can't display the amount of cars in the running simulation.Is the approach completely wrong or is there just a simple mistake ?
Than you very much for your help.

Greetings Tim
Jakob Erdmann
2016-06-07 11:55:25 UTC
Permalink
was the simulation started with the option --remote-port <yourPort> ?
Post by Tim Jänicke
Hey all,
InetSocketAddress socket = new InetSocketAddress("139.25.55.81", remotePort);
SocketAddress socket1 = (SocketAddress) socket;
SumoTraciConnection conn = new
SumoTraciConnection(socket1);conn.runServer();...
I insert the remote Port manually. There is no error-message or so. But I
still don't have access to the simulation.
For example I can't display the amount of cars in the running
simulation.Is the approach completely wrong or is there just a simple
mistake ?
Than you very much for your help.
Greetings Tim
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and
traffic
patterns at an interface-level. Reveals which users, apps, and protocols
are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
sumo-user mailing list
https://lists.sourceforge.net/lists/listinfo/sumo-user
Tim Jänicke
2016-06-07 12:12:08 UTC
Permalink
No, I started the simulation like this:
TraciConnection conn = new TraciConnection(sumo_bin, config_file);conn.addOption("step-length", "0.1");
conn.addOption("start", null);
conn.runServer();for (int i = 0; i<3600; i++) {
conn.do_timestep();
}
So this simulation is getting his port with the method findAvailablePort();
I look for the port via TCPViewer and insert it in the other code.
Greetings Tim



Jakob Erdmann <***@googlemail.com> schrieb am 14:01 Dienstag, 7.Juni 2016:


was the simulation started with the option --remote-port <yourPort> ?

2016-06-07 13:14 GMT+02:00 Tim Jänicke <***@yahoo.de>:

Hey all,
I was trying to connect to a running SUMO-Simulation via traci. My Code looks like this:
InetSocketAddress socket = new InetSocketAddress("139.25.55.81", remotePort);
SocketAddress socket1 = (SocketAddress) socket;
       
SumoTraciConnection conn = new SumoTraciConnection(socket1);conn.runServer();...

I insert the remote Port manually. There is no error-message or so. But I still don't have access to the simulation.
For example I can't display the amount of cars in the running simulation.Is the approach completely wrong or is there just a simple mistake ?
Than you very much for your help.

Greetings Tim
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
sumo-user mailing list
sumo-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sumo-user
Tim Jänicke
2016-06-07 12:53:15 UTC
Permalink
I'm using the sumo-gui

So the Simulation and the gui is already running and I want to insert vehicles with an external application.

Jakob Erdmann <***@googlemail.com> schrieb am 14:49 Dienstag, 7.Juni 2016:


are you using sumo or sumo-gui?

2016-06-07 13:55 GMT+02:00 Jakob Erdmann <***@googlemail.com>:

was the simulation started with the option --remote-port <yourPort> ?

2016-06-07 13:14 GMT+02:00 Tim Jänicke <***@yahoo.de>:

Hey all,
I was trying to connect to a running SUMO-Simulation via traci. My Code looks like this:
InetSocketAddress socket = new InetSocketAddress("139.25.55.81", remotePort);
SocketAddress socket1 = (SocketAddress) socket;
       
SumoTraciConnection conn = new SumoTraciConnection(socket1);conn.runServer();...

I insert the remote Port manually. There is no error-message or so. But I still don't have access to the simulation.
For example I can't display the amount of cars in the running simulation.Is the approach completely wrong or is there just a simple mistake ?
Than you very much for your help.

Greetings Tim
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
sumo-user mailing list
sumo-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sumo-user

Loading...