DevTreks.Extensions/NPVCalculators/BIs/BICalculator.cs
/// <summary>
/// Removes newly amortized annual equivalent principal from growth 
/// //(i.e. don't add a cow costing $1050 thats being amortized, to the growth flows)
/// Output is the sum of the principals to be removed and the ref parameters
/// </summary>
Removes newly amortized annual equivalent principal from growth

Output is the sum of the principals to be removed and the ref parameters
Removes newly amortized annual equivalent principal from growth Output is the sum of the principals to be removed and the ref parameters
public double AdjustGrowthPeriodAnnuities(CalculatorParameters calcParameters,
            int count, ref double price1Adjustment, ref double price2Adjustment,
            ref double price3Adjustment, ref double price4Adjustment)
        {
            double dbAdjustedAnnuity = 0;
            int iAnnuityCounter = 0;
            if (calcParameters.ParentBudgetInvestment.AnnEquivalents == null)
            {
                return dbAdjustedAnnuity;
            }
            foreach (OperationComponent opComp 
                in calcParameters.ParentBudgetInvestment.AnnEquivalents)
            {
                iAnnuityCounter = opComp.AnnuityCount;
                if ((iAnnuityCounter == count))
                {
                    Input firstInput = (opComp.Inputs != null) ?
                        opComp.Inputs.FirstOrDefault() : null;
                    if (firstInput != null)
                    {
                        price1Adjustment += firstInput.TotalOC + firstInput.TotalOC_INT;
                        price2Adjustment += firstInput.TotalAOH + firstInput.TotalAOH_INT;
                        price3Adjustment += firstInput.TotalCAP + firstInput.TotalCAP_INT;
                        price4Adjustment += firstInput.TotalR + firstInput.TotalR_INT;
                    }
                }
            }
            return dbAdjustedAnnuity;
        }
public double AdjustGrowthPeriodAnnuities ( CalculatorParameters calcParameters , int count , ref double price1Adjustment , ref double price2Adjustment , ref double price3Adjustment , ref double price4Adjustment ) { double dbAdjustedAnnuity = 0 ; int iAnnuityCounter = 0 ; if ( calcParameters . ParentBudgetInvestment . AnnEquivalents == null ) { return dbAdjustedAnnuity ; } foreach ( OperationComponent opComp in calcParameters . ParentBudgetInvestment . AnnEquivalents ) { iAnnuityCounter = opComp . AnnuityCount ; if ( ( iAnnuityCounter == count ) ) { Input firstInput = ( opComp . Inputs != null ) ? opComp . Inputs . FirstOrDefault ( ) : null ; if ( firstInput != null ) { price1Adjustment += firstInput . TotalOC + firstInput . TotalOC_INT ; price2Adjustment += firstInput . TotalAOH + firstInput . TotalAOH_INT ; price3Adjustment += firstInput . TotalCAP + firstInput . TotalCAP_INT ; price4Adjustment += firstInput . TotalR + firstInput . TotalR_INT ; } } } return dbAdjustedAnnuity ; }
Removes newly amortized annual equivalent principal from growth
(i.e.
Removes newly amortized annual equivalent principal from growth ( i . e .
//add this annuity's amortized amount to the value being returned
calcParameters
CalculatorParameters
count
int
double
ref