boipsolution.h 1.62 KB
#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