Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Trucks not stopping at the ContainerStop using traci

There is a bug ( https://github.com/eclipse-sumo/sumo/issues/14459) that causes function setSpeed to override stopping behavior to some extent.
This is fixed in v1_19_0-1154

Am Mo., 4. März 2024 um 17:23 Uhr schrieb Hector A Martinez via sumo-user <sumo-user@xxxxxxxxxxx>:

Dear sumo community,

 

I am having trouble with getting my Trucks to stop at the ContainerStop when I use traci.vehicle.insertStop.

 

Here is my route creation:

<route id="O_D" edges="-1007481313#2 -784198482#1" />

 

Here is how I create the truck to use the route:

    def create_sumo_truck(self, truck):

        """

        Inject a new truck vehicle with a valid route ID into SUMO model.

        """

        self.log(f"creating traci truck {truck.name}")

        traci.vehicle.add(truck.name,

                          truck.journey[0],  # routeID must exist in rou.xml file

                          'truck',           # vtype truck_spec['vtype']

                          personCapacity=1)  # single-unit truck

        traci.vehicle.setSpeed(truck.name, 60)  # m/s Fast for testing

        traci.vehicle.insertStop(truck.name,0,'D-Truck-Stop-NW',duration=500,flags=traci.constants.STOP_CONTAINER_STOP)

 

My truck slows down when it gets to the stop but keeps going and it does the 500 second stop at the end of the edge rather than at the containerStop as I would like it to.

 

Any advice would be greatly appreciated.  Thanks,

 

Hector A. Martinez, P.E.

Transportation Researcher, Resilient Transportation and Logistics LTM

MITRE | National Security Engineering Center

813.207.5365

 

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top