public SwitchingFabric(int speed, Queue []inputBuffers, Queue []outputBuffers, int VERTICALBUSES)
    {
        //set vertical busses
        this.VERTICALBUSES = VERTICALBUSES;
        //set the speed of the switching fabric
        this.speed = speed;
        //set the input buffers
        this.inputBuffers = inputBuffers;
        //set the output buffers
        this.outputBuffers = outputBuffers;
        //creates statuses for each vertical bus
        busActiveStatus = new boolean[this.VERTICALBUSES];
        //initialize available buses
        availableBuses = new LinkedList();
        //initialize input connected to bus
        inputConnectedToBus = new LinkedList();
        //initialize buses
        sequence = new int[VERTICALBUSES];
        //initialize packetMoved
        packetMoved = false;
        //set the current input buffer occupying the fabric bus, -1 = none
//currentInputBufferUsingTheBus = new int[inputBuffers.length];
currentInputBufferUsingTheBus = new int[outputBuffers.length];
        //for(int x=0; x<(inputBuffers.length);x++)
        for(int x=0; x<(outputBuffers.length);x++)
            currentInputBufferUsingTheBus[x] = -1;
        
        
        //initialize each vertical bus to available
        for(int x=0;x< this.VERTICALBUSES;x++)
        {
            //initialize each vertical bus to available
            busActiveStatus[x] = false;
            //initialize each vertical bus to available
            availableBuses.add(x);
        }
    }