1

When using sumo for simulation experiment, I need to add my own parameters to the vehicle.There are Vehicle Type Parameter Defaults such as width and length.But how can i customize the parameter i want to the vehicle and get the parameter through a function.

HHuuuu
  • 13
  • 3

1 Answers1

1

You can set and retrieve arbitrary parameters for vehicles (and even for edges, POIs and other elements). In the XML input you would use the syntax

<vehicle id=...>
    <param key="foo" value="bar"/>
</vehicle>

For traci and libsumo there are getParameter / setParameter functions.

Michael
  • 3,510
  • 1
  • 11
  • 23