Thanks a lot.
Now I have two python scripts as client1.py (
https://gist.github.com/chunkypilu/eeee879cceef61c4a849d4c46ad48824) and
client2.py (
https://gist.github.com/chunkypilu/eeee879cceef61c4a849d4c46ad48824) , both
dealing with same simulation "atcs2.sumocfg".
I want to start simulation for infinite times (while 1:), but after 1
simulation my client2.py gives following error and terminates::
Traceback (most recent call last):
File "client2.py", line 57, in <module>
traci.init(PORT)
File "/usr/share/sumo/tools/traci/__init__.py", line 72, in init
return getVersion()
File "/usr/share/sumo/tools/traci/__init__.py", line 157, in getVersion
return _connections[""].getVersion()
File "/usr/share/sumo/tools/traci/connection.py", line 289, in getVersion
result = self._sendExact()
File "/usr/share/sumo/tools/traci/connection.py", line 92, in _sendExact
self._socket.send(length + self._string)
ConnectionResetError: [Errno 104] Connection reset by peer
Can you please check, where I am wrong.
Regards,
Priyank Soni
On Thu, Sep 12, 2019 at 12:11 PM Jakob Erdmann <[email protected]>
wrote:
> see
>
> https://sumo.dlr.de/oldwiki/TraCI/Interfacing_TraCI_from_Python#Controlling_parallel_simulations_from_the_same_TraCI_script
>
> https://sumo.dlr.de/oldwiki/TraCI/Interfacing_TraCI_from_Python#Controlling_the_same_simulation_from_multiple_clients
>
>
> Am Mi., 11. Sept. 2019 um 12:08 Uhr schrieb priyank soni <
> [email protected]>:
>
>> Can I get an example code as I am not getting it clearly even after doing
>> a lot of google search ?
>>
>> Regards,
>> Priyank Soni
>>
>> On Wed, Sep 11, 2019 at 12:32 PM Jakob Erdmann <[email protected]>
>> wrote:
>>
>>> If you are using a single python process with multiple threads this
>>> should work just fine (traci is thread-safe).
>>> If you wish to use multiple python process, you can connect each of them
>>> as a client (see https://sumo.dlr.de/docs/TraCI.html#multiple_clients)
>>>
>>> Am Mi., 11. Sept. 2019 um 07:28 Uhr schrieb priyank soni <
>>> [email protected]>:
>>>
>>>> Hi All,
>>>>
>>>> I am simulating a network with two junctions having traffic lights, I
>>>> want to give commands from separate python thread to each of the junction
>>>> of same simulation , is it possible ?
>>>>
>>>> Regards,
>>>> Priyank Soni
>>>>
>>>> _______________________________________________
>>>> sumo-user mailing list
>>>> [email protected]
>>>> To change your delivery options, retrieve your password, or unsubscribe
>>>> from this list, visit
>>>> https://www.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://www.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://www.eclipse.org/mailman/listinfo/sumo-user