public Solution getNeighbouringSolutions()
	{
		Random random  = new Random();
		int solutionSize = solution.length;
		//firstly generate a number between 0 and the number of nodes -1
		int randomValue = random.nextInt(solutionSize);
		//list for all the neighbours of the node with the randomly generated index
		ArrayList<Integer> neighbours = new ArrayList();
		for(int i = 0; i<solutionSize; i++)
		{
			//add the node to the neighbors list only if the node is one of the selected nodes neighbors and if it was not already the specified neighbor 
			//in the original solution array
			if(graph.getBoolValue(randomValue, i) && solution[randomValue] != i)
				neighbours.add(i);
		}
//		System.out.println("random number: " + randomValue);
//		System.out.println("neighbours: ");
//		for(int i = 0; i<neighbours.size(); i++)
//			System.out.println(neighbours.get(i) + ", ");
		//if no other neighbours exist other than the original neighbour, return the original solution object
		if(neighbours.isEmpty())
		{
			System.out.println("could not find neighbours");
			return this;
		}
		else
		{
			int intra = getIntraConnections(randomValue);
			int total = getTotalConnections(randomValue);
			int max =  intra - (total - intra);
			int[] temp = new int[size];
			System.arraycopy(solution, 0, temp, 0, size);
			int newRandomValue = random.nextInt(neighbours.size());
			int someValue = newRandomValue;
			
			for (int i = 0; i < neighbours.size(); i++) 
			{
				int nIntra = getIntraConnections(neighbours.get(i));
				int nTotal = getTotalConnections(neighbours.get(i));
				if(nIntra - (nTotal - nIntra) > max)
				{
					max = nIntra - (nTotal - nIntra);
					someValue = i;
				}
			}
			//choose a random neighbour from the listed neighbours
			temp[randomValue] = neighbours.get(someValue);
			Solution result = new Solution(graph, temp);
			//return new neighbour
			return result;
		}
	}