forked from lucyking/ABSK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
future_net.cpp
40 lines (33 loc) · 819 Bytes
/
future_net.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
#include "route.h"
#include "lib/lib_io.h"
#include "lib/lib_time.h"
#include "stdio.h"
int main(int argc, char *argv[])
{
print_time("Begin");
char *topo[5000];
int edge_num;
char *demand;
int demand_num;
char *topo_file = argv[1];
edge_num = read_file(topo, 5000, topo_file);
if (edge_num == 0)
{
printf("Please input valid topo file.\n");
return -1;
}
char *demand_file = argv[2];
demand_num = read_file(&demand, 1, demand_file);
if (demand_num != 1)
{
printf("Please input valid demand file.\n");
return -1;
}
search_route(topo, edge_num, demand);
char *result_file = argv[3];
write_result(result_file);
release_buff(topo, edge_num);
release_buff(&demand, 1);
print_time("End");
return 0;
}