Jelajahi Sumber

Partie 2 getion moyenne et epsilon

Arthur Brandao 6 tahun lalu
induk
melakukan
9693920ce7

+ 153 - 0
Bandit/ControlBandit.cpp

@@ -0,0 +1,153 @@
+#include <unistd.h>
+#include "ControlBandit.hpp"
+
+/* --- Public --- */
+
+ControlBandit::ControlBandit() {
+	//Initialisation de la queue pour les 1er passes
+	for(int i = 0; i < 2; i++) {
+		//2 tours pour les 2 passe initiale
+		for(int f = 2; f < 6; f++) {
+			for(int h = 0; h < 7; h++) {
+				fillAndHeuristic fah;
+				fah.fill = f;
+				fah.heuristic = h;
+				queue.push_back(fah);
+			}
+		}
+	}
+	//Remplissage tableau moyenne
+	for(int f = 0; f < NB_FILL; f++) {
+		favg[f] = 0;
+		fnb[f] = 0;
+	}
+	for(int h = 0; h < NB_HEURISTIC; h++){
+		havg[h] = 0;
+		hnb[h] = 0;
+	}
+	//Ini method
+	method = MT_AVG;
+	epsilon = 10;
+	//Ini random
+	srand(getpid());
+}
+
+ControlBandit::~ControlBandit() {
+
+}
+
+void ControlBandit::setMethod(int cstMethod) {
+	method = cstMethod;
+}
+
+void ControlBandit::setEpsilon(double newEpsilon) {
+	if(newEpsilon >= 0 && newEpsilon <= 1) {
+		epsilon = (int) (newEpsilon * 100);
+	}
+}
+
+bool ControlBandit::queueIsEmpty() {
+	bool res;
+	mutex.lock();
+	res = queue.size() == 0;
+	mutex.unlock();
+	return res;
+}
+
+fillAndHeuristic ControlBandit::next() {
+	fillAndHeuristic fah;
+	mutex.lock();
+	if(queue.size() == 0) {
+		switch(method) {
+			case MT_EPS:
+				fah = this->methodEps();
+				break;
+			case MT_EMA:
+				fah = this->methodEma();
+				break;
+			default:
+				fah = this->methodAvg();
+		}
+	} else {
+		fah = queue[0];
+		queue.erase(queue.begin());
+	}
+	mutex.unlock();
+	return fah;
+}
+
+void ControlBandit::addFill(int num, int score) {
+	num -= 2;
+	mutexFill.lock();
+	favg[num] = favg[num] + (1 / (fnb[num] + 1.0)) * (score - favg[num]);
+	fnb[num]++;
+	mutexFill.unlock();
+}
+
+void ControlBandit::addHeuristic(int num, int score) {
+	mutexHeuristic.lock();
+	havg[num] = havg[num] + (1 / (hnb[num] + 1.0)) * (score - havg[num]);
+	hnb[num]++;
+	mutexHeuristic.unlock();
+}
+
+/* --- Private --- */
+
+fillAndHeuristic ControlBandit::methodAvg() {
+	fillAndHeuristic fah;
+	fah.fill = this->getBestFill();
+	fah.heuristic = this->getBestHeuristic();
+	return fah;
+}
+
+fillAndHeuristic ControlBandit::methodEps() {
+	fillAndHeuristic fah;
+	//Tirage au sort pour savoir si on prend la meilleur moyenne ou non
+	int random = rand() % 100;
+	if(random < epsilon) {
+		//Tirage au sort de fill et heuristic
+		fah.fill = this->getRandomFill();
+		fah.heuristic = this->getRandomHeuristic();
+		printf("=== Random === : %d %d\n", fah.fill, fah.heuristic);
+	} else {
+		//Utilisation des meilleurs fill et heuristic
+		fah.fill = this->getBestFill();
+		fah.heuristic = this->getBestHeuristic();
+	}
+	return fah;
+}
+
+fillAndHeuristic ControlBandit::methodEma() {
+	fillAndHeuristic fah;
+	fah.fill = -1;
+	fah.heuristic = -1;
+	return fah;
+}
+
+int ControlBandit::getBestFill() {
+	int max = 0;
+	int fill = 0;
+	mutexFill.lock();
+	for(int i = 0; i < NB_FILL; i++) {
+		if(favg[i] > max) {
+			max = favg[i];
+			fill = i;
+		}
+	}
+	mutexFill.unlock();
+	return fill + 2;
+}
+
+int ControlBandit::getBestHeuristic() {
+	int max = 0;
+	int h = 0;
+	mutexHeuristic.lock();
+	for(int i = 0; i < NB_HEURISTIC; i++) {
+		if(havg[i] > max) {
+			max = havg[i];
+			h = i;
+		}
+	}
+	mutexHeuristic.unlock();
+	return h;
+}

