-
Notifications
You must be signed in to change notification settings - Fork 0
/
bnc.h
55 lines (42 loc) · 796 Bytes
/
bnc.h
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
#ifndef _BNC_H_
#define _BNC_H_
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <fstream>
#include <list>
#include <vector>
using namespace std;
#include <ilcplex/ilocplex.h>
ILOSTLBEGIN
enum CutMode{ CLQ2A, CLQ2B };
class BNC{
public:
BNC( char*, int, int, char* );
~BNC();
int n_cortes;
int max_deep;
void solve();
private:
void solveFNBB();
void solveCLQBB();
void solveCLQBC();
void buildModelNF();
void buildModelCF();
void printResult();
void configureCPLEX();
char* mod;
int time_limit;
int primal_heuristic;
int m;
int n;
int** graph;
vector<vector<int > > adj;
//cplex variables
IloEnv* env;
IloModel *model;
IloNumVarArray *variables;
IloRangeArray *constraints;
IloCplex *cplex;
};
#endif