-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
55 lines (42 loc) · 1.14 KB
/
main.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <iostream>
#include <string>
#include <fstream>
#include <cmath>
#include <ctime>
#include <vector>
using namespace std;
#include "request.h"
#include "solver.h"
vector <string> getListName(string );
int main(){
//srand(time(NULL));
vector <string> listName = getListName("Instances/list-name.txt");
string path;
//for(int test = listName.size() - 1; test < listName.size(); test++){
for(int test = 0; test < 1; test++){
Solver solve;
//path = "Instances/" + listName[test];
//path = "Instances/X\\X-n1001-k43.vrp";
path = "Instances/X\\X-n139-k10.vrp";
//cout << "Instances" << test + 1 << ": " << path << endl;
solve.path = path;
//solve.runILS();
solve.runMSILS();
}
cout << "End program" << endl;
return 0;
}
vector <string> getListName(string path){
vector <string> listName;
string name;
int number_vrp;
ifstream file;
file.open(path);
file >> number_vrp;
for(int i = 0; i < number_vrp; i++){
file >> name;
listName.push_back(name);
}
file.close();
return listName;
}