Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Different vehicle's distance results for different step-lenght

Hi,
unfortunately your assumptions on the calculations are wrong. Unless you activate --step-method.ballistic sumo will first calculate the new speed
v = v0 + a*dt and then assume this speed for the whole step
s = s0 + v*dt.

Best regards,
Michael

Am 25.09.20 um 20:12 schrieb nohtyp:
Hi,

How does distance is calculated for vehicle. I notice that for the same
configuration except step-lenght, I got different results.
I attached sumo xml files. When vehicle is created i set its speed to
maximum.

sumo version 1.7.0
These are the results for my test:

step-length 0.005
[0] speed:0, distance:0
[1] speed:2.6, distance:1.3065
[2] speed:5.2, distance:5.213
[3] speed:7.8, distance:11.7195
[4] speed:10.4, distance:20.826

step-length 0.05
[0] speed:0, distance:0
[1] speed:2.6, distance:1.365
[2] speed:5.2, distance:5.33
[3] speed:7.8, distance:11.895
[4] speed:10.4, distance:21.06

step-length 0.1
[0] speed:0, distance:0
[1] speed:2.6, distance:1.43
[2] speed:5.2, distance:5.46
[3] speed:7.8, distance:12.09
[4] speed:10.4, distance:21.32

I assume that speed and distance are calculated by V = V0 + at and s = s0 +
V0*t + a*t^2/2 equations.
a = 2.6
v(0) = 0, s(0) = 0 s(t) = at^2/2
v(1) = 2.6 (ok), s(1) = 2.6 / 2 = 1.3 (even for step-length = 0.005 the
result is different
v(2) = 5.2 (ok), s(2) = 2.6 * 4 / 2 = 5.2 (not ok)

Best wishes

rtest.xml
<http://sumo-user-mailing-list.90755.n8.nabble.com/file/t489/rtest.xml>
ntest.xml
<http://sumo-user-mailing-list.90755.n8.nabble.com/file/t489/ntest.xml>
test.sumocfg
<http://sumo-user-mailing-list.90755.n8.nabble.com/file/t489/test.sumocfg>



--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/
_______________________________________________
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