Exemplo n.º 1
0
        protected virtual void applyBonusAndPenalties(BonusAndPenalties bonusOrPenalty)
        {
            double bonusOrPenaltyValue = 0;

            if (bonusOrPenalty == BonusAndPenalties.ALFA)
            {
                bonusOrPenaltyValue = this.Alfa;
            }
            else if (bonusOrPenalty == BonusAndPenalties.BETA)
            {
                bonusOrPenaltyValue = this.Beta;
            }
            else if (bonusOrPenalty == BonusAndPenalties.RHO)
            {
                bonusOrPenaltyValue = this.Rho;
            }
            else if (bonusOrPenalty == BonusAndPenalties.SIGMA)
            {
                bonusOrPenaltyValue = this.Sigma;
            }

            if (bonusOrPenaltyValue > 1)
            {
                this.checkMaximums(bonusOrPenaltyValue);
            }
            else if (bonusOrPenaltyValue < 1)
            {
                this.checkMinimums(bonusOrPenaltyValue);
            }

            this.checkNonZeroRatio();
            this.checkSummatory();
        }
Exemplo n.º 2
0
        private void applyBonusAndPenalties(BonusAndPenalties bonusOrPenalty, ExplorationType explorationType, int access)
        {
            double bonusOrPenaltyValue = 0;

            if (bonusOrPenalty == BonusAndPenalties.ALFA)
            {
                bonusOrPenaltyValue = this.Alfa;
            }
            else if (bonusOrPenalty == BonusAndPenalties.BETA)
            {
                bonusOrPenaltyValue = this.Beta;
            }
            else if (bonusOrPenalty == BonusAndPenalties.RHO)
            {
                bonusOrPenaltyValue = this.Rho;
            }
            else if (bonusOrPenalty == BonusAndPenalties.SIGMA)
            {
                bonusOrPenaltyValue = this.Sigma;
            }

            KeyValuePair <int, int> indices = Spectrum.GetIndexesFromAccess(access, this.frequencySegments);
            double modifiedValue            = this.EstimationMatrix[indices.Key, indices.Value] * bonusOrPenaltyValue;
            double specificMaximum;

            if (explorationType == ExplorationType.ACCESS)
            {
                specificMaximum = this.MaximumValue;
            }
            else
            {
                specificMaximum = this.NonAccessMaximumValue;
            }

            if (modifiedValue < specificMaximum && modifiedValue > this.MinimumValue)
            {
                this.EstimationMatrix[indices.Key, indices.Value] = modifiedValue;
            }
            else if (modifiedValue < this.MinimumValue)
            {
                this.EstimationMatrix[indices.Key, indices.Value] = this.MinimumValue;
            }
            if (modifiedValue > specificMaximum)
            {
                this.EstimationMatrix[indices.Key, indices.Value] = specificMaximum;
            }
        }
Exemplo n.º 3
0
        private void applyBonusAndPenalties(BonusAndPenalties bonusOrPenalty, ExplorationType explorationType, int access)
        {
            double bonusOrPenaltyValue = 0;
            if (bonusOrPenalty == BonusAndPenalties.ALFA)
            {
                bonusOrPenaltyValue = this.Alfa;
            }
            else if (bonusOrPenalty == BonusAndPenalties.BETA)
            {
                bonusOrPenaltyValue = this.Beta;
            }
            else if (bonusOrPenalty == BonusAndPenalties.RHO)
            {
                bonusOrPenaltyValue = this.Rho;
            }
            else if (bonusOrPenalty == BonusAndPenalties.SIGMA)
            {
                bonusOrPenaltyValue = this.Sigma;
            }

            KeyValuePair<int, int> indices = Spectrum.GetIndexesFromAccess(access, this.frequencySegments);
            double modifiedValue = this.EstimationMatrix[indices.Key, indices.Value] * bonusOrPenaltyValue;
            double specificMaximum;
            if (explorationType == ExplorationType.ACCESS)
            {
                specificMaximum = this.MaximumValue;
            }
            else
            {
                specificMaximum = this.NonAccessMaximumValue;
            }

            if (modifiedValue < specificMaximum && modifiedValue > this.MinimumValue)
            {
                this.EstimationMatrix[indices.Key, indices.Value] = modifiedValue;
            }
            else if (modifiedValue < this.MinimumValue)
            {
                this.EstimationMatrix[indices.Key, indices.Value] = this.MinimumValue;
            }
            if (modifiedValue > specificMaximum)
            {
                this.EstimationMatrix[indices.Key, indices.Value] = specificMaximum;
            }

        }
Exemplo n.º 4
0
 protected override void applyBonusAndPenalties(BonusAndPenalties bonusOrPenalty)
 {
     this.applyBonusAndPenalties(bonusOrPenalty, ExplorationType.ACCESS, this.Access);
 }
Exemplo n.º 5
0
 protected override void applyBonusAndPenalties(BonusAndPenalties bonusOrPenalty)
 {
     this.applyBonusAndPenalties(bonusOrPenalty, ExplorationType.ACCESS, this.Access);
 }
Exemplo n.º 6
0
        protected virtual void applyBonusAndPenalties(BonusAndPenalties bonusOrPenalty)
        {
            double bonusOrPenaltyValue = 0;
            if (bonusOrPenalty == BonusAndPenalties.ALFA)
            {
                bonusOrPenaltyValue = this.Alfa;
            }
            else if (bonusOrPenalty == BonusAndPenalties.BETA)
            {
                bonusOrPenaltyValue = this.Beta;
            }
            else if (bonusOrPenalty == BonusAndPenalties.RHO)
            {
                bonusOrPenaltyValue = this.Rho;
            }
            else if (bonusOrPenalty == BonusAndPenalties.SIGMA)
            {
                bonusOrPenaltyValue = this.Sigma;
            }
            
            if (bonusOrPenaltyValue > 1)
            {
                this.checkMaximums(bonusOrPenaltyValue);
            }
            else if (bonusOrPenaltyValue < 1)
            {
                this.checkMinimums(bonusOrPenaltyValue);
            }

            this.checkNonZeroRatio();
            this.checkSummatory();
        }