///-------------------------------------------------------------------------------------------------
        /// <summary>   Process the started. </summary>
        ///
        /// <remarks>   Mcquay, 2/25/2016. </remarks>
        ///
        /// <param name="year"> The year about to be run. </param>
        /// <param name="WSim"> The WaterSimManager that is making call. </param>
        ///
        /// <returns>   true if it succeeds, false if it fails. </returns>
        ///-------------------------------------------------------------------------------------------------

        public override bool ProcessStarted(int year, WaterSimManagerClass WSim)
        {
            // zero out cumulatives
            // get the state code for this run
            int statecode = WSim.ParamManager.Model_Parameter(eModelParam.epState).Value;

            FStateCode = statecode;
            // Get the indicator data
            // Growth Rate
            FAGRate = FRData.AGRate(FStateCode);
            //
            FPOPRate = FRData.POPRate(FStateCode);
            //
            FINDRate = FRData.INDRate(FStateCode);

            (WSim as WaterSimManager_SIO).WaterSimAmericaModel.AgricultureGrowthRate = FAGRate;
            (WSim as WaterSimManager_SIO).WaterSimAmericaModel.IndustrialGrowthRate  = FINDRate;
            //(WSim as WaterSimManager_SIO).WaterSimAmericaModel.PopulationGrowthRate = FPOPRate;
            return(true);
        }
コード例 #2
0
        ///-------------------------------------------------------------------------------------------------
        /// <summary>   Posts the data. </summary>
        ///
        /// <returns>   An int. </returns>
        ///-------------------------------------------------------------------------------------------------

        protected override int PostData(int year, WaterSimManagerClass TheWSManager)
        {
            base.PostData(year, TheWSManager);
            fetchData(year, ref FAnnualResults);
            return(0);
        }
コード例 #3
0
        ///-------------------------------------------------------------------------------------------------
        /// <summary>   Posts the data. </summary>
        ///
        /// <remarks>A routime, used in the Simulation_AllYears to initiate any post model run actions after a year has been run
        /// </remarks>
        /// <returns>   An int. 0 if Posting Was Error free, > 0 if there was an error, should be error code</returns>
        ///-------------------------------------------------------------------------------------------------

        protected virtual int PostData(int year, WaterSimManagerClass TheWSManager)
        {
            return(0);
        }
        ///-------------------------------------------------------------------------------------------------
        /// <summary>   Method that is called before each annual run. </summary>
        ///
        /// <param name="year"> The year about to be run. </param>
        /// <param name="WSim"> The WaterSimManager that is making call. </param>
        ///
        /// <returns>   true if it succeeds, false if it fails. Error should be placed in FErrorMessage. </returns>
        ///
        /// <seealso cref="WaterSimDCDC.AnnualFeedbackProcess.PreProcess(int,WaterSimManagerClass)"/>
        ///-------------------------------------------------------------------------------------------------

        public override bool PreProcess(int year, WaterSimManagerClass WSim)
        {
            return(true);
        }