Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the Vehicle Type #42

Open
Sid9993 opened this issue Mar 19, 2024 · 3 comments
Open

Changing the Vehicle Type #42

Sid9993 opened this issue Mar 19, 2024 · 3 comments

Comments

@Sid9993
Copy link

Sid9993 commented Mar 19, 2024

Hi Michele,
Can u just state how can we change the type of vehicles(based on length, speed etc.) in a platoon such that it consists of different types of vehicles and on which file should we modify the code?

@michele-segata
Copy link
Owner

You have to first define different SUMO vehicle types here. Simply copy-paste vtypeauto, give it another name (e.g., vtypetruck) and change its parameters. Then you will have to modify a traffic manager to inject this type of traffic. As you can see, the traffic manager for the platooning examples (PlatoonsTrafficManager) takes the vehicle type name as a parameter here, which means it only injects one type of vehicle presetting it in this point of the code. You would need to load a list of vehicle types and then change the vehicle type according to your rule before injecting the vehicle in the simulation, so here.

@Sid9993
Copy link
Author

Sid9993 commented Mar 19, 2024

You have to first define different SUMO vehicle types here. Simply copy-paste vtypeauto, give it another name (e.g., vtypetruck) and change its parameters. Then you will have to modify a traffic manager to inject this type of traffic. As you can see, the traffic manager for the platooning examples (PlatoonsTrafficManager) takes the vehicle type name as a parameter here, which means it only injects one type of vehicle presetting it in this point of the code. You would need to load a list of vehicle types and then change the vehicle type according to your rule before injecting the vehicle in the simulation, so here.

We created a new vehicle type in the freeway.rou.xml file but in the PlatoonTrafficManager.cc where should we load this newly defined vehicle type and what changes to make in that file else where? can u explain step by step?

@michele-segata
Copy link
Owner

I simply cannot explain you step by step what to do, that would basically mean implementing what you need for you and I do not have the material time. If I would do it for you I would need to do that for everyone else asking in this issue tracker. You should get familiar with the code and understand its behavior first, and then modify that to your purposes.
I can give you hints, I can't implement stuffs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants