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.
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.