public Router()
    {
        
        //read the configuration file
        cfg = new ConfigFile();
        
        try
        {
            if(((String)cfg.GetConfig("GENERAL", "Seed")).compareToIgnoreCase("Auto") == 0)
            {
                //save the current time seed
                SEED = System.currentTimeMillis();
            }
            else
                SEED = Long.getLong((String)cfg.GetConfig("GENERAL", "Seed"));
        }
        catch(Exception e)
        {
            
        
            SEED = Long.parseLong(((Object)cfg.GetConfig("GENERAL", "Seed")).toString());
        }
        //set the clock time
        TIME = 0;
        //set the pulse of the router
        PULSE = (Integer)cfg.GetConfig("ROUTER", "pulse");
        //set the packet size
        PACKETSIZE = (Integer)cfg.GetConfig("PACKET", "size");
        //set the speed of the fabric
        FABRICSPEED = (Integer)cfg.GetConfig("FABRIC", "speed");
        //set the speed of the fabric
        FABRICTYPE = (String)cfg.GetConfig("FABRIC", "type");
        //set the total number of packets 
        this.totalNumberOfPackets = (Integer)cfg.GetConfig("PACKET", "quantity");
        //set the total number of packets moved by the Fabric
        NumberOfPacketsMoved = 0;
        
        
        //initialize the priority ready queue
        readyQueue = new PriorityQueue<Event>();
        //save the number of input buffers
        this.INPUTBUFFERS = (Integer)cfg.GetConfig("BUFFERS", "input");
        //save the number of output buffers
        this.OUTPUTBUFFERS = (Integer)cfg.GetConfig("BUFFERS", "output");
        
        
        
        //initialize the input buffers
        inputBuffer = new LinkedList[this.INPUTBUFFERS];
            //initialize input buffer statistics
            inDelivery = new double[INPUTBUFFERS];
            inFull = new double[INPUTBUFFERS];
            inEmpty = new double[INPUTBUFFERS];
            inAvgPkts = new double[INPUTBUFFERS];
            inDroppedPkts = new int[INPUTBUFFERS];
        //initialize the output buffers
        outputBuffer = new LinkedList[this.OUTPUTBUFFERS];
            //initialize output buffer statistics
            outDelivery = new double[OUTPUTBUFFERS];
            outFull = new double[OUTPUTBUFFERS];
            outEmpty = new double[OUTPUTBUFFERS];
            outAvgPkts = new double[OUTPUTBUFFERS];
            outDroppedPkts = new int[OUTPUTBUFFERS];
            
        //initialize total input dropped packets
        inputtotalDroppedPkts = 0;
        //initialize total input dropped packets
        outputtotalDroppedPkts = 0;
        //interate all buffers
        for(int x=0; x<INPUTBUFFERS; x++)
        {
            //initialize each input buffer
            inputBuffer[x] = new LinkedList();
            //initialize statistics
                inDelivery[x] = 0;
                inFull[x] = 0;
                inEmpty[x] = 0;
                inAvgPkts[x] = 0;
                inDroppedPkts[x] = 0;
        }
        
        //interate all buffers
        for(int x=0; x<OUTPUTBUFFERS; x++)
        {
            //initialize each output buffer
            outputBuffer[x] = new LinkedList();
            //initialize statistics
                outDelivery[x] = 0;
                outFull[x] = 0;
                outEmpty[x] = 0;
                outAvgPkts[x] = 0;
                outDroppedPkts[x] = 0;
        }
        //initialize export file
        exp = new ExportFile();
        //write file header
        exp.WriteText("Time,Packets");
        
        //calls the method to configure the simulator
        CofigureSimulator();
        
        //runs the simulator
        RunSimulator();
    }