-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.cpp
More file actions
33 lines (24 loc) · 876 Bytes
/
Copy pathproject.cpp
File metadata and controls
33 lines (24 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include<iostream>
#include<string>
#include<cstdlib>
#include"classes/controller/controller-interface.h"
#include"classes/highway/highway-interface.h"
using namespace std;
int main(int argc, char *argv[]){
int N = strtol(argv[1], nullptr, 10) ;
int NSegs = strtol(argv[2], nullptr, 10) ;
int K = strtol(argv[3], nullptr, 10) ;
int Percent = strtol(argv[4], nullptr, 10) ;
Controller::init(N,NSegs,K,Percent);
cout<<"Project initialised with values:\n"
<<"Number of trials: " << N << "\n"
<<"Number of segments: " << NSegs << "\n"
<<"Toll Booth entry cap: " << K << "\n"
<<"Percentage of cars to prepare each trial: " << Percent << endl;
Highway* highway = new Highway();
for(int i = 0 ; i < N ; i++){
highway->operate();
}
cout <<"Highway operation over." << endl;
delete highway;
}