omn​​et ++/veins:连接inet和静脉:TraCIScenarioManagerLaunchd中的TraCIMobility错误 [英] omnet++/veins : connecting inet and veins : TraCIMobility error in TraCIScenarioManagerLaunchd

查看:268
本文介绍了omn​​et ++/veins:连接inet和静脉:TraCIScenarioManagerLaunchd中的TraCIMobility错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接inet 3.4.0和静脉4.4以获取Tcp/Ip支持. 我已经遵循了这些说明(静脉-INET兼容性)甚至更多,但是在出现此错误的同时尝试运行模拟:我不确定是否了解TraCIMobility函数.

I'm trying to connect inet 3.4.0 and veins 4.4 to get Tcp/Ip support. I've followed those instructions ( Veins - INET compatibility ) and even more, but I have this error while trying to run a simulation : I'm not sure to understand the TraCIMobility function.

<!> Error in module (Veins::TraCIScenarioManagerLaunchd) simple_junction_noTls_ipv4.manager (id=6) at event #23, t=0.2: ASSERT: condition lastUpdate != simTime() false in function changePosition, veins/modules/mobility/traci/TraCIMobility.cc line 192.

这是我的汽车模块:

import inet.node.inet.AdhocHost;
import org.car2x.veins.base.modules.*;
import org.car2x.veins.modules.nic.Nic80211p;
import org.car2x.veins.base.modules.IMobility;

module Car extends AdhocHost
{
    parameters:
    //string applType; //type of the application layer
    int numWaveRadios = default(1);          
    string nicType = default("Nic80211p"); // type of network interface card
    string veinsmobilityType; //type of the mobility module
    string imobilityType; //type of the mobility module
    @display("bgl=2");
gates:
    input veinsRadioIn[numWaveRadios] @directIn; // gate for sendDirect

submodules:
    nic[numWaveRadios]: <nicType> like org.car2x.veins.modules.nic.INic80211p {
        parameters:
            @display("p=661,287");
    }

    veinsmobility: <veinsmobilityType> like org.car2x.veins.base.modules.IMobility {
        parameters:
            @display("p=163,242;i=block/cogwheel");
    }
    // optional mobility module. Required only if ieee80211p wireless cards are present
    imobility: <imobilityType> like org.car2x.veins.base.modules.IMobility if (imobilityType != ""){
        parameters:
            @display("p=53,200");
    }  
connections:
    for i=0..sizeof(veinsRadioIn)-1 {
        veinsRadioIn[i] --> { @display("m=s"); } --> nic[i].radioIn;
        nic[i].upperLayerOut --> networkLayer.ifIn++;
        nic[i].upperLayerIn <-- networkLayer.ifOut++;
    }

}

这是我的配置文件omnetpp.ini的一部分:

and here is part of my config file omnetpp.ini :

###########################################################
##                      Mobility                          #
###########################################################
*.node[*].veinsmobilityType ="org.car2x.veins.modules.mobility.traci.TraCIMobility"
*.node[*].imobilityType = "TraCIMobility"
*.node[*].imobilityType.debug = true
*.node[*].veinsmobilityType.debug = true
*.node[*].veinsmobility.x = 0
*.node[*].veinsmobility.y = 0
*.node[*].veinsmobility.z = 1.895
*.node[*].imobility.x = 0
*.node[*].imobility.y = 0
*.node[*].imobility.z = 1.895

谢谢您的帮助! 问候

推荐答案

好的,我已经对断言进行了评论

OK I've commented the assertion

//确保不会一次调用两次

// ensure we're not called twice in one time step

//ASSERT(lastUpdate != simTime());

通过INET,我们实际上被两次调用过,一次在这里,一次在TraCIScenarioManagerInet.cc中,因此我对此行发表了评论

with INET we are effectively called twice, one here and one from TraCIScenarioManagerInet.cc, hence I comment this line

它现在正在运行...但是一次调用了两次

It runs now...but called twice in one time step

这篇关于omn​​et ++/veins:连接inet和静脉:TraCIScenarioManagerLaunchd中的TraCIMobility错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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