public PacketFactory(int totalNumberOfPackets,int packetSize, int totalNumberOfInputBuffers, long SEED)
    {
        //initialize the seed used by the simulator
        this.SEED = SEED;
        //initialize the random
        rnd = new Random(this.SEED);
        //initialize the packet sequence
        sequence = 1;
        //ensure at least 1 packet is created
        if (totalNumberOfPackets < 1)
        {
            //default number of packets
            totalNumberOfPackets = 1;
        }
        //set the total number of packets to make
        this.totalNumberOfPackets = totalNumberOfPackets;
        //set packets created to the simulation
        packetsCreated = 0;
        //set packets delivered to the simulation
        packetsDelivered = 0;
        //set the size of a packet
        this.packetSize = packetSize;
        //set the time created
        this.timeCreated = 0;
        //initialize the Packet Created buffers
        packetCreated = new LinkedList();
        //set the total number of input buffers
        this.totalNumberOfInputBuffers = totalNumberOfInputBuffers;
        
        //create all packets needed
        MakeAllPackets();
    }