what version of sumo are you using?
Also, please don't double-post your questions. There are already enough
mails on this list.

Am Di., 4. Juni 2019 um 16:35 Uhr schrieb Pratik Dutta <[email protected]
>:

> Hello everyone,
> I want to insert an vehicle to the network using the code
>
> traci.vehicle.add('X', rID, typeID='DEFAULT_VEHTYPE', depart='72',
> *departLane=int(1)*, departPos=str(tempPostion), departSpeed='0',
> arrivalLane="1", arrivalPos='max', arrivalSpeed='current', fromTaz='',
> toTaz='', line='', personCapacity=0, personNumber=0)
>
> but the error occured like this
>   tc.TYPE_STRING, len(val)) + str(val).encode("latin1")
>    TypeError: object of type 'int' has no len()
>
> then, i started debug, and found the code of traci._vehicle.add(.........)
> where there is a loop with variable name val, and that val content should
> be sring, hence the above error triggered.
>
> ------------------------------------------------------------------------------------------------
> So I decided to change the departLane to string, so the code would be like
>
> traci.vehicle.add('X', rID, typeID='DEFAULT_VEHTYPE', depart='72',
> *departLane='1'*, departPos=str(tempPostion), departSpeed='0',
> arrivalLane="1", arrivalPos='max', arrivalSpeed='current', fromTaz='',
> toTaz='', line='', personCapacity=0, personNumber=0)
>
> and the following error occurs,
> traci.exceptions.TraCIException: Invalid departlane definition for vehicle
> 'X'.
>
> ---------------------------------------------------------------------------------------------------
> the departLane should be within ("random", "free", "allowed", "best",
> "first", or an int>=0)
>
> so, what should be the exact code to insert a new vehicle to the network?
>
>
>
> *Regards,*
> Pratik Dutta
>
> _______________________________________________
> 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

Reply via email to