+ 59 - 0
Bandit/ControlBandit.hpp

@@ -0,0 +1,59 @@
+#ifndef CONTROLBANDIT_HPP
+#define CONTROLBANDIT_HPP 
+
+/* --- Include --- */
+#include <mutex>
+#include <vector>
+#include <stdlib.h>
+
+/* --- Define --- */
+#define NB_FILL 4
+#define NB_HEURISTIC 7
+#define MT_AVG 0
+#define MT_EPS 1
+#define MT_EMA 2
+
+/* --- Structure --- */
+typedef struct {
+	int fill;
+	int heuristic;
+}fillAndHeuristic;
+
+class ControlBandit {
+	public:
+		ControlBandit();
+		~ControlBandit();
+		
+		void setMethod(int);
+		void setEpsilon(double);
+
+		bool queueIsEmpty();
+		fillAndHeuristic next();
+
+		void addFill(int, int);
+		void addHeuristic(int, int);
+
+	private:
+		int method;
+		int epsilon;
+		std::mutex mutex;
+		std::mutex mutexFill;
+		std::mutex mutexHeuristic;
+		std::vector<fillAndHeuristic> queue;
+		double favg[NB_FILL];
+		unsigned int fnb[NB_FILL];
+		double havg[NB_HEURISTIC];
+		unsigned int hnb[NB_HEURISTIC];
+
+		fillAndHeuristic methodAvg();
+		fillAndHeuristic methodEps();
+		fillAndHeuristic methodEma();
+
+		int getBestFill();
+		int getBestHeuristic();
+		inline int getRandomFill() {return rand() % 4 + 2;}
+		inline int getRandomHeuristic() {return rand() % 7;}
+
+};
+
+#endif

+ 0 - 0
Part_2/GSAT/ArrayFiller.cpp → Bandit/GSAT/ArrayFiller.cpp


+ 0 - 0
Part_2/GSAT/ArrayFiller.hpp → Bandit/GSAT/ArrayFiller.hpp


+ 0 - 0
Part_2/GSAT/CFormula.cpp → Bandit/GSAT/CFormula.cpp


+ 0 - 0
Part_2/GSAT/CFormula.hpp → Bandit/GSAT/CFormula.hpp


+ 0 - 0
Part_2/GSAT/FillMethod.hpp → Bandit/GSAT/FillMethod.hpp


+ 0 - 0
Part_2/GSAT/GSAT.cpp → Bandit/GSAT/GSAT.cpp


+ 0 - 0
Part_2/GSAT/GSAT.hpp → Bandit/GSAT/GSAT.hpp


+ 0 - 0
Part_2/GSAT/HeuristicMethod.hpp → Bandit/GSAT/HeuristicMethod.hpp


TEMPAT SAMPAH
Bandit/GSATSolver


+ 193 - 0
Bandit/GSATThread.cpp

