/*****************************************************************//**
 * \file   Header.h
 * \brief  Contains the common includes of all the files in this project.
 * 
 * \author talmefta
 * \date   May 2022
 *********************************************************************/

#ifndef HEADER_H
#define HEADER_H

#include <assert.h>
#include <bitset>
#include <iostream>
#include <exception>
#include <fstream>
#include <direct.h>
#include <Windows.h>
#include <sstream>
#include <algorithm>
#include <vector>      
#include <list>      
#include <random>
#include <iomanip>
#include <chrono>
#include <numeric>
#include <ctime>
#include <map>
#include <math.h>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <json/json.h>

#include "gurobi_c++.h"



using namespace std;

constexpr auto		   MULTIPLE						= 1/*1.0e3*/;	/**< Precision variable.*/
constexpr auto		   EPSILON						= 1.0e-6;	/**< Precision variable.*/
constexpr auto		   OMEGA						= 1.0e+6;	/**< Precision variable.*/
constexpr auto		   TIME_CONVERSION				= 1.0;		/**< Time scaling.*/
constexpr auto		   VIOLATIONEPSILON				= 0.1;		/**< Violation tolerance for clique inequalities.*/
constexpr auto		   MAXLEVELTREESEPARATION		= ::OMEGA;		/**< VI are separated up to nodes of this level*/
constexpr auto		   MINLEVELTREESEPARATION		= 0;		/**< VI are separated up to nodes of this level*/
constexpr auto		   MAXCUTSNUMBER				= 100;		/**< VI are separated up to nodes of this level*/
constexpr auto		   MAXCUTSTIME					= 600;		/**< VI are separated up to nodes of this level*/
constexpr auto		   MAXTIMESEPARATIONROUND		= 60;		/**< VI are separated up to nodes of this level*/
constexpr auto		   MINDUALBOUNDIMPROVEMENTTOCUT = -1.0;		/**< VI are separated up to nodes of this level*/
constexpr auto		   CHAINSINITIALISATIONLENGTH = 3;			/**< VI are separated up to nodes of this level*/
constexpr auto		   CYCLESINITIALISATIONLENGTH = 3;			/**< VI are separated up to nodes of this level*/
constexpr auto		  PROMISINGLABELSPERITERATION = 500;			/**< VI are separated up to nodes of this level*/
constexpr auto		   PROMISINGVARIABLESPERITERATION = 10000000;			/**< VI are separated up to nodes of this level*/
constexpr auto		   EXCHANGESINITIALISATION = 30000;			/**< VI are separated up to nodes of this level*/
constexpr auto		   COVERSPRICING = 6;			/**< VI are separated up to nodes of this level*/
//constexpr auto		   MAXNUMBERCUTS				= 5;		/**< VI are separated up to nodes of this level*/
constexpr auto		   INEFFICACITYEPSILON			= 0.01;		/**< Inefficacity tolerance for cut slack variables.*/
constexpr auto         BIGM							= 500;		/**< Big M cost of artificial variable.*/
constexpr auto         MIN_COLUMNS_FOR_RM_HEURISTIC	= 500;		/**< Rm heuristic is called at the root node and then every 500 columns are inserted in the rmp */
constexpr auto		   MAX_NB_ITER_INEFFECTIVE_CUT	= 10;		/**< Maximum number of iterations so that the cut is considered as ineffective.*/
constexpr auto		   MAX_NB_SOL_POOL				= 30;		/**< Limit how many solutions to collect by Gurobi in ExactGenerator.*/
constexpr auto		   MAX_GAP_SOL_POOL				= 0.30;		/**< Limit the search space by setting a gap for the worst possible solution that will be accepted by Gurobi in ExactGenerator.*/
constexpr auto		   MAXROOTS = 1;							/**< Maximum percentage of node roots in Hoffman Padberg heuristic for odd holes.*/
constexpr auto		   SSIMAXSUBSETNUMBER = 1000000000;							/**< Maximum percentage of node roots in Hoffman Padberg heuristic for odd holes.*/

static	  auto		   my_seed						= 501844;	/**< Seed for random.*/
static	  std::mt19937 generator(my_seed);						/**< Random Mersenne Twister.*/

#endif //HEADER_H
