Example #1
0
        /// <summary>
        ///
        /// </summary>
        private void CalculatePriorities()
        {
            PrioritiesSelector selector = new PrioritiesSelector();

            selector.ComputePriorities(_criteria);

            //first (zero-th) element of the lambda matrix is the
            //consistency ratio factor for the selection matrix
            _lambdas.SetElement(0, 0, selector.ConsistencyRatio);

            _orderedCriteria = selector.CalculatedMatrix;
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        private void CalculateChoices()
        {
            GeneralMatrix tempMatrix = null;
            int           i, col0, colMax;

            PrioritiesSelector selector = new PrioritiesSelector();

            for (i = 0; i < this._nCriteria; i++)
            {
                col0       = i * _mChoices;
                colMax     = col0 + _mChoices - 1;
                tempMatrix = _choiceMatrix.GetMatrix(0, _mChoices - 1, col0, colMax);
                selector.ComputePriorities(tempMatrix);
                //first element of the matrix is consistency ratio
                //for the criteria
                _lambdas.SetElement(i + 1, 0, selector.ConsistencyRatio);

                _modelResult.SetMatrix(0, _mChoices - 1, i, i, selector.CalculatedMatrix);
            }
        }
Example #3
0
        /// <summary>
        /// 
        /// </summary>
        private void CalculatePriorities()
        {
            PrioritiesSelector selector = new PrioritiesSelector();
            selector.ComputePriorities(_criteria);

            //first (zero-th) element of the lambda matrix is the
            //consistency ratio factor for the selection matrix
            _lambdas.SetElement(0,0,selector.ConsistencyRatio);

            _orderedCriteria = selector.CalculatedMatrix;
        }
Example #4
0
        /// <summary>
        /// 
        /// </summary>
        private void CalculateChoices()
        {
            GeneralMatrix tempMatrix=null;
            int i, col0, colMax;

            PrioritiesSelector selector = new PrioritiesSelector();

            for (i=0; i<this._nCriteria; i++)
            {
                col0 = i*_mChoices;
                colMax = col0+_mChoices-1;
                tempMatrix = _choiceMatrix.GetMatrix(0,_mChoices-1,col0,colMax);
                selector.ComputePriorities(tempMatrix);
                //first element of the matrix is consistency ratio
                //for the criteria
                _lambdas.SetElement(i+1,0,selector.ConsistencyRatio);

                _modelResult.SetMatrix(0,_mChoices-1,i,i,selector.CalculatedMatrix);

            }
        }
Example #5
0
        public void TestConsistencyRatio()
        {
            PrioritiesSelector ps = new PrioritiesSelector();
            double[][] mat = new double[][]
                                {
                                    new double[] {1,0.333333333,2,4},
                                    new double[] {3,1,5,3},
                                    new double[] {0.5,0.2,1,0.3333333333333},
                                    new double[] {0.25,0.3333333333333,3,1}
                                };
            GeneralMatrix matrix = new GeneralMatrix(mat);

            ps.ComputePriorities(matrix);
            //should be 0.13900+change
            Assert.IsTrue(ps.ConsistencyRatio<0.14);
        }
Example #6
0
        public void TestPriorities()
        {
            PrioritiesSelector ps = new PrioritiesSelector();
            double[][] mat = new double[][]
                                {
                                    new double[] {1,0.333333333,2,4},
                                    new double[] {3,1,5,3},
                                    new double[] {0.5,0.2,1,0.3333333333333},
                                    new double[] {0.25,0.3333333333333,3,1}
                                };
            GeneralMatrix matrix = new GeneralMatrix(mat);

            ps.ComputePriorities(matrix);
            GeneralMatrix pr = ps.CalculatedMatrix;
            Assert.IsTrue(System.Math.Round(pr.GetElement(0,0),2)==0.26);
        }