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<https://sumo.dlr.de/docs/TraCI/VehicleType_Value_Retrieval.html> and VehicleType_State<https://sumo.dlr.de/docs/TraCI/Change_VehicleType_State.html>. As for the “i” and “d” parameters of your CF model, I think this is still under development, see GitHub-Issue<https://github.com/eclipse/sumo/issues/6932>.
Regards, Giuliana Von: sumo-dev <sumo-dev-boun...@eclipse.org> Im Auftrag von SHANTANU PHANSE via sumo-dev Gesendet: Mittwoch, 31. März 2021 15:49 An: sumo-dev@eclipse.org Cc: SHANTANU PHANSE <201911...@daiict.ac.in> 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 #get the parameters 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. Thanks and Regards Shantanu Phanse
_______________________________________________ sumo-dev mailing list sumo-dev@eclipse.org To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-dev