private void calculateFitnesses(){
		
		fitnessSum = 0;
		
		minCost = -1;
		
		for(int i = 0;i<POPULATION_SIZE;i++){
			initRouteFromGene(genes[i]);
			double cost = travelingSalesman.calculateCosts(route);
			
			if(minCost < 0 || cost < minCost){
				minCost = cost;
				fittestGeneIndex = i;
			}
			
			fitnesses[i] = 1/cost;
		
			fitnessSum += fitnesses[i];
			
//			System.out.print("\ngene: ");printGene(genes[i]);
//			System.out.print("\nroute: ");printRoute();
//			System.out.println("\ncost: "+cost+", fitness: "+fitnesses[i]);
		}
	}