-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
45 lines (39 loc) · 942 Bytes
/
main.c
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
#include "combo.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <stdarg.h>
#include <string.h>
#include <math.h>
#include "util.h"
#include "generator.h"
#include "combo.h"
#include "ssfctp.h"
#include <time.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <float.h>
#include <limits.h>
//Structures initialisation
Node *nodes;
Prob *pr;
Res *res;
int n, lb, ub, lf, uf, D;
double lc, uc;
int main(int arg, char * argv[])
{
// Problem file
char * instance_path = "./instances/g1_n25000_9";
// Read instance file and initialize the problem
nodes = read_file(instance_path, &n, &D, &lb, &ub, &lc, &uc, &lf, &uf);
pr = generate_prob(D, n, lb, ub, lc, uc, lf, uf);
res = create_res();
// Solve the problem
solveSSFCTP(nodes, pr, res);
// Optimal value
printf("opt_val = %lf\n", res->opt_val);
// Clean memory
free(nodes);
free(pr);
free(res);
}