Hi Jakob,
Thank you very mach! I have solved all my problems.

Best regards,
Zhiqiang

Jakob Erdmann <[email protected]> 于2018年7月11日周三 下午8:36写道:

> Possibly. Unless the error is caused by SUMO closing with an error before
> opening the socket.
> You can run multiple simulations on the same connection by using the
> function traci.load
> See http://sumo.dlr.de/daily/pydoc/traci.html#-load
>
> regards,
> Jakob
>
> 2018-07-11 14:34 GMT+02:00 胡志强 <[email protected]>:
>
>> Hi Jakob.
>> If I have the error"Could not connect to TraCI server at ..",will this be
>> solved by repeating the simulation in the same traci connection?If  yes
>> ,how?
>>
>> Best regards,
>> Zhiqiang
>>
>> Jakob Erdmann <[email protected]> 于2018年7月11日周三 下午6:52写道:
>>
>>> If you have the error "connection closed by SUMO" this would not be
>>> solved by repeating the simulation in the same traci connection. Diagnose
>>> it using logfiles as explained in my last email.
>>>
>>> 2018-07-11 12:29 GMT+02:00 胡志强 <[email protected]>:
>>>
>>>> Hi Jakob,
>>>> I have add the option numTries=100 to traci.start(),but the error is
>>>> still exist.Could you please tell me is there a approach to repeat my
>>>> simulation in the same traci ?Then ,I don't need to connect the server
>>>> again and again,my problem solved.
>>>>
>>>> Best regards,
>>>> Zhiqiang
>>>>
>>>> Jakob Erdmann <[email protected]> 于2018年7月11日周三 下午2:44写道:
>>>>
>>>>> the error "connection closed by SUMO"  indicates that an error ocurred
>>>>> on the SUMO side.
>>>>> If you create a log file for every sumo run you can look for the
>>>>> problem in the latest logfile:
>>>>>
>>>>> for i in range(20000):
>>>>>    traci.start([sumoBinary, "--start","-c", "data/cross.sumocfg",
>>>>>                           "--tripinfo-output", "tripinfo.xml", "log",
>>>>> str(i)])
>>>>>
>>>>>
>>>>> 2018-07-11 5:47 GMT+02:00 胡志强 <[email protected]>:
>>>>>
>>>>>> Hi Jakob,
>>>>>> Thank you,it works.But the problem is also exist,it retries for 101
>>>>>> times then closed and I'm sure that my computer's memory is enough.And I
>>>>>> also occurred the error that "connection closed by SUMO",If you want more
>>>>>> details,tell me.
>>>>>>
>>>>>> Best regards,
>>>>>> Zhiqiang
>>>>>>
>>>>>> Jakob Erdmann <[email protected]> 于2018年7月11日周三 上午1:13写道:
>>>>>>
>>>>>>> traci.start([sumoBinary, "--start","-c", "data/cross.sumocfg",
>>>>>>>                           "--tripinfo-output", "tripinfo.xml"],
>>>>>>> numTries=100)
>>>>>>>
>>>>>>>
>>>>>>> 2018-07-10 16:46 GMT+02:00 胡志强 <[email protected]>:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>> Could you please tell me how add the option numTries=100 to
>>>>>>>> traci.start()?
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Zhiqiang
>>>>>>>>
>>>>>>>> Jakob Erdmann <[email protected]> 于2018年7月10日周二 下午10:27写道:
>>>>>>>>
>>>>>>>>> - Possibly the simulation cannot start in time because the
>>>>>>>>> computer is still busy from closing the previous simulations. You 
>>>>>>>>> could add
>>>>>>>>> the option numTries=100 to traci.start() to diagnose this
>>>>>>>>> - Possibly, the simulation cannot start successfully because your
>>>>>>>>> computer is out of memory (which might indicate a memory leak in 
>>>>>>>>> sumo).
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2018-07-10 16:04 GMT+02:00 胡志强 <[email protected]>:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>> My SUMO version is 0.32.0,and I write a loop to simulate for many
>>>>>>>>>> times, I start SUMO like this:
>>>>>>>>>> for i in range(20000):
>>>>>>>>>>     traci.start([sumoBinary, "--start","-c", "data/cross.sumocfg",
>>>>>>>>>>                           "--tripinfo-output", "tripinfo.xml"])
>>>>>>>>>>     ...
>>>>>>>>>>     ...
>>>>>>>>>>     traci.close()
>>>>>>>>>> At the beginning,it works well,but it may disconnect with traci
>>>>>>>>>> and the time points is different.I don't know what's wrong.
>>>>>>>>>>
>>>>>>>>>> Menno van der Woude <[email protected]> 于2018年7月10日周二
>>>>>>>>>> 下午9:32写道:
>>>>>>>>>>
>>>>>>>>>>> Hi Zhiqiang,
>>>>>>>>>>>
>>>>>>>>>>> it could be helpful if you provide some more details:
>>>>>>>>>>> Under what circumstances does the connection fail? Do the
>>>>>>>>>>> circumstances
>>>>>>>>>>> during failure differ from before? Does it disconnect while it
>>>>>>>>>>> is
>>>>>>>>>>> connected, or not connect at all? Etc.
>>>>>>>>>>> Also, how are you starting SUMO, manually, programmatically? Etc.
>>>>>>>>>>>
>>>>>>>>>>> Greets, Menno
>>>>>>>>>>>
>>>>>>>>>>> On 10-7-2018 15:27, 胡志强 wrote:
>>>>>>>>>>> > At the beginning ,it works well,but some time later,it may
>>>>>>>>>>> disconnect
>>>>>>>>>>> > with the sever.So ,what's the possible reasons?
>>>>>>>>>>> >
>>>>>>>>>>> > Best regards,
>>>>>>>>>>> > Zhiqiang
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> >
>>>>>>>>>>> > Menno van der Woude <[email protected]
>>>>>>>>>>> > <mailto:[email protected]>> 于2018年7月10日周二 下午8:44写道:
>>>>>>>>>>> >
>>>>>>>>>>> >     Hi Zhiqiang,
>>>>>>>>>>> >
>>>>>>>>>>> >     it seems like SUMO is not running, since the the client
>>>>>>>>>>> cannot connect
>>>>>>>>>>> >     to the TCP server. Make sure you start SUMO with the
>>>>>>>>>>> --remote-port
>>>>>>>>>>> >     <INT>
>>>>>>>>>>> >     option as described here:
>>>>>>>>>>> http://sumo.dlr.de/wiki/TraCI#SUMO_startup.
>>>>>>>>>>> >
>>>>>>>>>>> >     If you need to simulate many runs, you will have to
>>>>>>>>>>> automate starting
>>>>>>>>>>> >     SUMO as well.
>>>>>>>>>>> >
>>>>>>>>>>> >     Greets,
>>>>>>>>>>> >
>>>>>>>>>>> >     Menno
>>>>>>>>>>> >
>>>>>>>>>>> >     On 10-7-2018 14:34, 胡志强 wrote:
>>>>>>>>>>> >      > Dear sumo-users:
>>>>>>>>>>> >      >          I am doing a traffic light program to optimize
>>>>>>>>>>> the
>>>>>>>>>>> >     timing of
>>>>>>>>>>> >      > traffic light by using Traci.But I met a problem,I need
>>>>>>>>>>> to
>>>>>>>>>>> >     simulate the
>>>>>>>>>>> >      > process again and again,then,I got this error:
>>>>>>>>>>> >      >
>>>>>>>>>>> >      > Could not connect to TraCI server at localhost:55141
>>>>>>>>>>> [Errno 111]
>>>>>>>>>>> >      > Connection refused
>>>>>>>>>>> >      >   Retrying in 2 seconds
>>>>>>>>>>> >      > Could not connect to TraCI server at localhost:55141
>>>>>>>>>>> [Errno 111]
>>>>>>>>>>> >      > Connection refused
>>>>>>>>>>> >      >   Retrying in 3 seconds
>>>>>>>>>>> >      > Could not connect to TraCI server at localhost:55141
>>>>>>>>>>> [Errno 111]
>>>>>>>>>>> >      > Connection refused
>>>>>>>>>>> >      >   Retrying in 4 seconds
>>>>>>>>>>> >      > Could not connect to TraCI server at localhost:55141
>>>>>>>>>>> [Errno 111]
>>>>>>>>>>> >      > Connection refused
>>>>>>>>>>> >      >   Retrying in 5 seconds
>>>>>>>>>>> >      > Could not connect to TraCI server at localhost:55141
>>>>>>>>>>> [Errno 111]
>>>>>>>>>>> >      > Connection refused
>>>>>>>>>>> >      >   Retrying in 6 seconds
>>>>>>>>>>> >      > Could not connect to TraCI server at localhost:55141
>>>>>>>>>>> [Errno 111]
>>>>>>>>>>> >      > Connection refused
>>>>>>>>>>> >      >   Retrying in 7 seconds
>>>>>>>>>>> >      > Could not connect to TraCI server at localhost:55141
>>>>>>>>>>> [Errno 111]
>>>>>>>>>>> >      > Connection refused
>>>>>>>>>>> >      >   Retrying in 8 seconds
>>>>>>>>>>> >      > Could not connect to TraCI server at localhost:55141
>>>>>>>>>>> [Errno 111]
>>>>>>>>>>> >      > Connection refused
>>>>>>>>>>> >      >   Retrying in 9 seconds
>>>>>>>>>>> >      > Could not connect to TraCI server at localhost:55141
>>>>>>>>>>> [Errno 111]
>>>>>>>>>>> >      > Connection refused
>>>>>>>>>>> >      >   Retrying in 10 seconds
>>>>>>>>>>> >      > Could not connect to TraCI server at localhost:55141
>>>>>>>>>>> [Errno 111]
>>>>>>>>>>> >      > Connection refused
>>>>>>>>>>> >      > Traceback (most recent call last):
>>>>>>>>>>> >      >    File "main.py", line 78, in <module>
>>>>>>>>>>> >      >      train(RL_natural)
>>>>>>>>>>> >      >    File "main.py", line 26, in train
>>>>>>>>>>> >      >      observation = env.reset()
>>>>>>>>>>> >      >    File
>>>>>>>>>>> >      >
>>>>>>>>>>> >
>>>>>>>>>>>  
>>>>>>>>>>> "/home/huzhiqiang/traffic-signal-control/traci_tls_PER_8s_lr0.00025/trafficlight_env.py",
>>>>>>>>>>> >
>>>>>>>>>>> >      > line 110, in reset
>>>>>>>>>>> >      >      "--tripinfo-output", "tripinfo.xml"])
>>>>>>>>>>> >      >    File
>>>>>>>>>>> "/home/huzhiqiang/sumo/tools/traci/__init__.py", line 86,
>>>>>>>>>>> >     in start
>>>>>>>>>>> >      >      _connections[label] = connect(port, numRetries,
>>>>>>>>>>> "localhost",
>>>>>>>>>>> >      > sumoProcess)
>>>>>>>>>>> >      >    File
>>>>>>>>>>> "/home/huzhiqiang/sumo/tools/traci/__init__.py", line 64,
>>>>>>>>>>> >     in connect
>>>>>>>>>>> >      >      raise FatalTraCIError("Could not connect in %s
>>>>>>>>>>> tries" %
>>>>>>>>>>> >     (numRetries
>>>>>>>>>>> >      > + 1))
>>>>>>>>>>> >      > traci.exceptions.FatalTraCIError: Could not connect in
>>>>>>>>>>> 11 tries
>>>>>>>>>>> >      >
>>>>>>>>>>> >      > How can I fix it?
>>>>>>>>>>> >      >
>>>>>>>>>>> >      > Best regards,
>>>>>>>>>>> >      > Zhiqiang
>>>>>>>>>>> >      >
>>>>>>>>>>> >      >
>>>>>>>>>>> >      >
>>>>>>>>>>> >      > _______________________________________________
>>>>>>>>>>> >      > sumo-user mailing list
>>>>>>>>>>> >      > [email protected] <mailto:[email protected]>
>>>>>>>>>>> >      > 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
>>>>>>>>>>> >     [email protected] <mailto:[email protected]>
>>>>>>>>>>> >     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
>>>>>>>>>>> > [email protected]
>>>>>>>>>>> > 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
>>>>>>>>>>> [email protected]
>>>>>>>>>>> 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
>>>>>>>>>> [email protected]
>>>>>>>>>> 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
>>>>>>>>> [email protected]
>>>>>>>>> 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
>>>>>>>> [email protected]
>>>>>>>> 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
>>>>>>> [email protected]
>>>>>>> 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
>>>>>> [email protected]
>>>>>> 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
>>>>> [email protected]
>>>>> 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
>>>> [email protected]
>>>> 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
>>> [email protected]
>>> 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
>> [email protected]
>> 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
> [email protected]
> 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
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user

Reply via email to