Пояснительная записка (1194880), страница 13
Текст из файла (страница 13)
41 Thomas R. Henderson. Yet Another Network Simulator / Mathieu Lacage // Department of Electrical Engineering University of Washington, Seattle, WA, USA, 2014, p. 8195
42 Strbac, S. A Study of Vehicular Ad-hoc Networks / Stefan Strbac // ENSC 427: Communication networks., 2012, p. 26
43 C. Sommer. A computationally inexpensive empirical model / D. Eckhoff, R. German, and F. Dressler. C. Sommer // IEEE International Conference on Wireless On-Demand Network Systems and Services (WONS), 2011, pp. 84-90
44 Anjali P. Performance Analysis and Comparison of various Radio Propagation models and its impact on Routing Efficiency / Patel Anjali H., Bandana Kumari, Thyagarajan Jayavignesh // National Conference on Science, Engineering and Technology (NCSET)., 2016, pp. 13-16
45 Kannan Srinivasan. Department of Electrical Engineering and Department of Computer Science RSSI is Under Appreciated / Philip. Levis // Stanford University, Stanford, CA, 2016, pp. 3-4.
46 Sanjoy Das. A Performance Analysis of LAR Protocol for Vehicular Ad Hoc Networks in City Scenarios / D.K Lobiyal // India, 2012, pp. 3-6
47 Abdeldime M.S. The Physical Layer of the IEEE 802.11p. WAVE Communication Standard: The Specifications and Challenges / Abdelgader, Wu Lenan // Proceedings of the World Congress on Engineering and Computer Science Vol II WCECS, San Francisco, USA, 2014, pp. 22-24
48 Saravanan D. A Brief Survey on Performance Analysis and Routing Strategies on Vanets / D. Saravanan, V. Agalya, J. Amudhavel, S. Jana-kiraman // Indian Journal of Science and Technology Vol 9(11), 2016, p. 6
49 Perkins CE. Highly dynamic destination-sequenced distance-vector routing (DSDV) for mobile computers / BhagwatP. // ACM SIGCOMM Computer Communication Review, 1994, pp. 234-44
50 Clausen T. The optimized link state routing protocol, evaluation through experiments and simulation / Hansen G, Christensen L, Behrmann G // Proceedings of the symposium on wireless personal mobile communications; IEEE, 2001, p. 16
51 Chenn-Jung Huang. QoS-aware roadside base station assisted routing in vehicular networks / Yi-Ta Chuang, You-Jia Chen, Dian-Xiu Yang, I-Fan Chen // The Engineering Applications of Artificial Intelligence, NY, USA, 2009, pp. 1292-1301
52 Hossain M.N. Technical Specification, Intelligent Transport Systems (ITS) Vehicular Communications // GeoNetworking, Part 2: Scenarios. ETSI TS, 2010, pp. 636-638
53 Пегат, А. Нечеткое моделирование и управление Электронный ресурс / А. Пегат; пер. с англ. 2-е издание (электронное) А. Г. Подвесовского, Ю. В. Тюменцева под редакцией Ю. В. Тюменцева. – М.: БИНОМ. Лаборатория знаний, 2013. – 798 с
Приложение А
(справочное)
Листинг программы для генерации сценария автомагистрали
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow){
ui->setupUi(this);
}
MainWindow::~MainWindow(){
delete ui;
}
void MainWindow::on_pushButton_clicked(){
QFile Fil("Line.txt");
Fil.open(QIODevice::WriteOnly | QIODevice::Text);
QTextStream Out;
Out.setDevice(&Fil);
int Length=QVariant(ui->lineEdit_2->text()).toInt();
int NodeNum=QVariant(ui->lineEdit->text()).toInt();
double Speed=QVariant(ui->lineEdit_3->text()).toDouble();
int SPointX=-2500;
int SPointY=1000;
int stepX=(Length)/(NodeNum);
int stepY=20;
int EPointX=SPointX+Length;
int EPointY=SPointY+stepY;
QString temp="";
for(int i=0;i<NodeNum;i++){
if(i<NodeNum/2){
int CurX=SPointX+i*stepX;
Out<<"$node_("<<i<<") set X_ "<<CurX<<"\n";
Out<<"$node_("<<i<<") set Y_ "<<SPointY<<"\n";
Out<<"$node_("<<i<<") set Z_ "<<0<<"\n";
Out<<"$ns_ at 0.0 \"$node_("<<i<<") setdest "<<CurX<<" "<<SPointY<<" "<<0<<"\"\n";
Out<<"$ns_ at 0.0 \"$node_("<<i<<") setdest "<<EPointX<<" "<<SPointY<<" "<<Speed<<"\"\n";
}
else
{
int CurX=EPointX-(i-NodeNum/2)*stepX;
Out<<"$node_("<<i<<") set X_ "<<CurX<<"\n";
Out<<"$node_("<<i<<") set Y_ "<<EPointY<<"\n";
Out<<"$node_("<<i<<") set Z_ "<<0<<"\n";
Out<<"$ns_ at 0.0 \"$node_("<<i<<") setdest "<<CurX<<" "<<EPointY<<" "<<0<<"\"\n";
Out<<"$ns_ at 0.0 \"$node_("<<i<<") setdest "<<SPointX<<" "<<EPointY<<" "<<Speed<<"\"\n";
}
}
double timeY=stepY/Speed;
temp=QVariant((int)timeY).toString()+"."+QVariant(int((timeY-(int)timeY)*10)).toString();
timeY=QVariant(temp).toDouble();
int counter=0;
QList<QString> Res;
QList<double> buff;
for(int i=0;i<NodeNum;i++){
if(i<NodeNum/2){
double timeX=(Length-i*stepX)/Speed;
temp=QVariant((int)timeX).toString()+"."+QVariant(int((timeX-(int)timeX)*10)).toString();
timeX=QVariant(temp).toDouble();
temp="$ns_ at "+QVariant(timeX).toString()+" \"$node_("+QVariant(i).toString()+") setdest "+QVariant(EPointX).toString()+" "+QVariant(EPointY).toString()+" "+QVariant(Speed).toString()+"\"\n";
Res.append(temp);
buff.append(timeX);
temp="$ns_ at "+QVariant(timeY+timeX).toString()+" \"$node_("+QVariant(i).toString()+") setdest "+QVariant(SPointX).toString()+" "+QVariant(EPointY).toString()+" "+QVariant(Speed).toString()+"\"\n";
Res.append(temp);
buff.append(timeY+timeX);
}
else
{
double timeX=(Length-(counter)*stepX)/Speed;
temp=QVariant((int)timeX).toString()+"."+QVariant(int((timeX-(int)timeX)*10)).toString();
timeX=QVariant(temp).toDouble();
temp="$ns_ at "+QVariant(timeX).toString()+" \"$node_("+QVariant(i).toString()+") setdest "+QVariant(SPointX).toString()+" "+QVariant(SPointY).toString()+" "+QVariant(Speed).toString()+"\"\n";
Res.append(temp);
buff.append(timeX);
temp="$ns_ at "+QVariant(timeY+timeX).toString()+" \"$node_("+QVariant(i).toString()+") setdest "+QVariant(EPointX).toString()+" "+QVariant(SPointY).toString()+" "+QVariant(Speed).toString()+"\"\n";
counter++;
Res.append(temp);
buff.append(timeY+timeX);
}
}
int ind=0;
for(int i=0;i<buff.count();i++){
double time=99999;
for(int j=0;j<buff.count();j++){
if(buff[j]<time){
time=buff[j];
ind=j;
}
}
Out<<Res[ind];
buff[ind]=999999;
}
QMessageBox::information(0,"Cngrat!","SUCCESS!");}
Приложение Б
(справочное)
Листинг программы для обработки выходных файлов симуляций
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow){
ui->setupUi(this);
}
MainWindow::~MainWindow(){
delete ui;
}
QString MainWindow::FindMethod(QString RawString, QString Query, int NumToDeleteFromEnd){
int pos1=0;
int pos2=0;
pos1=RawString.indexOf(Query,pos1)+Query.length();
pos2=RawString.indexOf("\"",pos1);
QString Result="";
for(int i=pos1;i<=pos2-NumToDeleteFromEnd;i++){
Result.append(RawString.at(i));
}
return Result;
}
void MainWindow::on_pushButton_clicked(){
DelayTotal.clear();
JitterTotal.clear();
rxPacketsTotal.clear();
txPacketsTotal.clear();
lostPacketsTotal.clear();
PDR_Routing_Total.clear();
BitRateTX_Total.clear();
BitRateRX_Total.clear();
DelayHist_Total.clear();
JitterHist_Total.clear();
Jitter_Mod_Total.clear();
Delay_Mod_Total.clear();
PDR_BSM_Total.clear();
MacPhy_Ovehread_Total.clear();
Goodput_Total.clear();
RSSI_prop_Total.clear();
RSSI_alt_Total.clear();
RSSI_alt_W_Total.clear();
SNR_Total.clear();
Collisions_Total.clear();
Top_RSSI_Prop_Total.clear();
Bottom_RSSI_Prop_Total.clear();
Top_RSSI_Alt_Total.clear();
Bottom_RSSI_Alt_Total.clear();
Top_RSSI_Alt_W_Total.clear();
Bottom_RSSI_Alt_W_Total.clear();
Top_SNR_Total.clear();
Bottom_SNR_Total.clear();
QStringList FileNames = QFileDialog::getOpenFileNames(this, tr("Open da fugs"), "D:/share/Result", tr("Turkish result files (*.xml *.csv *.nig)"));
QString temp="";
QFile Fil;
for(int i=0; i<FileNames.count();i++){
int counter=0;
int RSSI_prop_counter=0;
int SNR_counter=0;
int RSSI_alt_counter=0;
double DelayAverage=0;
double JitterAverage=0;
double rxPacketsSum=0;
double txPacketsSum=0;
double lostPacketsSum=0;
double BitRateTX=0;
double BitRateRX=0;
double DelayMod_count=0;
double JitterMod_count=0;
double DelayMod_index=0;
double JitterMod_index=0;
double PDR_BSM=0;
double MacPhy_Ovehread=0;
double Goodput=0;
double RSSI_Prop=0;
double Top_RSSI_Prop=-99999;
double Bottom_RSSI_Prop=99999;
double RSSI_Alt=0;
double Top_RSSI_Alt=-99999;
double Bottom_RSSI_Alt=99999;
double RSSI_Alt_W=0;
double Top_RSSI_Alt_W=-99999;
double Bottom_RSSI_Alt_W=99999;
double SNR=0;
double Top_SNR=-99999;
double Bottom_SNR=99999;
int collision_num=0;
bool delay=false;
bool jitter=false;
QList<int> DelayHist;
QList<int> JitterHist;
Fil.setFileName(FileNames[i]);
Fil.open(QIODevice::ReadOnly | QIODevice::Text);
QTextStream In;
In.setDevice(&Fil);
while(!In.atEnd()){
if(Fil.fileName().contains(".nig")){
if(temp.contains("resultPower")){
int pos1=0;
int pos2=0;
QString Query="resultPower=";
pos1=temp.indexOf(Query,pos1)+Query.length();
pos2=temp.indexOf("=",pos1);
QString Result="";
for(int i=pos2+1;i<temp.length()-3;i++){
Result.append(temp.at(i));
}
if(Top_RSSI_Prop<QVariant(Result).toDouble()){
Top_RSSI_Prop=QVariant(Result).toDouble();
}
if(Bottom_RSSI_Prop>QVariant(Result).toDouble()){
Bottom_RSSI_Prop=QVariant(Result).toDouble();
}
RSSI_Prop+=QVariant(Result).toDouble();
RSSI_prop_counter++;
}
if(temp.contains("sync to signal")){
int pos1=0;
int pos2=0;
int pos3=0;
QString Query="power=";
pos1=temp.indexOf(Query,pos1)+Query.length();
pos2=temp.indexOf("e",pos1);
pos3=temp.indexOf("W",pos2);
QString Result="";
for(int i=pos1;i<pos2;i++){
Result.append(temp.at(i));
}
for(int i=pos2;i<pos3;i++){
Result.append(temp.at(i));
}
double ResultDBM=10*log10(1000*QVariant(Result).toDouble());
if(Top_RSSI_Alt<ResultDBM){
Top_RSSI_Alt=ResultDBM;
}
if(Bottom_RSSI_Alt>ResultDBM){
Bottom_RSSI_Alt=ResultDBM;
}
if(Top_RSSI_Alt_W<QVariant(Result).toDouble()){
Top_RSSI_Alt_W=QVariant(Result).toDouble();
}
if(Bottom_RSSI_Alt_W>QVariant(Result).toDouble()){
Bottom_RSSI_Alt_W=QVariant(Result).toDouble();
}
RSSI_Alt+=ResultDBM;
RSSI_Alt_W+=QVariant(Result).toDouble();
RSSI_alt_counter++;
}
if(temp.contains("snr(dB)")){
int pos1=0;
int pos2=0;
QString Query="snr(dB)=";
pos1=temp.indexOf(Query,pos1)+Query.length();
pos2=temp.indexOf(",",pos1);
QString Result="";
for(int i=pos1;i<pos2;i++){
Result.append(temp.at(i));
}















