All Classes Files Functions Variables Pages
Epsilon.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
4 #include <deque>
5 #include <vector>
6 #include <algorithm>
7 #include <math.h>
8 
9 #include "Efficient.h"
10 #include "Box.h"
11 
12 #include <ilcplex/ilocplex.h>
13 
14 using namespace std;
15 
16 ILOSTLBEGIN
17 
60 class Epsilon {
61  private:
63  int i;
65  int j;
67  deque<Efficient*>::iterator iteff;
69  deque<Efficient*>::iterator it;
71  deque<Box*>::iterator itbox;
72  protected:
74  int p;
76  int counter;
78  int number;
80  int delta;
82  int numeff;
84  IloEnv env;
86  IloCplex cplex;
88  vector<IloExpr> objs;
90  IloExpr allobj;
92  IloConstraintArray cons;
93 
95  bool found;
97  deque<Efficient*> effset;
99  deque<Box*> boxes;
101  deque<Box*> T_box;
103  int sizeb;
105  int sizet;
106 
108  IloModel epsmodel;
110  IloObjective objfunc;
112  deque<IloRange> range_obj;
114  deque<int> liste;
116  vector<vector<IloNumVar> > varArray;
118  vector<vector<IloNum> > numArray;
120  int* ideal;
122  int* upper;
129  int findMaxAreaBox();
130 
131 
142  bool epsilonModel(int k, const int* rhs, int* obj);
143 
150  void getParameters(char* fileName);
151 
160  bool checkEfficient(int* obj);
161 
170  void updateList(int num, int* obj);
171 
180  void removeBox(int num, int* rhs, int* obj);
181 
182 
189  bool obtainBounds();
190  public:
197  Epsilon(int _p);
198 
203  ~Epsilon(void);
204 
211  void mainLoop(char* fileName);
212 };
213 
214 
215 
216 
217 
218 
219 
220 
221 
222 
223 
IloObjective objfunc
Objective function for the first and second formulation.
Definition: Epsilon.h:110
int counter
Number of solved models. Number of calls of two-stage formulation.
Definition: Epsilon.h:76
vector< IloExpr > objs
Objective functions of the problem instance, for all .
Definition: Epsilon.h:88
bool found
Flag for the nondominated solution. Let be the optimal solution of two-stage formulation. If , than true. Otherwise, false.
Definition: Epsilon.h:95
IloConstraintArray cons
Set of constraints of the problem.
Definition: Epsilon.h:92
IloExpr allobj
Convex combination of all objective functions with unit weight coefficients, .
Definition: Epsilon.h:90
deque< IloRange > range_obj
Cplex range object for the objective functions which is used to define upper and lower bounds on the ...
Definition: Epsilon.h:112
int number
Number of constraints in the problem instance.
Definition: Epsilon.h:78
IloCplex cplex
Cplex object.
Definition: Epsilon.h:86
deque< int > liste
Indexes of the removed rectangles.
Definition: Epsilon.h:114
int sizet
Number of rectangles in the temporary rectangle list.
Definition: Epsilon.h:105
deque< Box * > T_box
Temporary rectangle set which is used for rectangular subdivision.
Definition: Epsilon.h:101
IloModel epsmodel
Model object for the two-stage formulation.
Definition: Epsilon.h:108
vector< vector< IloNum > > numArray
Variable coefficients in the objective functions.
Definition: Epsilon.h:118
int * upper
Upper bound for the objective functions, .
Definition: Epsilon.h:122
int p
Number of objective functions.
Definition: Epsilon.h:74
deque< Efficient * > effset
Set of nondominated solutions, .
Definition: Epsilon.h:97
-Constraint Method Class
Definition: Epsilon.h:60
int * ideal
Ideal point, .
Definition: Epsilon.h:120
IloEnv env
Environment object.
Definition: Epsilon.h:84
vector< vector< IloNumVar > > varArray
The list of variables.
Definition: Epsilon.h:116
int sizeb
Number of rectangles, .
Definition: Epsilon.h:103
int delta
Tolerance for the -Constraint formulation.
Definition: Epsilon.h:80
int numeff
Number of nondominated solutions.
Definition: Epsilon.h:82
deque< Box * > boxes
Set of rectangles, .
Definition: Epsilon.h:99