@@ -0,0 +1,193 @@
+#include <iostream>
+#include <stdlib.h>
+#include <stdio.h>
+#include "GSATThread.hpp"
+#include "color.h"
+
+/* --- Public --- */
+
+GSATThread::GSATThread(int _nbThread, int argc, char** argv) {
+	nbThread = _nbThread;
+	gsat = std::vector<GSAT*>(_nbThread);
+	time = std::vector<double>(_nbThread);
+	threads = std::vector<std::thread>(_nbThread);
+	for(int i = 0; i < _nbThread; i++) {
+		gsat[i] = new GSAT();
+		gsat[i]->setParameters(argc,argv);
+  		gsat[i]->initialize();
+  		time[i] = 0;
+	}
+}
+
+GSATThread::~GSATThread() {
+	for(int i = 0; i < nbThread; i++) {
+		delete gsat[i];
+	}
+}
+
+void GSATThread::useAverageMethod() {
+	cb.setMethod(MT_AVG);
+}
+
+void GSATThread::useEpsilonMethod(double epsilon) {
+	cb.setMethod(MT_EPS);
+	cb.setEpsilon(epsilon);
+}
+
+bool GSATThread::solve() {
+	return this->solve(true);
+}
+
+bool GSATThread::solve(bool verbose) {
+	end = false;
+	calcTime = 0;
+	//Lance Initialise
+	printf("--- Initialize ---------------------------------------------------------------------------\n");
+	this->initBandit(verbose);
+	//Si la reponse n'a pas été trouvé durant l'initialisation
+	if(!end) {
+		//Lance les bandit avec la méthode choisit
+		printf("--- Search -------------------------------------------------------------------------------\n");
+		this->runBandit(verbose);
+	}
+	//Resultat
+	if(verbose) {
+		printf("--- Result -------------------------------------------------------------------------------\n");
+		this->printResult();
+	}
+  	return end;
+}
+
+void GSATThread::printResult() {
+	if(end) {
+		printf(GREEN "s SATISFIABLE\n" RESET);
+	} else {
+		printf(RED "NOT FOUND\n" RESET);
+	}
+	//printf("s %s\n",end?"SATISFIABLE":"NOT FOUND");
+	if(!end && calcTime == 0) {
+		//Si on à pas trouver
+		calcTime = gsat[0]->realTime() - time[0];
+	}
+	printf(YELLOW);
+	if(end) {
+		printf("c [thread:%2d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
+			result.threadId,
+			result.nbIteration,
+			result.heuristicFill,
+			result.heuristicSolve,
+			result.nbSatisfiedClausesFill,
+			result.nbSatisfiedClausesSolve);
+	}
+  	printf("c real time : %.4f seconds\n", calcTime);
+  	printf(RESET);
+}
+
+/* --- Private --- */
+
+void GSATThread::initBandit(bool verbose) {
+	threads.clear();
+	//Lance thread
+	for(int i = 0; i < nbThread; i++) {
+		time[i] = gsat[i]->realTime();
+		threads[i] = std::thread(&GSATThread::initThread, this, i, verbose);
+	}
+	//Attend resultat
+	for(int i = 0; i < nbThread; i++){
+		threads[i].join();
+	}
+}
+
+void GSATThread::runBandit(bool verbose) {
+	threads.clear();
+	//Lance thread
+	for(int i = 0; i < nbThread; i++) {
+		threads[i] = std::thread(&GSATThread::runThread, this, i, verbose);
+	}
+	//Attend resultat
+	for(int i = 0; i < nbThread; i++){
+		threads[i].join();
+	}
+}
+
+void GSATThread::initThread(int id, bool verbose) {
+	//Les threads vont jouer les bandits pour etablir les moyennes
+	bool solve = false;
+	while(!end && !solve && !cb.queueIsEmpty()){
+		//Recup le prochaine fill et heuristic à tester
+		fillAndHeuristic fah = cb.next();
+		//Calcul
+		solve = gsat[id]->start(fah.fill, fah.heuristic);
+		//Affiche
+		if(verbose) {
+			if(solve) {
+				printf(CYAN);
+			}
+			printf("c [thread:%2d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
+				id,
+		   		gsat[id]->getNbIterations(),
+		   		gsat[id]->getHeuristicFill(),
+		   		gsat[id]->getHeuristicSolve(),
+		   		gsat[id]->getNbSatisfiedClausesFill(),
+		   		gsat[id]->getNbSatisfiedClausesSolve());
+			if(solve) {
+				printf(RESET);
+			}
+		}
+		//Ajoute le resultat aux moyenne
+		cb.addFill(fah.fill, gsat[id]->getNbSatisfiedClausesFill());
+		cb.addHeuristic(fah.heuristic, gsat[id]->getNbSatisfiedClausesSolve());
+	}
+	//Si 1er arreter
+	if(!end && solve) {
+		end = true;
+		calcTime = gsat[id]->realTime() - time[id];
+		result.threadId = id;
+		result.nbIteration = gsat[id]->getNbIterations();
+		result.heuristicFill = gsat[id]->getHeuristicFill();
+		result.heuristicSolve = gsat[id]->getHeuristicSolve();
+		result.nbSatisfiedClausesFill = gsat[id]->getNbSatisfiedClausesFill();
+		result.nbSatisfiedClausesSolve = gsat[id]->getNbSatisfiedClausesSolve();
+	}
+}
+
+void GSATThread::runThread(int id, bool verbose) {
+	//Les threads vont jouer les bandits avec la méthode choisit
+	bool solve = false;
+	while(!end && !solve){
+		//Recup le prochaine fill et heuristic à tester
+		fillAndHeuristic fah = cb.next();
+		//Calcul
+		solve = gsat[id]->start(fah.fill, fah.heuristic);
+		//Affiche
+		if(verbose) {
+			if(solve) {
+				printf(CYAN);
+			}
+			printf("c [thread:%2d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
+				id,
+		   		gsat[id]->getNbIterations(),
+		   		gsat[id]->getHeuristicFill(),
+		   		gsat[id]->getHeuristicSolve(),
+		   		gsat[id]->getNbSatisfiedClausesFill(),
+		   		gsat[id]->getNbSatisfiedClausesSolve());
+			if(solve) {
+				printf(RESET);
+			}
+		}
+		//Ajoute le resultat aux moyenne
+		cb.addFill(fah.fill, gsat[id]->getNbSatisfiedClausesFill());
+		cb.addHeuristic(fah.heuristic, gsat[id]->getNbSatisfiedClausesSolve());
+	}
+	//Si 1er arreter
+	if(!end && solve) {
+		end = true;
+		calcTime = gsat[id]->realTime() - time[id];
+		result.threadId = id;
+		result.nbIteration = gsat[id]->getNbIterations();
+		result.heuristicFill = gsat[id]->getHeuristicFill();
+		result.heuristicSolve = gsat[id]->getHeuristicSolve();
+		result.nbSatisfiedClausesFill = gsat[id]->getNbSatisfiedClausesFill();
+		result.nbSatisfiedClausesSolve = gsat[id]->getNbSatisfiedClausesSolve();
+	}
+}

