riebl / artery

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

Creating new scenarios in Artery #157

Open gsohan opened 3 years ago

gsohan commented 3 years ago

Hello,

I am facing issues while creating new scenarios and running in Artery. I can run the given scenarios in Artery without any issue. I created a new scenario in Artery and while running I faced a lot of issues (make file issue). I didnot find any documentation stating what changes I need to do in artery-build directory to run new scenarios. Can you please provide me information on how to modify cmake files in artery-build to run new scenarios in artery. Your suggestions will be very helpful.

Best

riebl commented 3 years ago

You have basically two options:

  1. Add your run configuration directly to scenarios/CMakeLists.txt. Youn can refer to line 38 add_opp_run(car2car-grid ...) for an example.
  2. Create a separate CMakeLists.txt for your scenario directory and add it via add_subdirectory. Your separate CMakeLists.txt then incorporates the add_opp_run calls. I recommend this option if you need more than a single add_opp_run line.

add_opp_run is adding the run and debug targets such as run_example. In the simplest case, add_opp_run(yours) provides run_yours which executes the omnetpp.ini configuration located in the same directory as the CMakeLists.txt. If the omnetpp.ini file is located somewhere else you can switch to that directory by passing the WORKING_DIRECTORY argument to add_opp_run.

I agree with you that those procedures need to be documented properly. Unfortunately, I have no time to do this right now.