/*
         * Calculate values based on discrete mathematics
         * First get the incrementStep from the property value then calculate the non calculated field
         * This method also corrects a property if the current values cannot be set.
         */
        public bool Calculate(MultiplierCombination combination, int index)
        {
            _combination = combination;

            /*
             * If not enough properties are available for calculation,
             * it is not possible to calculate it
             */
            if (!_combination.CanBeCalculated()) return false;

            //In case multiple substance increments are available, retrieve all fd
            decimal[] substanceIncrements = new[]{0.002m};
            decimal[] values = new decimal[3];

            //Get the property to be corrected
            int propertyToRectify = combination.GetIndexToRectify();
            int correctIndex = combination.GetIndexToRectify();

            /*
             * Loop through all possible substanceIncrements to calculate the index (=not calculated property in combination)
             * The calculated result is rounded to an integer for the closest possible value
             * After that the value is returned to an incrementValue and added to the list of possible values
             */
            foreach (decimal increment in substanceIncrements)
            {
                //Get IncrementSteps
                values = GetCombinationValues(combination, values, increment);

                values[index] = MathExt.RoundToInt(_calculate(index, values));

                values[correctIndex] = 0;
                _calculate(correctIndex, values);

                AddToValues(values, increment);
            }

            //Determine the closes possible value determined by the user
            int calculatedSubstanceIndex = _findCalculatedIndices();
            _combination.SetValue(propertyToRectify, _calculatedValues[correctIndex][calculatedSubstanceIndex]);
            _combination.SetValue(index, _calculatedValues[index][calculatedSubstanceIndex]);

            //Set the calculated and corrected value, and if a calculation is made, calculate any sibblings
            //bool didCorrectValue = _propertyManager.TrySetValue(propertyToRectify, _calculatedValues[correctIndex][calculatedSubstanceIndex]);
            //bool didCalculateValue = _propertyManager.TrySetValue(_combination.GetAt(index), _calculatedValues[index][calculatedSubstanceIndex]);
            //return didCalculateValue;);
            return true;
        }