System.out.println("Scheduling Trace: " + trace + " at time "
SpaceTimeBackend.println("Scheduling Trace: " + trace + " at time "
    private void scheduleTrace(Trace trace,                               LinkedList sortedList) {        assert trace != null;        System.out.println("Scheduling Trace: " + trace + " at time "                           + currentTime);        // remove this trace from the list of traces to schedule        sortedList.remove(trace);        // add the trace to the schedule        schedule.add(trace);        // now set the layout for the filterTraceNodes        // and set the available time for each tile        TraceNode node = trace.getHead().getNext();        while (node instanceof FilterTraceNode) {                        RawTile tile = layout.getTile(node.getAsFilter());            // add to the avail time for the tile, use either the current time            // or the tile's avail            // whichever is greater            // add the bottleneck work            tileAvail[tile.getTileNumber()] = ((currentTime > tileAvail[tile                                                                        .getTileNumber()]) ? currentTime : tileAvail[tile                                                                                                                     .getTileNumber()])                + spaceTime.partitioner.getTraceBNWork(trace);            System.out.println("   * new avail for " + tile + " = "                               + tileAvail[tile.getTileNumber()]);            // System.out.println(" *(" + currentTime + ") Assigning " + node +            // " to " + tile +            // "(new avail: " + tileAvail[tile.getTileNumber()] + ")");            assert !(((FilterTraceNode) node).isFileInput() || ((FilterTraceNode) node)                     .isFileInput());            // if this trace has file input take care of it,            // assign the file reader and record that the tile reads a file...            if (node.getPrevious().isInputTrace()) {                InputTraceNode in = (InputTraceNode) node.getPrevious();                // if this trace reads a file, make sure that we record that                // the tile is being used to read a file                if (in.hasFileInput()) {                    spaceTime.setReadsFile(tile.getTileNumber());                    assert in.getSingleEdge().getSrc().getPrevFilter()                        .isPredefined();                    assert layout.getTile(in.getSingleEdge().getSrc().getPrevFilter()) == tile;                }            }            // writes to a file, set tile for writer and record that the tile            // writes a file            if (node.getNext().isOutputTrace()) {                OutputTraceNode out = (OutputTraceNode) node.getNext();                if (out.hasFileOutput()) {                    spaceTime.setWritesFile(tile.getTileNumber());                    assert out.getSingleEdge().getDest().getNextFilter()                        .isPredefined();                    // set the tile                    assert layout.getTile(out.getSingleEdge().getDest().getNextFilter()) ==                         tile;                                     }            }            // set file reading and writing            // set the space time schedule?? Jasper's stuff            // don't do it for the first node            /*             * if (node != trace.getHead().getNext()) spSched.add(trace,             * ((FilterTraceNode)node).getY(), ((FilterTraceNode)node).getX());             * else //do this instead spSched.addHead(trace,             * ((FilterTraceNode)node).getY(), ((FilterTraceNode)node).getX());             */            node = node.getNext();        }    }