private int type;                                       //0 is proximal; 1 is basal; 2 is apical


        //constructors
        public Dendrite(int id,
                        int type,
                        int decayFrequency,
                        int productionFrequency,
                        int restoreIncrement,
                        int numSynapsesToAddInGrowthEvent,
                        TimeSpan secondaryMessengerWindow,
                        int secondaryMessengerFrequencyTrigger,
                        int numStartingSynapses,
                        int significantVoltageChange)
        {
            state                = 0;
            membranePotential    = RESTING_POTENTIAL;
            numAvailableSynapses = numStartingSynapses;
            buffer               = new BlockingCollection <Neurotransmitter>(new ConcurrentQueue <Neurotransmitter>());
            synapses             = new ConcurrentDictionary <int, InputAxon>();

            this.id                            = id;
            this.type                          = type;
            this.decayFrequency                = decayFrequency;
            this.productionFrequency           = productionFrequency;
            this.restoreIncrement              = restoreIncrement;
            this.numSynapsesToAddInGrowthEvent = numSynapsesToAddInGrowthEvent;
            messenger                          = new SecondaryMessenger(DateTime.Now, secondaryMessengerFrequencyTrigger, secondaryMessengerWindow);
            this.significantVoltageChange      = significantVoltageChange;
        }
        //constructors
        public Neuron(int cellBodyDecayFrequency,
                      int cellBodyRestoreIncrement,
                      TimeSpan neuronSecondaryMessengerWindow,
                      int neuronFrequencyTrigger,
                      int numDendritesToAddInGrowthEvent,
                      int[] growthEventDendriteTypesList,

                      int dendriteDecayFrequency,
                      int dendriteProductionFrequency,
                      int dendriteRestoreIncrement,
                      int dendriteNumSynapsesToAddInGrowthEvent,
                      TimeSpan dendriteSecondaryMessengerWindow,
                      int dendriteSecondaryMessengerFrequencyTrigger,
                      int numStartingSynapsesPerDendrite,
                      int dendriteSignificantVoltageChange,

                      int numStartingDendrites,
                      int[] startingDendriteTypesList)
        {
            nextDendriteId = 0;
            state          = 0;
            dendrites      = new ConcurrentDictionary <int, Dendrite>();

            body      = new CellBody(DateTime.Now, cellBodyDecayFrequency, cellBodyRestoreIncrement);
            messenger = new SecondaryMessenger(DateTime.Now, neuronFrequencyTrigger, neuronSecondaryMessengerWindow);
            this.numDendritesToAddInGrowthEvent = numDendritesToAddInGrowthEvent;
            this.growthEventDendriteTypesList   = growthEventDendriteTypesList;

            //individual dendrite characteristics
            this.d_DecayFrequency                     = dendriteDecayFrequency;
            this.d_RestoreIncrement                   = dendriteRestoreIncrement;
            this.d_ProductionFrequency                = dendriteProductionFrequency;
            this.d_NumSynapsesToAddInGrowthEvent      = dendriteNumSynapsesToAddInGrowthEvent;
            this.d_SecondaryMessengerWindow           = dendriteSecondaryMessengerWindow;
            this.d_SecondaryMessengerFrequencyTrigger = dendriteSecondaryMessengerFrequencyTrigger;
            this.d_NumStartingSynapsesPerDendrite     = numStartingSynapsesPerDendrite;
            this.d_SignificantVoltageChange           = dendriteSignificantVoltageChange;


            //initialize dendrites
            AddDendrites(numStartingDendrites, startingDendriteTypesList);

            //add listener for ActionPotential event
            body.ActionPotentialEvent += ReceiveActionPotentialEvent;
        }