The moveToXY method is useful if you have position data in x,y or lon,lat format. Assuming your scenario uses a known route without lane-changing, it would be sufficient to call traci.vehicle.setSpeed() during each time step. If you set the sumo option --step-method.ballistic the positions will then evolve exactly as in your dataset.
your traci script is basically a simple loop that iterates over your spreadsheet (i.e. after saving the speed column in plain text format) and calls setSpeed followed by traci.simulationStep() regards, Jakob 2018-02-14 20:54 GMT+01:00 Quinton Velcic <[email protected]>: > Hi, > > So if I were to have a data set similar to the data below, as well already > have a simple network, route and configuration file through NETEDIT. How > would I move a vehicle according to this data using TraCI, but without > having to re-define my network, route and configuration files in a Python > script as I've seen in examples from SUMO_HOME? > > I am just confused on where to begin. Do I begin to edit specific > parameters within constants.py to then be called in a script I have created > or can I simply define these parameters right away to get the results I > want? > > [image: Inline image 1] > > Thanks, > > Quinton > > > On Tue, Feb 13, 2018 at 2:23 AM, Jakob Erdmann <[email protected] > > wrote: > >> You can do this by remote controlling selected vehicles using the TraCI >> method 'traci.vehicle.moveToXY' (http://sumo.dlr.de/wiki/TraCI >> /Change_Vehicle_State#move_to_XY_.280xb4.29) >> >> regards, >> Jakob >> >> 2018-02-12 21:17 GMT+01:00 Quinton Velcic <[email protected]>: >> >>> Hi, >>> >>> I would like to know if there is anyway to use predefined vehicle >>> positions and speeds for each time frame as inputs instead of using routes? >>> >>> For example, within the simulation two vehicles will have speed and >>> position data that was already determined (what we want to be able >>> to define within SUMO) while a third vehicle will have a specified route >>> (route.file) that moves according to the IDM car-following model. >>> >>> The idea is to replicate external vehicle course files used in Vissim. >>> >>> Thanks, >>> >>> Quinton >>> >>> _______________________________________________ >>> 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 > >
_______________________________________________ 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
