//==================================================
        //Total Supply
        // -----------------------------------------------------------

        private int[] get_TotalSupply()
        {
            ProviderIntArray TSA = new ProviderIntArray(0);

            // get all supplies
            int[] GW          = Groundwater_Pumped_Municipal.getvalues().Values;
            int[] Salt        = SaltVerde_Annual_Deliveries_SRP.getvalues().Values;
            int[] Coldo       = Colorado_Annual_Deliveries.getvalues().Values;
            int[] GWBank      = Groundwater_Bank_Used.getvalues().Values;
            int[] Reclaimed   = Reclaimed_Water_Used.getvalues().Values;
            int[] ROReclaimed = RO_Reclaimed_Water_Used.getvalues().Values;
            int[] AugWater    = WaterAugmentationUsed.getvalues().Values;
            // 08.21.16 das
            // int[] RainHarvested = RainWaterHarvested.getvalues().Values;

            for (int i = 0; i < TSA.Length; i++)
            {
                int TS = 0;
                //TS = GW[i] + Salt[i] + Coldo[i] + GWBank[i] + Reclaimed[i] + ROReclaimed[i] + AugWater[i]  + RainHarvested[i];
                TS     = GW[i] + Salt[i] + Coldo[i] + GWBank[i] + Reclaimed[i] + ROReclaimed[i] + AugWater[i];
                TSA[i] = TS;
                //TotalSupply[i] = TS;
            }
            return(TSA.Values);       // TotalSupply.Values;
        }
예제 #2
0
        private int[] get_FutureYearsSustainedPumping()
        {
            ProviderIntArray FYSP    = new ProviderIntArray();
            ProviderIntArray Balance = new ProviderIntArray();
            ProviderIntArray Pumped  = new ProviderIntArray();

            Balance = Groundwater_Balance.getvalues();
            Pumped  = Groundwater_Pumped_Municipal.getvalues();
            foreach (eProvider ep in ProviderClass.providers())
            {
                int yrs = 0;
                if (Pumped[ep] > 0)
                {
                    if (Balance[ep] > 0)
                    {
                        yrs = Balance[ep] / Pumped[ep];
                    }
                    else
                    {
                        yrs = 0;
                    }
                }
                else
                {
                    yrs = 100;
                }
                if (yrs > 100)
                {
                    yrs = 100;
                }
                FYSP[ep] = yrs;
            }
            return(FYSP.Values);
        }
        //==================================================
        //Percent GW of demand
        //-------------------------------------------------

        private int[] get_PCT_GWofDemand()
        {
            ProviderIntArray GWofDemand = new ProviderIntArray(0);

            // get deficit and demand
            int[] GWPumped = Groundwater_Pumped_Municipal.getvalues().Values;
            int[] PDemand  = Total_Demand.getvalues().Values;


            for (int i = 0; i < GWofDemand.Length; i++)
            {
                // caculated percent as integer 100=100%
                // DAS added the double and moved the *100
                if (PDemand[i] > 0)
                {
                    GWofDemand[i] = Convert.ToInt32((Convert.ToDouble(GWPumped[i])) / (Convert.ToDouble(PDemand[i])) * 100);
                }
            }
            return(GWofDemand.Values);
        }