Exemplo n.º 1
0
        public void Reset()
        {
            //this.Locations.Reset();
            this.counter           = 0;
            this.Ticks             = 0;
            this._Viruses          = 0;
            this.Antibodies        = 0;
            this.VirusMax          = 0;
            this.VirusPercent      = 0;
            this.VirusMaxPercent   = 0;
            this._VirusGrowthRatio = this.VirusGrowthRatio;

            this.State = States.Susceptible;
            this.SIR   = SIRStates.Susceptible;
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="locations"></param>
        /// <param name="virusGrowth"></param>
        /// <param name="antibodyGrowth"></param>
        /// <param name="antibodyDecay"></param>
        /// <param name="mobility"></param>
        private void Configure(CoViD.CL.Locations locations, Vi.Types.Percentage virusGrowth, Vi.Types.Percentage antibodyGrowth, Vi.Types.Percentage antibodyDecay, byte mobility)
        {
            this.Locations = locations;
            this.SIR       = SIRStates.Susceptible;
            this.State     = States.Susceptible;

            this.AntibodyGrowth = antibodyGrowth;
            this.AntibodyDecay  = antibodyDecay;
            this.VirusGrowth    = virusGrowth;
            this.DeadThreshold  = ((float)Person.Rnd.Next(72, 100, 3)) / (float)100;
            //this.DeadThreshold = (float)((float)Person.Rnd.Next(50000, 100000) / 100000F);
            this.Age = Person.Rnd.Next(0, 100, 4);

            this.AntibodyGrowthRatio = (decimal)1 + antibodyGrowth.Value;
            this.AntibodyDecayRatio  = (decimal)1 - antibodyDecay;
            this.VirusGrowthRatio    = (decimal)1 + virusGrowth.Value;

            this._VirusGrowthRatio = this.VirusGrowthRatio;

            this.Mobility = mobility;
        }