if (dynamicCost < 0.0) { if (debug) System.out.println("Dynamic routes cross!"); return -1.0; }
    public double placementCost(boolean debug)     {	/** tiles used already to route dynamic data between 	    SSGs, a tile can only be used once **/	HashSet dynTilesUsed = new HashSet();	/** Tiles already used by previous SSGs to route data	    over the static network, a switch can only route 	    data from one SSG **/	HashSet staticTilesUsed = new HashSet();	double cost = 0.0;	for (int i = 0; i < streamGraph.getStaticSubGraphs().length; i++) {	    StaticStreamGraph ssg = streamGraph.getStaticSubGraphs()[i];	    double dynamicCost = 0.0;	    double staticCost = 0.0;	    	    dynamicCost = getDynamicCost(ssg, dynTilesUsed);	    if (dynamicCost < 0.0) {		if (debug)		    System.out.println("Dynamic routes cross!");		return -1.0;	    }	    staticCost = getStaticCost(ssg, staticTilesUsed);	    if (staticCost < 0.0) {		if (debug)		    System.out.println("Static route of SSG crosses another SSG!");		return -1.0;	    }	    cost += dynamicCost + staticCost;	}		return cost;    }