Graph Convolutional Branch and Bound v1.0.0
A TSP solver that combines a graph convolutional network with a 1-Tree branch-and-bound.
Loading...
Searching...
No Matches
main.c
Go to the documentation of this file.
1
14#include "../test/main_test.h"
15
16
23int main(int argc, char *argv[]) {
24
25 if (argc != 3) {
26 perror("Wrong number of arguments");
27 printf("\nYou need to pass 2 arguments: <input file> <output file>\n");
28 exit(1);
29 }
30
31
32 char *input_file = argv[1];
33 char *output_file = argv[2];
34
35 //printf("\nNodes:%d \t\tMode: %s\t\t\n", MAX_VERTEX_NUM, HYBRID ? "Hybrid" : "Classic");
36
37 //printf("\nReading from file '%s'\n", input_file);
38 //printf("\nWriting to file '%s'\n", output_file);
39
40 freopen(output_file, "w+", stdout);
41
42 //run_all_tests();
43
44 static Problem new_problem;
45
46 //read_tsp_lib_file(&new_problem.graph, input_file);
47 read_tsp_csv_file(&new_problem.graph, input_file);
48
49 //print_graph(&new_problem.graph);
50
51 branch_and_bound(&new_problem);
52
54
55 fclose(stdout);
56
57 return 0;
58}
void branch_and_bound(Problem *current_problem)
The Branch and Bound algorithm.
void print_problem(void)
Get all metrics of the problem.
Definition: main.py:1
The struct used to represent the overall problem.
Definition: b_and_b_data.h:62
Graph graph
The Graph of the problem.
Definition: b_and_b_data.h:63
void read_tsp_csv_file(Graph *graph, char *filename)
Reads a .csv file and stores the data in the Graph.