boipsolution.h
1.62 KB
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
73
74
75
#ifndef DEF_HBoipSolution
#define DEF_HBoipSolution
#include <utility>
#include <vector>
#include <string>
#include "utils.h"
class BoipSolution
{
public:
BoipSolution();
BoipSolution (float obj1, float obj2, std::vector< double > v);
BoipSolution (const BoipSolution &sol);
~BoipSolution ();
float get_obj1_() const;
float get_obj2_() const;
std::vector< double > get_v_() const;
int get_l_() const;
void set_l_(int l);
void set_obj1_(float obj1);
void set_obj2_(float obj2);
void set_v_(std::vector< double > v);
int dominate(BoipSolution s);
protected:
float obj1_; //value of objective 1
float obj2_; //value of objective 2
std::vector< double > v_; //values of the decision variable of the integer program
int l_; //label of Pareto set
};
class BoipChrSolution: public BoipSolution
{
public:
BoipChrSolution();
BoipChrSolution (float obj1, float obj2, std::vector< double > v,
std::vector< std::vector < double > > varVC, std::vector < double > varColorUsed);
BoipChrSolution (const BoipChrSolution &sol);
~BoipChrSolution ();
std::vector< std::vector < double > > get_varVC_() const;
void set_varVC_(std::vector< std::vector < double > > varVC);
std::vector< double > get_varColorUsed_() const;
void set_varColorUsed_(std::vector< double > varColorUsed);
private:
std::vector < std::vector < double > > varVC_; // vector to store the decision variables for each vertex and color
std::vector < double > varColorUsed_; // vector to store the decision variable for each color
};
#endif