private synchronized void deque(Packet np)
    {
        int dest = getNextHop(np);
        if (dest == -1) {
            return;
        }

        // other side is a Sim_entity
        int tag = 0;
        if (dest == outEnd2_ || dest == outEnd1_)
        {
            // for junk packets only
            if (np.getTag() == GridSimTags.JUNK_PKT) {
                tag = GridSimTags.JUNK_PKT;
            }
            // for other packets
            else {
                tag = GridSimTags.PKT_FORWARD;
            }
        }
        // other side is a GridSim entity
        else {
            tag = np.getTag();
        }

        // sends the packet
        super.sim_schedule(dest, GridSimTags.SCHEDULE_NOW, tag, np);
    }