Hi,
I could not find anything problematic in your TraCI code excerpt with
respect to the SUMO config. I executed the TraCI commands with success
(using SUMO developer version). Do you add more than one route? Then be
sure to choose a unique ID.
Best regards
Mirko
-----Original-Nachricht-----
Betreff: [sumo-user] ADD VEHICLE AND ROUTES
Datum: 2022-10-14T12:33:20+0200
Von: "Tuğba Evci" <[email protected]>
An: "[email protected]" <[email protected]>
Hİ,
I am new to SUMO and Traci so I get a lot of errors in my work. I don't
think the tutorials on Sumo's website are detailed enough. So I hope you
can help me.
I am trying to add vehicle and route using traci library. However I don't
know if I need to make any changes to the XML files in this work that I
want to do. For this reason, I am sending you the XML files as well. You
can find the files attached to this email.
I couldn't find the cause of the error. I found posts on the internet
stating that several people were getting the same error, but I coludn't
find a post with the results.You can see the codes and the errors below.
Thanks in advance for your help
traci.route.add("trip",['2_0', '3_1'])
traci.vehicle.add("1", "trip", typeID="reroutingType")
Traceback (most recent call last):
File "c:\Users\Admin\Desktop\kilis7903\tracidqn.py", line 81, in <module>
run()
File "c:\Users\Admin\Desktop\kilis7903\tracidqn.py", line 53, in run
traci.route.add("trip",['2_0', '3_1'])
File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\_route.py", line
43, in add
self._setCmd(tc.ADD, routeID, "l", edges)
File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\domain.py", line
162, in _setCmd
self._connection._sendCmd(self._cmdSetID, varID, objectID, format,
*values)
File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\connection.py",
line 185, in _sendCmd
return self._sendExact()
File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\connection.py",
line 102, in _sendExact
raise TraCIException(err, prefix[1], _RESULTS[prefix[2]])
traci.exceptions.TraCIException: Could not add route 'trip'.
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user