michele-segata / plexe-pyapi

Python APIs to control Plexe models in SUMO
49 stars 14 forks source link

Change Car Following Model of Platoon #8

Closed TrinhTuanHung2021 closed 2 years ago

TrinhTuanHung2021 commented 2 years ago

Hello. I want to change the model of "vtypeauto" to another model. But when I switch the model is faulty. This type must not be changed right?

Error: tcpip::Socket::recvAndCheck @ recv: peer shutdown Quitting (on error).

michele-segata commented 2 years ago

Hi, if you want to use platooning functionalities, you need to use the MSCFModel_CC car following model which implements the automated driving control algorithms (ACC, CACCs, etc.). If you want to switch to a human behavioral model, you have the possibility to use the following API: https://github.com/michele-segata/plexe-pyapi/blob/2ebf3765be1d97eefde3895f5e927066fc21c009/plexe/plexe.py#L115

By choosing DRIVER as the controller parameter, you enable the Krauss car-following model for the car with vehicle id vid.