Perfect! That solved my problem.
Sorry that I missed this part in the wiki.
Thank you Jakob

-- 

*Simon Chauvin*

*(Machine Learning Engineer)*



E.S.R.Labs AG

Phone: +49 151 44036356

E-mail: [email protected]

www.esrlabs.com



Sitz der Gesellschaft: Balanstr. 73, Haus 10, 3. OG, 81541 München

Vorstand: Wolfgang Köcher, Gerd Schäfer

Vorsitzender des Aufsichtsrats: Dr. Wolfgang Linder

Amtsgericht München, HRB 215081, USt-ID: DE282185835



This message (including any attachments) contains confidential information
intended for a specific individual or entity as the intended recipient. If
you are not the intended recipient, you are hereby notified that any
distribution, any copying of this message in part or in whole, or any
taking of action based on it, is strictly prohibited by law and may cause
liability. In case you have received this message due to an error in
transmission, we ask you to notify the sender immediately.

On 18 April 2018 at 14:35, Jakob Erdmann <[email protected]> wrote:

> Hello,
> it is documented now: http://sumo.dlr.de/wiki/TraCI/
> Change_Vehicle_State#Vehicle_insertion
>
> regards,
> Jakob
>
> 2018-04-18 13:48 GMT+02:00 Simon Chauvin <[email protected]>:
>
>> ​
>> ​Hi,
>> I am new with sumo and TraCI
>> At some point, I would like to create​ a new vehicle using
>> traci.vehicle.addFull()
>>
>> Here is my function:
>>
>> def add_new_vehicle():
>>         print("vehicle list BEFORE{}".format(traci.vehicle.getIDList()))
>>         traci.vehicle.addFull(
>>             vehID="new_veh",
>>             typeID="passenger",
>>             routeID="route0"
>>         )
>>         print("vehicle list AFTER={}".format(traci.vehicle.getIDList()))
>>
>>
>> ​When running my function "add_new_vehicle()", the same list​ is printed
>> twice. In other words, the ID of the new vehicle does not appear in the
>> second getIDList(). No error is prompted.
>>
>> It seems "new_veh" has successfully be created: I can then retrieve some
>> values such as its speed. In addition, when I try to call my function a
>> second time, it prompts "traci.exceptions.TraCIException: The vehicle
>> new_veh to add already exists."
>>
>> As I understand, I managed to create a new vehicle.
>> ---> But why cannot I see it when calling getIDList() or getIDCount()?
>> ---> ​Should I reload something?​
>>
>> ​In the wiki + mail-list, I could not find any reason for that. Any
>> further help with this would be greatly appreciated.
>>
>> Thanks for your time!
>> Cheers,
>> Simon
>>
>> ​ ​
>>
>>
>> _______________________________________________
>> 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