michele-segata / plexe

Repository for Plexe
GNU General Public License v2.0
49 stars 39 forks source link

PLEXE: Issue with generating plotting results #15

Closed SafrasIqbal closed 4 years ago

SafrasIqbal commented 4 years ago

Hello,

I am getting below error when try to make at the analysis directory. error as below.

bash-3.2$  ./genmakefile.py parse-config > Makefile
bash-3.2$ make
Rscript generic-parser.R ../results/Braking_0_0.3_0.vec map-config default bra Rdata
During startup - Warning messages:
1: Setting LC_COLLATE failed, using "C" 
2: Setting LC_TIME failed, using "C" 
3: Setting LC_MESSAGES failed, using "C" 
4: Setting LC_MONETARY failed, using "C" 
infile:  ../results/Braking_0_0.3_0.vec 
outfile;  ../results/bra.Braking_0_0.3_0.Rdata 
-------------------------
run:  0 
Warning message:
In loadVectorsShaped(vecFile, add("vector", select = selector)) :
  no vectors loaded!
Error in eval(parse(text = condition)) : object 'nodeId' not found
Calls: subset -> subset.data.frame -> eval -> eval -> eval -> eval
Execution halted
make: *** [../results/bra.Braking_0_0.3_0.Rdata] Error 1

Please help me on the issue. Thanks

Regards, Safras

michele-segata commented 4 years ago

Can you check whether the file Braking_0_0.3_0.vec actually contains results?

SafrasIqbal commented 4 years ago

Hi Michele,

Thanks for responding to the query. I checked the file Braking_0_0.3_0.vec. it has 1.4 MB of data. first few lines of it for your perusal


version 2
run Sinusoidal-2-20200805-20:07:10-98837
attr beaconInterval 0.1
attr configname Sinusoidal
attr controller 1
attr datetime 20200805-20:07:10
attr experiment Sinusoidal
attr headway 0.1
attr inifile omnetpp.ini
attr iterationvars "$nCars=8, $platoonSize=8, $nLanes=1, $ploegH=0.5, $controller=1, $sController=\"CACC\", $headway=0.1, $leaderHeadway=1.2, $leaderSpeed=100, $beaconInterval=0.1, $priority=4, $packetSize=200, $0=5, $1=0"
attr iterationvarsf nCars=8,platoonSize=8,nLanes=1,ploegH=0.5,controller=1,sController=CACC,headway=0.1,leaderHeadway=1.2,leaderSpeed=100,beaconInterval=0.1,priority=4,packetSize=200,5,0-
attr leaderHeadway 1.2
attr leaderSpeed 100
attr measurement "$nCars=8, $platoonSize=8, $nLanes=1, $ploegH=0.5, $controller=1, $sController=\"CACC\", $headway=0.1, $leaderHeadway=1.2, $leaderSpeed=100, $beaconInterval=0.1, $priority=4, $packetSize=200, $0=5, $1=0"
attr nCars 8
attr nLanes 1
attr network Highway
attr packetSize 200
attr platoonSize 8
attr ploegH 0.5
attr priority 4
attr processid 98837
attr repetition 0
attr replication #0
attr resultdir results
attr runnumber 2
attr sController "\"CACC\""
attr seedset 0
param **.headway 0.1s
param **.numberOfCars 8
param **.numberOfCarsPerPlatoon 8
param **.numberOfLanes 1
param **.numericController 1
param **.seed 0
param **.traffic.nCars 8
param **.traffic.nLanes 1
param **.traffic.platoonInsertDistance 5m
param **.traffic.platoonInsertHeadway 0s
param **.traffic.platoonInsertSpeed 100kmph
param **.traffic.platoonInsertTime "1 s"
param **.traffic.platoonLeaderHeadway 1.2s
param **.traffic.platoonSize 8
param **.traffic.platooningVType "\"vtypeauto\""
param **.traffic_type "\"PlatoonsTrafficManager\""
param *.**.nic.mac1609_4.bitrate 6Mbps
param *.**.nic.mac1609_4.txPower 100mW

Please let me know if you need anything else. thanks.

michele-segata commented 4 years ago

version 2
run Sinusoidal-2-20200805-20:07:10-98837
attr beaconInterval 0.1
attr configname Sinusoidal
attr controller 1
attr datetime 20200805-20:07:10
attr experiment Sinusoidal

According to the first lines, this is not the output file for the Braking scenario, but for the Sinusoidal scenario. Are you sure you picked the right file?

SafrasIqbal commented 4 years ago

