[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-dev] Regrading Retrieval of vtype parameter using traci
|
- From: <Maria.Armellini@xxxxxx>
- Date: Thu, 1 Apr 2021 11:21:10 +0000
- Accept-language: de-DE, en-US
- Delivered-to: sumo-dev@xxxxxxxxxxx
- Ironport-hdrordr: A9a23:4OWLVatB5Z19JROSOtkYKG1z7skCE4Mji2hD6mlwRA09T+Wxnc qjhele8BfyhioYVn1Io6HlBICrR3TA+ZlppawYOrm/VAfr0VHYS71Kx43k3jHmBmnC5vdQvJ 0QCZRWJdXsATFB7frSzxK/F78breWv0KftvuvGymcocAcCUdAE0y5cKiK2VnJ7XxNHA51RLu vg2uNiqyC7cXoaKuSXb0N1PNTrnNHAmJL4bRNuPXdOg2OzpAil57LgHx+T0g12aUIs/Z4Z7W PHnwblj5/Nj9iHywTR32KWz5NalMqJ8Lp+LfGMkcQcJ3HQjB+pbu1aNYGqgTZdmo2SwWdvtO OJgh87e+xv9nvafwiO0H3Q8jil9Axr1ljP5huzh2D5rcnwWTQgYvAx/L5xY1/e8EovvNZ1za JN0SaYrvNsfGv9tTW4+tyNTRZ2jA6vpWc6+NRj9EBibQ==
- Ironport-phdr: A9a23:3aqYQReFMjz+yB70o4Oe0AVIlGM+W97LVj590bIXzolWe6HmxazJe XLljd1ThVPEFb/W9+hDw7KP9fy5CCpZv83K6itKWacPfidNsd8RkQ0kDZzNImzAB9muURYHG t9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3wOgVvO+v6BJPZgdip2OCu4Z3TZBhDiCagbb9oI xi6sAHcutMLjYZjJKs9xQXFr3VVcOlK2G1kIk6ekQzh7cmq5p5j9CpQu/Ml98FeVKjxYro1Q 79FAjk4Km45/MLkuwXNQguJ/XscT34ZkgFUDAjf7RH1RYn+vy3nvedgwiaaPMn2TbcpWTS+6 qpgVRHlhDsbOzM/7WrajNF7gqBGrxK7vxFxw5DabpyJNPRwfa3dc9EVRWtdUcleTCFBB5+wb 4kVAuYdIepVrY/wrEYOoxukAgmsAfvixzhPiHDsx6060v4uHRva0Qw6GtIBrnDUrNH0NKcUU OC417THzTHZb/9MxDjy9pHFfxY8qv6DQbx+a9DeyVUzFwzblFWQr5ToMjCV2OkOvGWW4PZsW OGzh2M7qwx8viWiy8coh4TJiY8Z1lPJ+CV5zosrJtC0VlN2bMC6HZZOqiyXKpd6T90iTmxup S00xLoGuZuhcygLzpQq3wPQa/idc4SS/x3sSv6dITh5hHJ5eLK/mg29/VK8xe37U8m51ktBo CldktTUq3wBywbf5tWER/Zy5EutxDiC2gPJ5u1aPEw4jbfXJpw/zrIqiJYfrF7PEjL0lUj3l qOaa0Mp8fWy5ev9eLXpvJqcOpdxigH5L6shhNSyAf89MggSR2ib/vm81KH78U35XrpKivo2n 7HXvp7cK8oVqa63DQ9S3Igg7BixFSmq3MkXk3YGMl9JYhOHj471O1HUOv/0F+qwg1C2kDtx2 v/JIKXtApTLLnfdjLfsZatx51JGxAYuzt1S6IhYBqwPLf/wQEP9qsHUAgc8MwOuwubnDNt91 pkZWWKKGqKXN7ndsUWJ5u01OeWBeJUVuDPjJPgh4/7ujHk5mV4GcKa02ZsXcmq0Eel4LEmBe 3rjns8BEXsWvgo5VOHqk0CCUTtUZ3qrQq0z+C87BZm4AojfQoCtgaSB3DylEZFMYWBGEF+MQ j/UcNDQQOoJb2eeL9FJnzcAVKC6Rskmzx745yHgzL8yes/d4CwR87v50dVx4+zVlDk+8SYyA 8nLgDLFdH19gm5dH2x+56t4u0Eokj++
- Ironport-sdr: hvkSL60QHFp3wr0Bn5VjGFLH3tzSHjSFMdRp9dX0L+JfgE6kyA0Npivvwkie8uB+GTPVtTLlJu RmgEuSkEEYCg==
- List-archive: <https://www.eclipse.org/mailman/private/sumo-dev/>
- List-help: <mailto:sumo-dev-request@eclipse.org?subject=help>
- List-subscribe: <https://www.eclipse.org/mailman/listinfo/sumo-dev>, <mailto:sumo-dev-request@eclipse.org?subject=subscribe>
- List-unsubscribe: <https://www.eclipse.org/mailman/options/sumo-dev>, <mailto:sumo-dev-request@eclipse.org?subject=unsubscribe>
- Thread-index: AQHXJjSgSi034IKjYU+u8QFxntGeXKqfdfTw
- Thread-topic: [sumo-dev] Regrading Retrieval of vtype parameter using traci
Hi Shantanu,
I have tried it myself and saw that when you use .setParameter a new parameter is created. For example, when you call
traci.vehicletype.setParameter("c", "maxSpeed", '4.00'), you don’t change the maximum speed parameter, but a new parameter “param:maxSpeed” is created with that value (see picture). If you want to change the maximum speed, you can use
.setMaxSpeed(). See VehicleType_Value_Retrieval
and VehicleType_State.
As for the “i” and “d” parameters of your CF model, I think this is still under development, see
GitHub-Issue.
Regards,
Giuliana
Von: sumo-dev <sumo-dev-bounces@xxxxxxxxxxx> Im Auftrag von
SHANTANU PHANSE via sumo-dev
Gesendet: Mittwoch, 31. März 2021 15:49
An: sumo-dev@xxxxxxxxxxx
Cc: SHANTANU PHANSE <201911048@xxxxxxxxxxxx>
Betreff: [sumo-dev] Regrading Retrieval of vtype parameter using traci
Hello,
I have created a new car-following model in SUMO for practice.
rou.xml has vtype attribute as follows
<vType id = "c" departLane = "best" maxSpeed = "16.67" carFollowModel="W" d = "30" i = "12"/>
------------------------------------------------------------------------------------------------
I aim to change the vtype parameters of maxSpeed, i, d using traci.
The snippet of the code I am using is as follows
def run():
steps = 0
while steps < 1000:
traci.simulationStep()
steps+=1
if(steps == 5):
print(traci.vehicletype.getParameterWithKey("c", "d"))
print(traci.vehicletype.getParameterWithKey("c", "i"))
print(traci.vehicletype.getParameterWithKey("c", "maxSpeed"))
#set the parameters at step 1
if(steps == 10):
traci.vehicletype.setParameter('c', 'depth', '0')
traci.vehicletype.setParameter('c', 'intensity', '0')
traci.vehicletype.setParameter("c", "maxSpeed", '4.00')
Print statements Output is as follows:
('depth', '') #parameter name with empty string as value
('intensity', '')
('maxSpeed', '')
-------------------------------------------------------------------------------------------------------
Note: There is no change reflected in the sumo-GUI.
|
Attachment:
param_vType.PNG
Description: param_vType.PNG