1

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.

Here is my car module :

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++;
    }

}

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

Thank you for the help! Regards,

Mauricio Pasquier Juan
  • 2,265
  • 3
  • 27
  • 39
cnvp
  • 31
  • 5

2 Answers2

1

The Veins repository on Github now includes a sample subproject (veins_inet) that runs an INET Framework (INET 3.4.0) simulation using Veins for nodes' mobility.

You can see the necessary code (and, after clicking on Browse Files, you can download a .zip archive of the complete project) on https://github.com/sommer/veins/commit/90d4586e

Christoph Sommer
  • 6,893
  • 1
  • 17
  • 35
  • I tried this one. But didn't work out. gives me exernal id not found error. – Sandeepa Kariyawasam Jul 24 '20 at 18:37
  • Veins 5.0 includes veins_inet. If the installation is giving you trouble, Veins also comes in the form of „Instant Veins“, a ready-to-run VM that can be installed with one click. See http://veins.car2x.org/documentation/instant-veins/ – Christoph Sommer Jul 24 '20 at 18:39
  • veins_inet caused me a build error. veins_inet3 works fine. Is is build on veins mobility? that it could simulate veins car node in it? also i'd try instant-veins. – Sandeepa Kariyawasam Jul 24 '20 at 19:03
  • veins_inet of Veins 5.0 is for INET 4, veins_inet3 is for INET 3. See the changelog on http://veins.car2x.org/download/ for a full list of compatible versions – Christoph Sommer Jul 26 '20 at 10:21
0

OK I've commented the assertion

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

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

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

Julian Heinovski
  • 1,822
  • 3
  • 16
  • 27
cnvp
  • 31
  • 5