在模拟时间约134秒后反复出现动脉撞击

时间:2018-02-02 15:20:52

标签: omnet++ veins

我目前正在使用Artery在自定义方案中模拟流量。懒惰,我只是在omnetpp.ini文件中更改了所需的sumo-files和launchd.xml以及引用,以便我可以使用run_example目标运行Artery。 到目前为止一切顺利。
Qtenv开始没有问题我得到一个对话,提示我选择ini配置(General,veins,inet或inet_rsu)。每当SimTime运行inet_rsu配置大约140秒时,程序崩溃产生以下错误消息:

CXX=/usr/local/opt/llvm/bin/clang++ \
LDFLAGS+='-L/usr/local/opt/llvm/lib \
-L/usr/local/Cellar/llvm/5.0.1/lib -lclang' \
CPPFLAGS=-I/usr/local/opt/llvm/include \
make myprog

完整的终端输出如下:

opp_run: /home/wiconlab/Car2x/artery-master/src/artery/application    
/LocalDynamicMap.cc:24: void artery::LocalDynamicMap::updateAwareness(const CaObject&): Assertion `entry.expiry > omnetpp::simTime() && entry.expiry < omnetpp::simTime() + 2.0' failed

在Debug配置中运行后的Backtrace:

$ cmake --build build --target run_example
[ 13%] Built target traci
[ 14%] Building INET (external dependency)
*** COMPILING with:
g++ -c -std=c++11 -O2 -DNDEBUG=1 -MMD -MP -MF .d  -fPIC  -fno-stack-protector -DHAVE_SWAPCONTEXT -DWITH_MPI -DXMLPARSER=libxml -DPREFER_QTENV -DWITH_QTENV -DWITH_TKENV -DWITH_PARSIM -DWITH_NETBUILDER -DWITH_OSG -DWITH_OSGEARTH -Wno-overloaded-virtual -include inet/common/precompiled.h   -I. -I/home/wiconlab/Car2x/omnetpp-5.1.1/include
*** LINKING with:
g++ -shared -fPIC -o ../out/gcc-release/src/libINET.so -Wl,--no-as-needed -Wl,--whole-archive  -Wl,--no-whole-archive -loppenvir -loppsim -ldl -lstdc++  -lOpenThreads -losg -losgText -losgDB -losgEarth -losgEarthUtil -Wl,-rpath,/home/wiconlab/Car2x/omnetpp-5.1.1/lib -Wl,-rpath,/lib -Wl,-rpath,.  -L/home/wiconlab/Car2x/omnetpp-5.1.1/lib
Building...
[ 14%] Built target build_inet
[ 15%] Building Veins (external dependency)
[ 15%] Built target build_veins
[ 16%] Building Vanetza (external dependency)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   date_time
--   serialization
--   system
-- Using bundled ASN.1 code instead of asn1c
-- Could NOT find Cohda (missing: COHDA_MK2_ROOT) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wiconlab/Car2x/artery-master/extern/vanetza/build
[  0%] Built target asn1_gen
[ 65%] Built target asn1
[ 67%] Built target common
[ 71%] Built target net
[ 81%] Built target security
[ 85%] Built target dcc
[ 95%] Built target geonet
[ 97%] Built target btp
[ 98%] Built target facilities
[ 99%] Built target gnss
[100%] Built target proxy_fake_feed
[ 16%] Built target build_vanetza
[ 22%] Built target denm
[ 27%] Built target messages
[ 49%] Built target storyboard
[ 65%] Built target envmod
[100%] Built target artery
OMNeT++ Discrete Event Simulation  (C) 1992-2017 Andras Varga, OpenSim Ltd.
Version: 5.1.1, build: 170508-adbabd0, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer

Setting up Qtenv...

Loading NED files from /home/wiconlab/Car2x/artery-master/src/artery:  38
Loading NED files from /home/wiconlab/Car2x/artery-master/src/traci:  10
Loading NED files from /home/wiconlab/Car2x/artery-master/extern/veins/examples/veins:  1
Loading NED files from /home/wiconlab/Car2x/artery-master/extern/veins/src/veins:  33
Loading NED files from /home/wiconlab/Car2x/artery-master/extern/inet/examples:  163
Loading NED files from /home/wiconlab/Car2x/artery-master/extern/inet/src:  562
Loading NED files from /home/wiconlab/Car2x/artery-master/extern/inet/tutorials:  5

Loading images from './bitmaps': *: 0 
Loading images from './images': *: 0 
Loading images from '/home/wiconlab/Car2x/omnetpp-5.1.1/images': *: 0  abstract/*: 90  background/*: 4  block/*: 320  device/*: 195  logo/*: 1  maps/*: 9  misc/*: 70  msg/*: 55  old/*: 111  status/*: 28 

Loading configuration... done.
Warning: Cannot find local schema '/home/hardt/Car2x/sumo-0.30.0/data/xsd/additional_file.xsd', will try website lookup.
Warning: Cannot find local schema '/home/hardt/Car2x/sumo-0.30.0/data/xsd/additional_file.xsd', will try website lookup.
opp_run: /home/wiconlab/Car2x/artery-master/src/artery/application/LocalDynamicMap.cc:24: void artery::LocalDynamicMap::updateAwareness(const CaObject&): Assertion `entry.expiry > omnetpp::simTime() && entry.expiry < omnetpp::simTime() + 2.0' failed.
Error: tcpip::Socket::recvAndCheck @ recv: peer shutdown
Quitting (on error).
Aborted (core dumped)
scenarios/artery/CMakeFiles/run_example.dir/build.make:57: recipe for target 'scenarios/artery/CMakeFiles/run_example' failed
make[3]: *** [scenarios/artery/CMakeFiles/run_example] Error 134
CMakeFiles/Makefile2:566: recipe for target 'scenarios/artery/CMakeFiles/run_example.dir/all' failed
make[2]: *** [scenarios/artery/CMakeFiles/run_example.dir/all] Error 2
CMakeFiles/Makefile2:573: recipe for target 'scenarios/artery/CMakeFiles/run_example.dir/rule' failed
make[1]: *** [scenarios/artery/CMakeFiles/run_example.dir/rule] Error 2
Makefile:248: recipe for target 'run_example' failed
make: *** [run_example] Error 2

1 个答案:

答案 0 :(得分:3)

LocalDynamicMap第24行中的断言尝试确保仅添加最近的CAM。在之前的行中,从截断的generationDeltaTime时间戳重建完整的CAM生成时间戳。也许出现了问题,但如果没有进一步的信息,我几乎无法分辨。您能否提供有关修改的详细信息?这可能有助于重现此错误。

另外,我建议通过调用debug_example目标来使用调试器运行模拟。请确保将CMAKE_BUILD_TYPE设置为&#34; Debug&#34;启用此目标。当断言失败时,你就有机会详细查看变量:什么是确切的OMNeT ++模拟时间,即&#34; print simTime()。dbl()&#34;用gdb?什么是CAM的一代DeltaTel?什么是重建的tai值? LocalDynamicMap的计时器(mTimer)的时基(mTimebase)是什么?

附录1:如果您更喜欢图形用户界面,可以使用ccmake或cmake-gui从命令行轻松修改CMake变量。示例:转到您的Artery构建目录(通常简称为#34; build&#34;)并调用&#34; ccmake。&#34;从那里。在随后打开的命令行界面中,将光标移动到CMAKE_BUILD_TYPE条目,按[Enter]并将此条目修改为&#34; Debug&#34;。按[c]运行CMake配置阶段,然后按[g]在生成目录中生成更新的Makefile。