public Solution simulatedAnnealing(){
		int delta = 0;
		double temperature = DEFAULT_TEMPERATURE;
		int iteration = 0;
		Solution bestSolution = solution;
		int initialCost = solution.calculateCost();
		do {
				if(initialCost == 0) {
					break;
				}
				Solution tempSolution = new Solution(solution);
				doRandomMove(tempSolution);
				//doMoveOnConflict(tempSolution);
				delta = solution.calculateCost() - tempSolution.calculateCost();
				double probability = probability();
				double e = Math.exp(-delta/temperature);
				//System.out.println("proba=" + probability + "; e=" + e);
				//System.out.println(solution.getVector() + " cost=" + solution.calculateCost());
				//System.out.println(tempSolution.getVector() + " cost=" + tempSolution.calculateCost());
				if (delta > 0 || (probability < e)){
					solution = tempSolution;
				}
				iteration++;
				temperature *= 0.99;
				System.out.println("iteration #" + iteration + "; cost=" + solution.calculateCost());
				
				if (solution.calculateCost() < bestSolution.calculateCost()) {
					bestSolution = solution;
				}
				
		} while (solution.calculateCost() > 0 && iteration < maxIteration);
		
		System.out.println("best cost=" + bestSolution.calculateCost() + " (initial cost = " + initialCost + ")");
		return bestSolution;
	}