Oh, I'm sorry it's my bad. your right its Sinusoidal. The Braking scenario as below.

version 2
run BrakingNoGui-0-20200805-11:58:07-86476
attr beaconInterval 0.1
attr configname BrakingNoGui
attr controller 0
attr datetime 20200805-11:58:07
attr experiment BrakingNoGui
attr headway 0.3
attr inifile omnetpp.ini
attr iterationvars "$nCars=8, $platoonSize=8, $nLanes=1, $ploegH=0.5, $controller=0, $sController=\"ACC\", $headway=0.3, $leaderHeadway=1.2, $leaderSpeed=100, $beaconInterval=0.1, $priority=4, $packetSize=200, $0=2, $1=0.3"
attr iterationvarsf nCars=8,platoonSize=8,nLanes=1,ploegH=0.5,controller=0,sController=ACC,headway=0.3,leaderHeadway=1.2,leaderSpeed=100,beaconInterval=0.1,priority=4,packetSize=200,2,0.3-
attr leaderHeadway 1.2
attr leaderSpeed 100
attr measurement "$nCars=8, $platoonSize=8, $nLanes=1, $ploegH=0.5, $controller=0, $sController=\"ACC\", $headway=0.3, $leaderHeadway=1.2, $leaderSpeed=100, $beaconInterval=0.1, $priority=4, $packetSize=200, $0=2, $1=0.3"
attr nCars 8
attr nLanes 1
attr network Highway
attr packetSize 200
attr platoonSize 8
attr ploegH 0.5
attr priority 4
attr processid 86476
attr repetition 0
attr replication #0
attr resultdir results
attr runnumber 0
attr sController "\"ACC\""
attr seedset 0
param **.headway 0.3s
param **.numberOfCars 8
param **.numberOfCarsPerPlatoon 8
param **.numberOfLanes 1
param **.numericController 0
param **.seed 0
param **.traffic.nCars 8
param **.traffic.nLanes 1
param **.traffic.platoonInsertDistance 2m
param **.traffic.platoonInsertHeadway 0.3s
param **.traffic.platoonInsertSpeed 100kmph
param **.traffic.platoonInsertTime "1 s"
param **.traffic.platoonLeaderHeadway 1.2s
param **.traffic.platoonSize 8
param **.traffic.platooningVType "\"vtypeauto\""
param **.traffic_type "\"PlatoonsTrafficManager\""
param *.**.nic.mac1609_4.bitrate 6Mbps
param *.**.nic.mac1609_4.txPower 100mW
param *.**.nic.mac1609_4.useServiceChannel false
param *.**.nic.phy80211p.analogueModels "xmldoc(\"config.xml\")"
param *.**.nic.phy80211p.decider "xmldoc(\"config.xml\")"
param *.**.nic.phy80211p.maxTXPower 100mW
param *.**.nic.phy80211p.minPowerLevel -94dBm
param *.**.nic.phy80211p.noiseFloor -95dBm
param *.**.nic.phy80211p.useNoiseFloor true
param *.**.nic.phy80211p.usePropagationDelay true
param *.annotations.draw false
param *.connectionManager.drawMaxIntfDist false
param *.connectionManager.maxInterfDist 2600m
param *.connectionManager.sendDirect true
param *.manager.autoShutdown true
param *.manager.command "\"sumo-gui\""
param *.manager.configFile "\"./sumocfg/freeway.sumo.cfg\""
param *.manager.host "\"localhost\""
param *.manager.ignoreGuiCommands true
param *.manager.launchConfig "xmldoc(\"./sumocfg/freeway.launchd.xml\")"
param *.manager.margin 25
param *.manager.moduleDisplayString "\"\""
param *.manager.moduleName "\"node\""
param *.manager.moduleType "\"org.car2x.plexe.PlatoonCar\""
param *.manager.updateInterval 0.01s
param *.node[*].appl_type "\"SimplePlatooningApp\""
param *.node[*].helper.nCars 8
param *.node[*].helper.nLanes 1
param *.node[*].helper.platoonSize 8
param *.node[*].helper_type "\"PositionHelper\""
param *.node[*].mobility.x 0
param *.node[*].mobility.y 0
param *.node[*].mobility.z 1.895
param *.node[*].prot.beaconingInterval 0.1s
param *.node[*].prot.packetSize 200
param *.node[*].prot.priority 4
param *.node[*].protocol_type "\"SimplePlatooningBeaconing\""
param *.node[*].scenario.accHeadway 0.3s
param *.node[*].scenario.brakingDeceleration "8 mpsps"
param *.node[*].scenario.caccC1 0.5
param *.node[*].scenario.caccOmegaN "0.2 Hz"
param *.node[*].scenario.caccXi 1
param *.node[*].scenario.controller "\"ACC\""
param *.node[*].scenario.engineTau "0.5 s"
param *.node[*].scenario.leaderHeadway 1.2s
param *.node[*].scenario.leaderOscillationFrequency "0.2 Hz"
param *.node[*].scenario.leaderSpeed 100kmph
param *.node[*].scenario.ploegH 0.5s
param *.node[*].scenario.ploegKd 0.7
param *.node[*].scenario.ploegKp 0.2
param *.node[*].scenario.startBraking "5 s"
param *.node[*].scenario.useControllerAcceleration true
param *.node[*].scenario.useRealisticEngine false
param *.node[*].scenario_type "\"BrakingScenario\""
param *.node[*].unicast.packetLossRate 0
param *.obstacles.debug false
param *.playgroundSizeX 65000m
param *.playgroundSizeY 25000m
param *.playgroundSizeZ 50m
param *.world.use2D false
param *.world.useTorus false

