- what are the contents of run.sumo.cfg? possibly the network definition is
incorrect there.
- when using traci with sumo-gui you either have to start the simulation
manually by pressing the 'run' button or add the option --start when
executing --sumo-gui

2016-10-19 13:11 GMT+02:00 Phuong Nguyen <[email protected]>:

> ---------- Forwarded message ----------
> From: Phuong Nguyen <[email protected]>
> Date: Wed, Oct 19, 2016 at 12:08 PM
> Subject: Re: [sumo-user] Problem connecting with SUMO via TraCI/C++TraCIAPI
> To: Jakob Erdmann <[email protected]>
>
>
> Hi,
>
> Here is the code using to control SUMO from c++ program:
>
>     Client client;
>     system("sumo-gui -c ~/Downloads/TestTraci/run.sumo.cfg *--remote-port
> 8813*");
>     client.connect("localhost", 8813);
>     std::cout << "time in ms: " << client.simulation.getCurrentTime() <<
> "\n";
>     std::cout << "run 5 steps ...\n";
>     client.simulationStep(5 * 1000);
>     std::cout << "time in ms: " << client.simulation.getCurrentTime() <<
> "\n";
>     client.close();
>
> If I have option: *--remote-port 8813, *the result as follow:
> Loading configuration... done.
> ***Starting server on port 8813 ***
>
> and then SUMO can not load the net file. I attach the screen shot to the
> email. Can you please see the attachment and let me know how can I solve
> the problem?
> Furthermore, If I eliminate the option: *--remote-port 8813, *SUMO can load
> the net file as usual but we do not know the socket port to control SUMO.
>
> Thank you so much.
>
> Best regards,
>
> On Tue, Oct 4, 2016 at 8:49 AM, Jakob Erdmann <[email protected]>
> wrote:
>
> > Hello,
> > please make sure that run.sumo.cfg contains the line
> > <remote-port value="8813"/>
> >  (or add the option to the command that launches sumo)
> > regards,
> > Jakob
> >
> > 2016-09-30 15:15 GMT+02:00 Phuong Nguyen <[email protected]>:
> >
> >> Hi,
> >>
> >> I am trying to connect to SUMO from my program written by C++ using
> >> TraCI/C++TraCIAPI
> >>
> >> Paraments I am using as below:
> >>
> >> defFile = "run.sumo.cfg";
> >> outFileName = "testclient_out.txt";
> >> port = 8813;
> >> host = "localhost";
> >>
> >> However, when I run the program, I got error: #Error while connecting:
> >> tcpip::Socket::connect() @ connect: Connection refused
> >>
> >> Can you please help me?
> >>
> >> Best regards,
> >>
> >> --
> >> Ms. Phuong Thi Mai Nguyen
> >> PhD student, De Montfort University,
> >> Leicester, UK.
> >> Email: <email%[email protected]> [email protected]
> >>           [email protected]
> >> ------------------------------------------------------------
> >> ------------------
> >> _______________________________________________
> >> sumo-user mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/sumo-user
> >>
> >
> >
>
>
> --
> Ms. Phuong Thi Mai Nguyen
> PhD student, De Montfort University,
> Leicester, UK.
> Email: <email%[email protected]> [email protected]
>           [email protected]
>
>
>
>
>
> --
> Ms. Phuong Thi Mai Nguyen
> PhD student, De Montfort University,
> Leicester, UK.
> Email: <email%[email protected]> [email protected]
>           [email protected]
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
>
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to