#ifndef __POSEQSEL__
#define __POSEQSEL__
#include <string>
//#include <strstream>
#include <time.h>
#include <fstream>
#include<iostream>
#include<vector>
#include<math.h>
using namespace std;

struct Individual
{
	vector<int> itemString;
	float fitness;
	//int size;
	Individual();
};

struct Edge
{
	int head;
	int tail;
	Edge();
	Edge(int head, int tail);
};

class POSeqSel{
private:
	int constraint = 1;
	long iterationTime = 1;
	int n = 1;
	bool replicatedElement = true;
	vector<int> solution;
	vector<Individual> population, tempOptimum;

	vector<int> DeleteOneItem(vector<int> itemString, int position);
	vector<int> InsertOneItem(vector<int> itemString, int position, int item);
	bool IsDominate(Individual individual1, Individual individual2);
	int PoissonDistribution();
	Individual FindCurrentOptimum(vector<Individual> population);
	vector<int> Mutation_Repetition(vector<int> s_temp);
	vector<int> Mutation_NonRepetition(vector<int> s_temp);
	bool IsAppearedInVector(vector<int> myVector, int num);

public:
	void SetIterationTime(long num);
	void SetConstraint(int k);
	void SetSize(int n);
	void DOPOSeqSel();
	float EvaluateObjective(vector<int> itemString);// replace this with your objective evaluation.
	vector<Individual> ReturnResult();
	void SetIsRepetition(bool flag);

};


#endif // 