vector 1  Highway.node[0].appl  distance  ETV
vector 2  Highway.node[0].appl  relativeSpeed  ETV
vector 3  Highway.node[0].appl  nodeId  ETV
vector 7  Highway.node[0].appl  acceleration  ETV
vector 8  Highway.node[0].appl  controllerAcceleration  ETV
vector 4  Highway.node[0].appl  speed  ETV
michele-segata commented 4 years ago

The file looks good to me. Can you attach the file an answer so I can try analyzing it myself?

SafrasIqbal commented 4 years ago

Yes sure. the results folder attached herewith. thanks

results.zip

michele-segata commented 4 years ago

Thanks. Parsing works fine for me. Can you try installing the OMNeT libray for R you find here (omnetpp_0.7-1.tar.gz) and try again?

SafrasIqbal commented 4 years ago

Hi Again,

I got below error when I trying to install earlier as well and I amended the script with space between literal and identifier. then it worked. Maybe this is the reason it's not working for me. Please advise how to fix the below issue. Maybe something due to my system configuration issue. Much appreciate your help. thanks

Screenshot 2020-08-07 at 3 37 16 PM
michele-segata commented 4 years ago

Ah you are using R version 4.0. I never tested the scripts with R 4.0. Do you have any chances to downgrade to R version 3.5.1?

SafrasIqbal commented 4 years ago

Ok sure, will find out a way to downgrade to version 3.5.1. Thanks

SafrasIqbal commented 4 years ago

Hi Michele,

I was not able to find an exact version of 3.5.1. and I took the closest version as 3.6.3 and faced the same issue as 4.0. Subsequently, I tried the next version it was 3.3.3, and it just works fine.

Steps followed after R 3.3.3. institution.

1] Smooth installtion of custom omnepp packge. 2] Tried straight away to 'make' from the analysis folder but it was demanding for 'reshape2' package. so install the additional packages as described in the PLEXE building page.
3] Finally results generated as expected. 👍

Thank you for your support. much appreciated.

A quick question, I wanted to try PLEXE Example 2 but I assume it's not ready with PLEXE 3.0? as its required changes in sumo. Please let me know if you have any plans to release this update or its already up there somewhere. Thank you.

Regards, Safras

michele-segata commented 4 years ago

I was not able to find an exact version of 3.5.1. and I took the closest version as 3.6.3 and faced the same issue as 4.0. Subsequently, I tried the next version it was 3.3.3, and it just works fine.

Many thanks for the feedback. I will need to check what is wrong with new R versions.

A quick question, I wanted to try PLEXE Example 2 but I assume it's not ready with PLEXE 3.0? as its required changes in sumo. Please let me know if you have any plans to release this update or its already up there somewhere. Thank you.

You are right. Currently example 2 is not available. But if you are interested in that specific example, you are probably interested in implementing a new controller. In that case, following the instructions indicating how changes to the code have been made (here) should work. Maybe with small differences, but the core concept remains the same.

SafrasIqbal commented 4 years ago

Hi Michele,

Thank you for taking the time to reply to my queries. Appreciate your help. I will keep an eye on the updates on the PLEXE system as I am trying to replicate a Sybil attack scenario on the platoon system. For now, I am trying to work on the join manurers and underhand how it works and try my scenarios. In the meantime, if I encounter any further issues, I will reach out to you. Thank you.

I will close this thread as it resolved the plotting issue.

Regards,

Safras