Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Performing simulation for sumo when time step = 20s via traci4matlab

the time parameter of traci.simulationStep uses milliseconds rather than seconds.
regards,
Jakob

2017-09-24 16:05 GMT+02:00 Lawrence Soon via sumo-user <sumo-user@xxxxxxxxxxxxxxxxxxxxx>:
Hi all,


I tried to perform traci simulation in every 20 seconds from 1s to 1001s via traci4matlab using the below codes in MATLAB , yet it wont work, the sumo simulation ends at 0s (not even started). I wish to run my code at 1s, 21s, 41s, 61s, ..., 1001s in MATLAB (only for codes), bu in SUMO, the simulation time to run per second basis in sumo. In other words, the SUMO runs every second, but I m collecting the data via my MATLAB codes in even 20 seconds.


How to make the code works?


for t=1:50      %Loop 50 times for ever 20 seconds
     traci.simulationStep(20);  %set timestep = 20s

     <something else>
end
traci.close();

Thank you

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
sumo-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user


Back to the top