0

I would like to konw if there is the possibility to access occupancy parameter by adding a function to the TraCICommandInterface.I've used the function 'traci.edge.getlaststepOccupancy()' in python.But ,when i use veins to do some v2x simulation ,i find that it lacked many functions. I am lack of c++ learning fundation. I can't help being thankful if someone could make an example for me.

I would like to know how to add the function 'traci.edge.getlaststepOccupancy()' to veins.

Decem
  • 1

1 Answers1

0

It is usually very easy to add another command. You add the constant to the TraCIConstants.h, a declaraion to src/veins/modules/mobility/traci/TraCICommandInterface.h and implementation to the respective cpp file, see for instance: https://github.com/sommer/veins/pull/219/files

Michael
  • 3,510
  • 1
  • 11
  • 23
  • Thanks a lot .I have found the constant of 'LAST_STEP_OCCUPANCY'. However, i have another question that you take the 'VAR_STREET_NAME' for example,i cant find it in my TraCIConstants.h.DId you write the constans by yourself? If so, how could i figure out the constans – Decem Mar 28 '23 at 10:46
  • The constants are here: https://github.com/eclipse/sumo/blob/main/src/libsumo/TraCIConstants.h – Michael Mar 28 '23 at 15:13