-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTime_indexed.hpp
69 lines (51 loc) · 1.19 KB
/
Time_indexed.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
/*
* File: Time_indexed.hpp
* Author: Charlie Brown
*
* Created on 15 décembre 2015, 11:58
*/
#ifndef TIME_INDEXED_HPP
#define TIME_INDEXED_HPP
#include "Parser.h"
#include <ilcplex/ilocplex.h>
#include <list>
class Time_indexed{
public:
Time_indexed();
Time_indexed(Parser &p);
void solve(Parser& p);
void writeSolution(string fileName);
protected:
IloObjective objective(IloEnv &env);
void addConstraints(Parser &p);
/**
* Penser a supp la contrainte de ressouce
* @param p
*/
void addFeasibleConstraints(Parser &p);
/**
* creation d'une config realisable contenant j
* @param p
* @param j
*/
vector<int> createFeasibleConfig(Parser &p, int j);
/**
* creation de toute les config realisable
* @param p
* @return
*/
void createFeasibleConfig(Parser &p);
private:
IloEnv env;
IloModel model;
IloRangeArray constraints;
IloArray <IloArray<IloNumVar> > y;
IloArray <IloArray<IloNumVar> > xi;
list<IloArray<IloNum> >_ySol;
//all feasible config
vector<int> feasibleConfig;
int _n;
int _T;
int _r ;
};
#endif /* TIME_INDEXED_HPP */