System.out.println("Final Cost: " + currentCost +
System.out.println("\nFinal Cost: " + currentCost +
    public void simAnnealAssign(FlatNode node)     {	System.out.println("Simulated Annealing Assignment");	int nsucc =0, j = 0;	double currentCost = 0.0, minCost = 0.0;	//number of paths tried at an iteration	int nover = 100; //* RawBackend.rawRows * RawBackend.rawColumns;	try {	    random = new Random(17);	    //random placement	    //randomPlacement();	    assert false;	    	    filew = new FileWriter("simanneal.out");	    int configuration = 0;	    currentCost = placementCost(false);	    assert currentCost >= 0.0;	    System.out.println("Initial Cost: " + currentCost);	    	    if (KjcOptions.noanneal || KjcOptions.decoupled) {		dumpLayout("noanneal.dot");		return;	    }	    //as a little hack, we will cache the layout with the minimum cost	    //these two hashmaps store this layout	    HashMap sirMin = (HashMap)SIRassignment.clone();	    HashMap tileMin = (HashMap)tileAssignment.clone();	    minCost = currentCost;	    	    if (currentCost == 0.0) {		dumpLayout("layout.dot");		return;	    }	    //The first iteration is really just to get a 	    //good initial layout.  Some random layouts really kill the algorithm	    for (int two = 0; two < rawChip.getYSize() ; two++) {		double t = annealMaxTemp(); 		double tFinal = annealMinTemp();		while (true) {		    int k = 0;		    nsucc = 0;		    for (k = 0; k < nover; k++) {			//true if config change was accepted			boolean accepted = perturbConfiguration(t);			currentCost = placementCost(false);			//the layout should always be legal			assert currentCost >= 0.0;						if (accepted) {			    filew.write(configuration++ + " " + currentCost + "\n");			    nsucc++;			}			//keep the layout with the minimum cost			if (currentCost < minCost) {			    minCost = currentCost;			    //save the layout with the minimum cost			    sirMin = (HashMap)SIRassignment.clone();			    tileMin = (HashMap)tileAssignment.clone();			}			//this will be the final layout			if (currentCost == 0.0)			    break;		    }		    		    t *= TFACTR;    		    if (nsucc == 0) break;		    if (currentCost == 0)			break;		    if (t <= tFinal)			break;		    j++;		}		if (currentCost == 0)		    break;	    }	   	    currentCost = placementCost(false);	    System.out.println("Final Cost: " + currentCost + 			       " Min Cost : " + minCost + 			       " in  " + j + " iterations.");	    if (minCost < currentCost) {		SIRassignment = sirMin;		tileAssignment = tileMin;	    }	    	    filew.close();	}	catch (Exception e) {	    e.printStackTrace();	}	dumpLayout("layout.dot");    }