-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathConfigInt.hpp
72 lines (51 loc) · 990 Bytes
/
ConfigInt.hpp
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* File: ConfigInt.hpp
* Author: Charlie Brown
*
* Created on 5 janvier 2016, 17:58
*/
#ifndef CONFIG_INT_HPP
#define CONFIG_INT_HPP
#include "Parser.h"
#include <ilcplex/ilocplex.h>
#include <fstream>
#include <string>
#include <list>
struct conf{
int x;
int y;
};
typedef vector<vector<int> > Config;
class ConfigInt{
public:
ConfigInt();
ConfigInt(Parser &p);
void solve(Parser &p);
int bigM();
IloNumArray v();
vector<int> Slate();
void writeSolution(string fileName);
protected:
IloObjective objective();
void addConstraints(Parser &p);
bool createConfig(IloNumArray v);
void addConfig();
private:
IloEnv env;
IloModel model;
IloRangeArray constraints;
IloArray <IloArray<IloNumVar> > x;
IloNumVarArray S;
IloNumArray _v;
list<int> _vSol;
vector<int> _Slate;
Config F;
vector<int> _p;
vector<int> _B;
vector< vector<int > > _b;
int _bigM;
int _n;
int _T;
int _r ;
};
#endif /* CONFIG_INT_HPP */