Hi Jakob,

Thank you so much for the prompt reply. I implemented it and it seems to
work. My apologies for not realising to use
traci.vehicle.setParkingAreaStop instead.

Thanks once again

Best Regards,
Nick Tan

On Thu, 9 Mar 2023 at 15:51, Jakob Erdmann <namdre.s...@gmail.com> wrote:

> instead of traci.vehicle.insertStop (which defines a stop on an edge) use
> traci.vehicle.setParkingAreaStop
> (or, set stop argument flags=traci.constant.STOP_PARKING_AREA)
>
> Am Do., 9. März 2023 um 03:24 Uhr schrieb Jojo Get <jojoget...@gmail.com>:
>
>> Hi everyone,
>>
>> SUMO Version: eclipse-sumo== 1.16.0.post676
>>
>> I am trying to dynamically assign an empty parking area to vehicles in an
>> attempt to have pedestrians walk towards the parking areas where they are
>> to be picked up from. I am currently spawning in the vehicles through TraCI
>> and inserting the stop into the vehicle's route.
>>
>> Below are the snippets of code used
>> traci.vehicle.add(vehID=f"coach_{batchNo}_{i}",routeID=routeID, typeID=
>> vehicleType) #Blue bus
>> traci.vehicle.insertStop(vehID=f"coach_{batchNo}_{i}", nextStopIndex=
>> boardingStopIndex, edgeID=boardingStopID, duration=30, flags=64)
>> traci.vehicle.setStopParameter(vehID=f"coach_{batchNo}_{i}",
>> nextStopIndex=boardingStopIndex,param="extension", value="2000")
>> traci.vehicle.setStopParameter(vehID=f"coach_{batchNo}_{i}",
>> nextStopIndex=boardingStopIndex,param="expected",value=passengerList)
>> traci.vehicle.setStopParameter(vehID=f"coach_{batchNo}_{i}",
>> nextStopIndex=boardingStopIndex,param="triggered",value="true")
>>
>> Inside the additionals file, I have also set rerouters to reroute the
>> vehicles to the next available empty parking area. However, as seen in the
>> image below, it does not seem that the blue vehicles which are spawned in
>> using TraCI, are able to get rerouted to the next available parking space.
>> If these vehicles are spawned in using the route demand file, it will work
>> as intended.
>>
>> [image: image.png]
>>
>> Hence, I wanted to check if this current behaviour is working as intended
>> as the stop I have assigned through TraCI for the blue vehicles is to be
>> the first parking area on the left and thus the blue vehicles will not get
>> rerouted to the other parking areas and instead wait for the space to be
>> free. I have also tried assigning different parking areas but it would seem
>> that they all behave in the same manner.
>>
>>
>> I would also like to check if it would be possible for vehicles spawned
>> in using TraCI to utilise the parking space instead of stopping on the edge
>> when assigned the parking area through traci.vehicle.insertStop().
>> Currently, the vehicles would stop on the edge where the parking area is
>> located rather than utilising the parking space as seen in the below image.
>> [image: image.png]
>>
>> Thank you so much for taking the time to read my email and for the help
>> in advance.
>>
>> Best Regards,
>> Nick Tan
>> _______________________________________________
>> sumo-user mailing list
>> sumo-user@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> _______________________________________________
> sumo-user mailing list
> sumo-user@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
sumo-user@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to