omnet++ - 不支持的 TraCI API 版本,建议使用 Sumo 版本 1.0.1 或 0.32.0
问题描述
我想在 Ubuntu 20.04 中使用 OMNeT++ 和 Veins 5.1、Sumo 1.8,但我不断收到涉及建议使用 Sumo 0.32 或 Sumo 1.0.1 的 setApiVersion 的错误。有什么办法可以克服这个问题并使用更高版本的 Sumo?
void TraCICommandInterface::setApiVersion(uint32_t apiVersion)
{
try {
versionConfig = versionConfigs.at(apiVersion);
TraCIBuffer::setTimeType(versionConfig.timeType);
}
catch (std::out_of_range const& exc) {
throw cRuntimeError(std::string("TraCI server reports unsupported TraCI API version: " + std::to_string(apiVersion) + ". We recommend using Sumo version 1.0.1 or 0.32.0").c_str());
}
}
解决方案
在我的例子中,代码是为早期版本的 SUMO 和 Veins 编写的。cc 文件使用了不同的命名空间声明,使用驼峰式而不是小写。更改为小写后,代码在 Sumo 1.8 和 Veins 5.1 中正常工作。
推荐阅读
- django - Django 2.2 - 如何表达两个字段之间的约束
- kubernetes - 使用 GKE 在 StackDriver 中拆分日志条目
- ios - Realm 应用程序可以在设备上编译,但不能在 Xcode 12 上的模拟器上编译
- glusterfs - GlusterFS 地理复制:未找到 gsync peer_gsec_create 命令
- spring-cloud-dataflow - 如何更新 SCDF 使用的 Hibernate 版本?
- python - 在 Heroku 上上传网站后,静态(CSS 和 JS)文件无法正常工作
- ruby - http.post 请求未收到任何数据
- azure - 源链接服务不应将“服务主体”作为身份验证方法
- php - 比较多维数组中的两个数组值
- image - 在其他图像之上添加叠加图像