/// <summary>
        /// Calculates ratings
        /// </summary>
        public void CalculateRatings()
        {
            _ratings = new Dictionary<int, MaxCoefficient>();
            var rowsCount = _rows.Count;

            foreach (var variableId in _allVariables.Keys)
            {
                var rating = new MaxCoefficient();
                for (var rowIndex = 0; rowIndex < rowsCount; rowIndex++)
                {

                    var tmp = new MaxCoefficient(_targetFunctionCoefficients[_basisVariables[rowIndex]]);
                    var fraction = new Fraction(_rows[rowIndex].ElementAt(variableId));
                    tmp.Multiply(fraction);
                    rating.Add(tmp);
                }
                rating.Subtract(_targetFunctionCoefficients[variableId]);
                _ratings.Add(variableId, rating);
            }
            FunctionValue = CalculateFunctionValue();
        }
 /// <summary>
 /// Gets function value
 /// </summary>
 public MaxCoefficient CalculateFunctionValue()
 {
     var tmpResult = new MaxCoefficient();
     foreach (var elem in _basisVariables)
     {
         var varCoefficient = new MaxCoefficient(_targetFunctionCoefficients[elem.Value]);
         var varValue = new Fraction(_freeCoefficients[elem.Key]);
         varCoefficient.Multiply(varValue);
         tmpResult.Add(varCoefficient);
     }
     return tmpResult;
 }