private static boolean perturbConfiguration(double T)
private static boolean perturbConfiguration(double T) throws Exception
    private static boolean perturbConfiguration(double T)     {	int first;	int second;		int e_old = placementCost();		//find 2 suitable nodes to swap	while (true) {	    first = getRandom();	    second = getRandom();		    if (first == second)		continue;	    if ((getNode(getTile(first)) == null) &&		(getNode(getTile(second)) == null))		continue;	    break;	}		FlatNode firstNode = getNode(getTile(first));	FlatNode secondNode = getNode(getTile(second));	//perform swap	assign(getTile(first), secondNode);	assign(getTile(second), firstNode);		//DECIDE if we should keep the change	int e_new = placementCost();	double P = 1.0;	double R = random.nextDouble();	if (e_new >= e_old)	    P = Math.exp((((double)e_old) - ((double)e_new)) / T);	if (R < P)	    return true;	else {	    //reject configuration	    assign(getTile(second), secondNode);	    assign(getTile(first), firstNode);	    return false;	}    }