> On Nov 21, 2016, at 5:39 AM, Green Mind <[email protected]> wrote: > > Thanks, but that doesn’t work unfortunately - still getting the same error.
Just curious: why are you bothering to modify the route? The stopped vehicle will behave the same no matter what the current remaining route might be. That would reduce your problem space to just getting the vehicle stopped. hth - Tom > > On Mon, Nov 21, 2016 at 2:15 PM, sumo.mahei <[email protected]> > wrote: > >> Hi, >> >> maybe it's because of the wrong lane number. >> >> traci.vehicle.getLaneID('13') >> lane_index = traci.vehicle.getLaneIndex('13') >> traci.vehicle.setRoute('13',['L14']) >> traci.vehicle.setStop('13','L14', laneIndex=lane_index) >> >> Best Marek Heinrich >> simoserv GmbH >> >> Am 21.11.2016 um 13:02 schrieb Green Mind: >> >>> I'm trying to make a vehicle stop where it is. I do this by checking the >>> vehicle's current edge, then modifying the route to contain only that >>> edge, >>> then add a stop in that edge. >>> >>> However, this throws an error. What am I doing wrong? >>> >>> traci.vehicle.getLaneID('13') >>>>>> >>>>> 'L14_2' >>> >>> traci.vehicle.setRoute('13',['L14']) >>>>>> traci.vehicle.setStop('13','L14') >>>>>> >>>>> Traceback (most recent call last): >>> File "<stdin>", line 1, in <module> >>> File "C:\Program Files (x86)\DLR\Sumo\tools\traci\_vehicle.py", line >>> 594, >>> in setStop >>> self._connection._sendExact() >>> File "C:\Program Files (x86)\DLR\Sumo\tools\traci\connection.py", line >>> 109, in _sendExact >>> raise TraCIException(prefix[1], _RESULTS[prefix[2]], err) >>> traci.exceptions.TraCIException: *Stop for vehicle '13' on lane 'L14_0' >>> is >>> not downstream the current route.* >>> >>> TIA >>> ------------------------------------------------------------ >>> ------------------ >>> _______________________________________________ >>> sumo-user mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/sumo-user >>> >> >> > ------------------------------------------------------------------------------ > _______________________________________________ > sumo-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sumo-user ------------------------------------------------------------------------------ _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
