Coder Social home page Coder Social logo

Envmod usage about artery HOT 7 CLOSED

riebl avatar riebl commented on August 21, 2024
Envmod usage

from artery.

Comments (7)

riebl avatar riebl commented on August 21, 2024

The environment model is only enabled in the "envmod" configuration of the highway-police scenario, see

[Config envmod]
network = artery.envmod.World
*.traci.mapper.vehicleType = "artery.envmod.Car"

You should be able to run this configuration without modifications.

Side note:β€―This scenario has been created for the chapter about Artery in a soon-to-be-published book "Recent Advances in Network Simulation".

from artery.

rtobi avatar rtobi commented on August 21, 2024

Thanks for your reply!
Maybe I explained myself unclear: The highway-police scenario is running, and the option WITH_ENVMOD is enabled. Just I do not get where the environmental model is used at all, i.e., how I can use its information. Functions from PoliceServiceEnvmod are never called and it does not matter how the services-envmod.xml file looks like (I conclude from that, that it is not used at all).
If I change the PoliceService in services.xml to PoliceServiceEnvmod, then the initialization function is called, but no LocalEnvironmentModel can be found. As far as I understand, there is somewhere a mFacilities.register_const() needed, e.g., in src/artery/application/Middleware.cc, else the call in the initialization function of PoliceServiceEnvmod will fail...

from artery.

riebl avatar riebl commented on August 21, 2024

artery.envmod.Car is an artery.inet.Car with an additional LocalEnvironmentModel. This model registers itself at the middleware's facilities, see LocalEnvironmentModel::initialize.
I have just run the envmod configuration of highway-police and PoliceServiceEnvmod is working as intended on my system. I have verified this by setting a breakpoint in gdb: break PoliceServiceEnvmod.cc:20 if objects.size() > 0

from artery.

rtobi avatar rtobi commented on August 21, 2024

artery.envmod.Car is an artery.inet.Car with an additional LocalEnvironmentModel. This model registers itself at the middleware's facilities, see LocalEnvironmentModel::initialize.

ok thank you, that seems now to be clear.

I have just run the envmod configuration of highway-police and PoliceServiceEnvmod is working as intended on my system. I have verified this by setting a breakpoint in gdb: break PoliceServiceEnvmod.cc:20 if objects.size() > 0

I tried it with gdb and even with terminal outputs, but both functions are never called. So my question:
What do you mean by running the "envmod configuration of highway-police"? Do I have to set an additional parameter? Probably I missed something there...
I have attached a screenshot of the running example. From my point of view, both local and global environment are not initialized (localEnvironmentModule and globalEnvironmentModule):
highway-police

from artery.

riebl avatar riebl commented on August 21, 2024

You are not using the envmod configuration. Please select "envmod" from the drop-down box in the dialog shown at OMNeT++ GUI's startup.

from artery.

rtobi avatar rtobi commented on August 21, 2024

Many thanks @riebl for your fast support. Problem solved.
As I would like to work more with artery, is there a dedicated channel to discuss ongoing development, e.g., IRC?

from artery.

riebl avatar riebl commented on August 21, 2024

@rtobi Feel free join https://gitter.im/omnetpp for this purpose.

from artery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.