在多种车辆类型中具有多种用途的静脉 [英] Veins Multiple Applications in multiples Vehicle types

查看:55
本文介绍了在多种车辆类型中具有多种用途的静脉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我使用OMNeT ++,Veins和SUMO进行的模拟中,我想根据其车辆类型运行多个应用程序,如使用type="XXX"

in my simulation using OMNeT++, Veins, and SUMO i want run multiple applications according to their vehicle type, as specified in the .rou.xml file using type="XXX"

例如:

  • <vehicle ... type="private" ... >运行APP_private(使用类似*.node[*].applType ="APP_private"的东西)
  • <vehicle ... type="bus" ... >运行APP_bus(使用类似*.node[*].applType ="APP_bus"的东西)
  • <vehicle ... type="private" ... > runs APP_private (using something like *.node[*].applType ="APP_private")
  • <vehicle ... type="bus" ... > runs APP_bus (using something like *.node[*].applType ="APP_bus")

如何在omnetpp.ini中定义它?

推荐答案

Vinins 4.6允许您将moduleTypemoduleNamemoduleDisplayString参数中的任意一个或全部设置为一个字符串(这将设置OMNeT ++模块类型,模块名称和模块显示字符串,分别针对所配置的感兴趣区域中的每个车辆进行实例化):

Veins 4.6 allows you to set any or all of the moduleType, moduleName, and moduleDisplayString parameters not just to a string (which will set the OMNeT++ module type, module name, and module display string to instantiate for every vehicle driving in the configured region of interest, respectively):

您还可以将moduleTypemoduleNamemoduleDisplayString参数设置为Veins所说的

You can also set the moduleType, moduleName, and moduleDisplayString parameters to what Veins calls a mapping. This will use different parameter values for different SUMO vehicle types.

完整细节可在源代码中找到

The full details can be found in the source code here or on the Veins website. Here's the short version:

  • "a":将值"a"分配给所有节点(为了向后兼容)
  • "a=b:将值"b"分配给车辆类型"a".仿真中是否存在其他任何车辆类型都会导致仿真停止
  • "a=b c=d:将值"b"分配给车辆类型"a",将"d"分配给"c".仿真中是否存在其他任何车辆类型都会导致仿真停止
  • "a=b c=d *=e":不属于车辆类型"a""b"的所有东西,分配值"e"
  • "a" : assign value "a" to all nodes (for backward compatibility)
  • "a=b : assign value "b" to vehicle type "a". the presence of any other vehicle type in the simulation will cause the simulation to stop
  • "a=b c=d : assign value "b" to vehicle type "a" and "d" to "c". the presence of any other vehicle type in the simulation will cause the simulation to stop
  • "a=b c=d *=e": everything which is not of vehicle type "a" or "b", assign value "e"

模块类型"0"表示不实例化此模块.

A module type of "0" means to not instantiate this module.

在您的特定情况下,使用*.manager.moduleName = "XXX=busNode *=node"并配置*.busNode[*].applType = "APP_bus"*.node[*].applType = "APP_private"应该足够了.

In your specific case, it seems like it should be sufficient to use *.manager.moduleName = "XXX=busNode *=node" and to configure *.busNode[*].applType = "APP_bus" and *.node[*].applType = "APP_private".

这篇关于在多种车辆类型中具有多种用途的静脉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