DevTreks.Extensions/NPVCalculators/OCs/OCCalculator.cs
/// <summary>
/// Get the variables needed to synchronize and update capital input amounts 
/// for this specific combination of inputs
/// </summary>
Get the variables needed to synchronize and update capital input amounts
for this specific combination of inputs
Get the variables needed to synchronize and update capital input amounts for this specific combination of inputs
public void GetAgMachinerySynchCapitalInputVars(List<Machinery1Input> machineryInputs,
            ref double lowestCapacity, ref int highestEquivPTO, ref int maxPTO,
            ref bool hasMoreThanOneCapitalInput, ref bool hasMoreThanOnePowerInput)
        {
            int iCapitalInputCount = 0;
            int iPowerInputCount = 0;
            if (machineryInputs != null)
            {
                foreach (Machinery1Input machInput in machineryInputs)
                {
                    if (machInput.CAPPrice != 0)
                    {
                        if (machInput.CAPAmount == 0)
                        {
                            iCapitalInputCount = iCapitalInputCount + 1;
                            if (iCapitalInputCount > 1) hasMoreThanOneCapitalInput = true;
                            GetAgMachineryCalculatorVars(machInput, 
                                ref lowestCapacity, ref highestEquivPTO, ref maxPTO,
                                ref iPowerInputCount);
                            if (iPowerInputCount > 1) hasMoreThanOnePowerInput = true;
                        }
                    }
                }
            }
        }
public void GetAgMachinerySynchCapitalInputVars ( List < Machinery1Input > machineryInputs , ref double lowestCapacity , ref int highestEquivPTO , ref int maxPTO , ref bool hasMoreThanOneCapitalInput , ref bool hasMoreThanOnePowerInput ) { int iCapitalInputCount = 0 ; int iPowerInputCount = 0 ; if ( machineryInputs != null ) { foreach ( Machinery1Input machInput in machineryInputs ) { if ( machInput . CAPPrice != 0 ) { if ( machInput . CAPAmount == 0 ) { iCapitalInputCount = iCapitalInputCount + 1 ; if ( iCapitalInputCount > 1 ) hasMoreThanOneCapitalInput = true ; GetAgMachineryCalculatorVars ( machInput , ref lowestCapacity , ref highestEquivPTO , ref maxPTO , ref iPowerInputCount ) ; if ( iPowerInputCount > 1 ) hasMoreThanOnePowerInput = true ; } } } } }
Get the variables needed to synchronize and update capital input amounts
for this specific combination of inputs
Get the variables needed to synchronize and update capital input amounts for this specific combination of inputs
//Rule 1. A capital input is any input with a CAPrice not equal to zero //Rule 2. Do not compute calculated prices for any capital input being expensed (with an amount != 0)
machineryInputs
List<Machinery1Input>
double
ref
int
ref
bool
ref