items = ((Integer)RawBackend.steadyExecutionCounts.get(node)).intValue() * push;
if(RawBackend.steadyExecutionCounts.get(node)==null) items=1; else items = ((Integer)RawBackend.steadyExecutionCounts.get(node)).intValue() * push;
    private static int placementCostHelper(FlatNode node, HashSet routers)     {	//get all placed downstream nodes	Iterator downstream = getDownStream(node).iterator();	int sum = 0;	while (downstream.hasNext()) {	    FlatNode dest = (FlatNode)downstream.next();	    Coordinate[] route = 		(Coordinate[])Router.getRoute(node, dest).toArray(new Coordinate[1]);	    //find the number assigned on the path	    double numAssigned = 0.0;	    for (int i = 1; i < route.length - 1; i++) {		if (getNode(route[i]) != null) 		    numAssigned += 2.0;		else {		    //router tile		    if (routers.contains(route[i]))			numAssigned += 0.5;		    routers.add(route[i]);		}	    }	    //sqrt(calculate steadyStateExcutions * hops * pushed)	    int hops = route.length -2;	    int items = 0;	    	    	    //case 1:	    //if sending thru a splitter 	    if (node.edges[0].contents instanceof SIRSplitter) {		//if the final dest is a filter then just get the execution count of the 		//dest filter * its pop rate		if (dest.contents instanceof SIRFilter) {		    items = ((Integer)RawBackend.steadyExecutionCounts.get(dest)).intValue() *			((SIRFilter)dest.contents).getPopInt();		}		//we are sending to a joiner thru a splitter (should only happen when 		//a splitter is connected to a feedback loop).		else {		    double rate = 1.0;		    //calculate the percentage of time this path is taken for the		    //feedback loop		    if (dest.incomingWeights.length >= 2)			rate = ((double)dest.incomingWeights[0])/(double)(dest.incomingWeights[0] +							dest.incomingWeights[1]);		    items = (int)(((Integer)RawBackend.steadyExecutionCounts.get(dest)).intValue() / rate);		}	    }	    else {  //sending without an intermediate splitter		//if sending from a joiner, items = execution count		//if sending from a filter, items = exe count * items pushed		int push;		if (node.contents instanceof SIRJoiner)		    push = 1;		else 		    push = ((SIRFilter)node.contents).getPushInt();		items = ((Integer)RawBackend.steadyExecutionCounts.get(node)).intValue() *		    push;	    }	    sum += (items * hops) + (items * Util.getTypeSize(Util.getOutputType(node))) * 				     Math.pow(numAssigned * 2.0, 3.0);	}	return sum;    }