+ 15 - 6
Part_2/GSATThread.hpp → Bandit/GSATThread.hpp

@@ -5,9 +5,10 @@
 #include <vector>
 #include <thread>
 #include "GSAT/GSAT.hpp"
+#include "ControlBandit.hpp"
 
 /* --- Constante --- */
-#define NB_THREAD 4
+#define DEFAULT_NB_THREAD 4
 
 /* --- Structure --- */
 typedef struct {
@@ -21,27 +22,35 @@ typedef struct {
 
 class GSATThread {
 	public:
-		GSATThread(int, char**);
+		GSATThread(int, int, char**);
 		~GSATThread();
+
+		void useAverageMethod();
+		void useEpsilonMethod(double);
+
 		bool solve();
-		bool solve(int);
 		bool solve(bool);
-		bool solve(int, bool);
 		void printResult();
+		
 		/* --- Getter --- */
 		inline unsigned int getNbVariables() {return gsat[0]->getNbVariables();}
 		inline unsigned int getNbClauses() {return gsat[0]->getNbClauses();}
 
 	private:
+		ControlBandit cb;
 		bool end;
 		double calcTime;
+		int nbThread;
 		std::vector<GSAT*> gsat;
 		std::vector<double> time;
 		std::vector<std::thread> threads;
-		int maxIteration;
 		GSATResult result;
 
-		void solverThread(int, bool);
+		void initBandit(bool);
+		void runBandit(bool);
+
+		void initThread(int, bool);
+		void runThread(int, bool);
 };
 
 #endif

+ 45 - 8
Part_2/Main.cpp → Bandit/Main.cpp

@@ -7,24 +7,54 @@
 
 using namespace std;
 
+void test() {
+    /*ControlBandit cb;
+    fillAndHeuristic fah;
+    while(!cb.queueIsEmpty()) {
+        fah = cb.next();
+        printf("%d %d\n", fah.fill, fah.heuristic);
+    }*/
+
+    srand(getpid());
+    double ref = 0;
+    double avg = 0;
+    int nb = 0;
+
+    int rdm;
+    for(int i = 0; i < 100; i++) {
+        rdm = rand();
+        avg = avg + (1 / (nb + 1.0)) * (rdm - avg);
+        nb++;
+        ref += rdm;
+    }
+    printf("ref : %f, ite : %f\n", ref/100.0, avg);
+
+    exit(0);
+}
+
 void help(char* prog) {
-    fprintf(stderr, "usage: %s -i file.cnf [-s] [-m int]\n\t-s Silent mode\n\t-m Max iteration number\n", prog);
+    fprintf(stderr, "usage: %s -i file.cnf [-t int] [-s] [-e double]\n\t-t Number of threads to use\n\t-s Silent mode\n\t-e Use epsilon greedy method with the value (0 <= value <= 1)\n", prog);
     exit(1);
 }
 
 int main(int argc, char* argv[]) {
+
+    //test();
+
     extern char * optarg; 
-    int maxIteration = 0;
+    int nbThread = DEFAULT_NB_THREAD;
     bool verbose = true;
     int opt;
     bool optI = false;
+    bool optE = false;
+    double epsilon = 0.1;
 
     char** gsatArg = (char**) malloc(sizeof(char*) * 3);
     gsatArg[0] = (char*) malloc(sizeof(char) * strlen(argv[0]) + 1);
     memset(gsatArg[0], 0, strlen(argv[0]) + 1);
     strncpy(gsatArg[0], argv[0], strlen(argv[0]));
 
-    while((opt = getopt(argc, argv, "si:m:")) != -1) {
+    while((opt = getopt(argc, argv, "si:t:e:")) != -1) {
         switch(opt) {
             case 'i':
                 optI = true;
@@ -35,11 +65,15 @@ int main(int argc, char* argv[]) {
                 memset(gsatArg[2], 0, strlen(optarg) + 1);
                 strncpy(gsatArg[2], optarg, strlen(optarg));
                 break;
+            case 't':
+                nbThread = atoi(optarg);
+                break;
             case 's':
                 verbose = false;
                 break;
-            case 'm':
-                maxIteration = atoi(optarg);
+            case 'e':
+                optE = true;
+                epsilon = strtod(optarg, NULL);
                 break;
             case '?':
                 help(argv[0]); 
@@ -50,11 +84,14 @@ int main(int argc, char* argv[]) {
         help(argv[0]);
     }
   
-    GSATThread* gsat = new GSATThread(3, gsatArg);
-    printf("c nbThreads: %d\n", NB_THREAD);
+    GSATThread* gsat = new GSATThread(nbThread, 3, gsatArg);
+    if(optE) {
+        gsat->useEpsilonMethod(epsilon);
+    }
+    printf("c nbThreads: %d\n", nbThread);
     printf("c nbVariables: %d\n", gsat->getNbVariables());
     printf("c nbClauses: %d\n", gsat->getNbClauses());
-    bool result = gsat->solve(maxIteration, verbose);
+    bool result = gsat->solve(verbose);
     if(!verbose) {
         printf("s %s\n", result?"SATISFIABLE":"NOT FOUND");
     }

+ 5 - 2
Part_2/Makefile → Bandit/Makefile

@@ -1,6 +1,6 @@
 CXXFLAGS = -std=c++0x -O2 -g -Wall -fmessage-length=0 -Wreorder -Wwrite-strings -Wsign-compare
 
-OBJS = Main.o GSATThread.o GSAT/GSAT.o GSAT/ArrayFiller.o GSAT/CFormula.o
+OBJS = Main.o GSATThread.o ControlBandit.o GSAT/GSAT.o GSAT/ArrayFiller.o GSAT/CFormula.o
 
 LIBS = -lpthread
 
@@ -17,4 +17,7 @@ clean:
 	rm -rf *~
 
 run:
-	./GSATSolver -i ../benchmarks/uf150/uf150-099.cnf
+	./GSATSolver -i ../benchmarks/uf150/uf150-099.cnf -t 4
+
+epsilon:
+	./GSATSolver -i ../benchmarks/uf150/uf150-099.cnf -t 4 -e 0.2

+ 0 - 0
Part_2/README.txt → Bandit/README.txt


+ 0 - 0
Part_2/color.h → Bandit/color.h


+ 0 - 122
Part_2/GSATThread.cpp

@@ -1,122 +0,0 @@
-#include <iostream>
-#include <stdlib.h>
-#include <stdio.h>
-#include "GSATThread.hpp"
-#include "color.h"
-
-/* --- Public --- */
-
-GSATThread::GSATThread(int argc, char** argv) {
-	gsat = std::vector<GSAT*>(NB_THREAD);
-	time = std::vector<double>(NB_THREAD);
-	threads = std::vector<std::thread>(NB_THREAD);
-	for(int i = 0; i < NB_THREAD; i++) {
-		gsat[i] = new GSAT();
-		gsat[i]->setParameters(argc,argv);
-  		gsat[i]->initialize();
-  		time[i] = 0;
-	}
-}
-
-GSATThread::~GSATThread() {
-	for(int i = 0; i < NB_THREAD; i++) {
-		delete gsat[i];
-	}
-}
-
-bool GSATThread::solve() {
-	return this->solve(0, true);
-}
-
-bool GSATThread::solve(int maxIteration) {
-	return this->solve(maxIteration, true);
-}
-
-bool GSATThread::solve(bool verbose) {
-	return this->solve(0, verbose);
-}
-
-bool GSATThread::solve(int _maxIteration, bool verbose) {
-	threads.clear();
-	end = false;
-	calcTime = 0;
-	maxIteration = _maxIteration;
-	//Lance thread
-	for(int i = 0; i < NB_THREAD; i++) {
-		time[i] = gsat[i]->realTime();
-		threads[i] = std::thread(&GSATThread::solverThread, this, i, verbose);
-	}
-	//Attend resultat
-	for(int i = 0; i < NB_THREAD; i++){
-		threads[i].join();
-	}
-	//Resultat
-	if(verbose) {
-		printf("------------------------------------------------------------------------------------------\n");
-		this->printResult();
-	}
-  	return end;
-}
-
-void GSATThread::printResult() {
-	if(end) {
-		printf(GREEN "s SATISFIABLE\n" RESET);
-	} else {
-		printf(RED "NOT FOUND\n" RESET);
-	}
-	//printf("s %s\n",end?"SATISFIABLE":"NOT FOUND");
-	if(!end && calcTime == 0) {
-		//Si on à pas trouver
-		calcTime = gsat[0]->realTime() - time[0];
-	}
-	printf(YELLOW);
-	if(end) {
-		printf("c [thread:%2d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
-			result.threadId,
-			result.nbIteration,
-			result.heuristicFill,
-			result.heuristicSolve,
-			result.nbSatisfiedClausesFill,
-			result.nbSatisfiedClausesSolve);
-	}
-  	printf("c real time : %.4f seconds\n", calcTime);
-  	printf(RESET);
-}
-
-/* --- Private --- */
-
-void GSATThread::solverThread(int id, bool verbose) {
-	//Resolution
-	bool solve = false;
-	int cpt = 0;
-	while(!end && !solve && (maxIteration == 0 || cpt < maxIteration)){
-		solve = gsat[id]->start();
-		if(verbose) {
-			if(solve) {
-				printf(CYAN);
-			}
-			printf("c [thread:%2d][iteration:%5d][fill:%d][heuristic:%d]Satisfied clauses (begin: %d)(end:%d)\n",
-				id,
-		   		gsat[id]->getNbIterations(),
-		   		gsat[id]->getHeuristicFill(),
-		   		gsat[id]->getHeuristicSolve(),
-		   		gsat[id]->getNbSatisfiedClausesFill(),
-		   		gsat[id]->getNbSatisfiedClausesSolve());
-			if(solve) {
-				printf(RESET);
-			}
-		}
-		cpt++;
-	}
-	//Si 1er arreter
-	if(!end && solve) {
-		end = true;
-		calcTime = gsat[id]->realTime() - time[id];
-		result.threadId = id;
-		result.nbIteration = gsat[id]->getNbIterations();
-		result.heuristicFill = gsat[id]->getHeuristicFill();
-		result.heuristicSolve = gsat[id]->getHeuristicSolve();
-		result.nbSatisfiedClausesFill = gsat[id]->getNbSatisfiedClausesFill();
-		result.nbSatisfiedClausesSolve = gsat[id]->getNbSatisfiedClausesSolve();
-	}
-}