Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Simulation Step TraCI call at time 0

I've tested revision 22948 and it does behave differently (just as you describe).
Please consider upgrading to 0.31.0 because the old version (including 0.30.0) does not conform to the spec.
regards,
Jakob



2017-09-29 9:38 GMT+02:00 Mani Amoozadeh <mamoozadeh@xxxxxxxxxxx>:

Ok, thanks!

I am using the SUMO code in revision 22948 (last update Feb 2017).

Can this cause a problem somehow?!

 

- Mani

 

 

From: Jakob Erdmann [mailto:namdre.sumo@googlemail.com]
Sent: Thursday, September 28, 2017 11:54 PM
To: Mani Amoozadeh <mamoozadeh@xxxxxxxxxxx>
Cc: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Subject: Re: [sumo-user] Simulation Step TraCI call at time 0

 

My previous statement was made after observing the following behavior in the python interpreter (running sumo with --step-length 0.5)



>>> traci.simulation.getCurrentTime()
0
>>> traci.simulationStep(0)
[]
>>> traci.simulation.getCurrentTime()
500
>>> traci.simulationStep(500)
[]
>>> traci.simulation.getCurrentTime()
500

When I run another test with the default step length, of course it looks different:
>>> traci.simulation.getCurrentTime()
0
>>> traci.simulationStep(0)
[]
>>> traci.simulation.getCurrentTime()
1000
>>> traci.simulationStep(500)
[]
>>> traci.simulation.getCurrentTime()
1000

If you observe something different please provide input files so I can reproduce your finding.

regards,

Jakob

 

 

2017-09-28 23:36 GMT+02:00 Mani Amoozadeh <mamoozadeh@xxxxxxxxxxx>:

 

 

> simulationStep(0) is indeed a special case:

> when you first start your simulation, getCurrentTime() returns 0, yet when you call

> simulationStep(0) it advances and thus getCurrentTime() returns 500.

 

 

> When you next call simulationStep(500) the simulation does not advance any further and

> getCurrentTime() remains at 500 (as per the wiki documentation)

 

Well, this is not what is happening at least in my own code!

When I call simulationStep(500) (after simulationStep(0)), getCurrentTime shows me 1000!

Can you please reproduce it yourself ?

 

 

- Mani

 

 

 



Back to the top