riebl / artery

OMNeT++ V2X simulation framework for ETSI ITS-G5
GNU General Public License v2.0
203 stars 129 forks source link

Suggestion and Guidance needed: Traffic simulation + Vanetza implementation. #281

Closed HuyTyskland closed 1 year ago

HuyTyskland commented 1 year ago

Hello everyone,

Currently, I am working with multi-lane platoons in a stable formation. I have two questions when working with Artery:

  1. Currently, the way I create traffics (platoon and non-platoon vehicles) is to define types of vehicles and instantiate those types into vehicles. That is good when the number of all vehicles are under 20. However, to create 100 vehicles or even varying traffic densities, such action is unwise. The vehicle file is here. Is there any way I can create and simulate, in a more convenient way, non-platoon traffic around my multi-lane platoon?

  2. I might be wrong when understanding as follow, but I see that in vanetza module, dcc is its submodule. On the other hand, I also see other .cc files implement dcc by including dcc components such as channel_probe_processor or state_machine. My aim is to implement dcc (the state machine and the cbr/cl measuring) into my scenario (similar to highway-police scenario). Right now, my code only uses dcc profile by include dcc/profile.hpp, simply like this. How should I understand this aspect correctly?

Sorry if my frequent posting annoys you guys. I guess future beginners, like me, might meet similar challenges when using this great framework, so these posts might help them.

Best regards, Huy Nguyen.

HuyTyskland commented 1 year ago

I think I figure something out about a part the second point:

  1. since vanetza is modulized and the car module from artery.inet.Car is equipped with vanetza as its submodule, by instantiating vehicles with type=artery.inet.car instead of self-defining a type myself, each vehicle has vanetza module in it.
  2. Given that the services.xml matches which type of vehicles using which services, while a vehicle network module (.ned) has vanetza as one of its submodules, that vehicle's service (.cc/.h) still needs to include file(.hpp) of dcc component to use dcc aspects.
  3. While methods (trigger(),indicate(),handleMessage() ) of my service regulate how each vehicle behave in sending/receiving packets, the vanetza module (.ned) in each vehicle module (.ned) will handle the dcc operation (e.g. FSM in each vehicle).

Am I correct at those points?

HuyTyskland commented 1 year ago

For my first point, I can figure out the way to do it. It is done by this instruction.

riebl commented 1 year ago

Regarding your second question, you can plug a custom DCC implementation into your simulation by providing a C++ class fulfilling the artery::IDccEntity interface along with its sibling artery.networking.IDccEntity module interface. Depending on the similarity of your DCC approach, you may want to inherit from existing DCC implementations or write your own from scratch.

HuyTyskland commented 1 year ago

Hello @riebl , thank you for your respond.

If I understand you correctly, I can write my own DCC implementation (in case I need a different DCC implementation) inheriting from IDccEntity (DCC implementation like DccEntityBase or a more detailed FsmDccEntity). If this part is correct, I will need this in the second phase of my thesis. In the first phase, I only work with standardized DCC implementation (the one from ETSI ITS document) which I believe is the module FsmDccEntity. Thus, I should use Vanetza module (which contains the FsmDccEntity).

I have another small question: Since I don't have a Car module (in artery/inet) equipped with Vanetza module, I have no idea how to implement Vanetza module into my scenario. Would you mind suggesting an idea on how to do that?. Right now, the vehicles in my scenario are created simply by .rou.xml file.

riebl commented 1 year ago

Yes, you should use the Vanetza.ned module. In fact, even with a completely customized DCC implementation I still recommend to use this module because you can override in omnetpp.ini which module implementation shall be used. FsmDccEntity is the default implementation, which is the reactive DCC approach described by ETSI.

The SUMO vehicles are managed by the traci.Manager module part of artery.inet.World. By default, every SUMO vehicle will automatically have a corresponding artery.inet.Car instance. You don't need to do anything for that.

HuyTyskland commented 1 year ago

Hello @riebl , Thank you very much for the clarification. I understand it more now.