Ejemplo n.º 1
0
        ///-------------------------------------------------------------------------------------------------
        /// <summary> Runs the model and allocated water to regions.
        ///           </summary>
        ///
        ///
        /// <param name="InputData">      Information describing the input.</param>
        /// <param name="OutputData">     [out] Information describing the output.</param>
        /// <param name="AllocatedWater"> [out] The allocated water.</param>
        ///
        /// <returns> True if it succeeds, false if it fails.</returns>
        ///-------------------------------------------------------------------------------------------------

        public bool RunAndAllocate(RiverModelInput InputData, out RiverModelOutput OutputData, out RegionAvailableWater AllocatedWater)
        {
            bool result = false;

            AllocatedWater = null;
            OutputData     = FRiverModel.Run(InputData);
            if (OutputData != null)
            {
                AllocatedWater = FAllocationModel.AllocateWater(OutputData);
                if (AllocatedWater != null)
                {
                    result = true;
                }
            }
            return(result);
        }
Ejemplo n.º 2
0
        ///-------------------------------------------------------------------------------------------------
        /// <summary> Runs the River Model with the given input data.</summary>
        /// <param name="InputData"> Information describing the input.</param>
        /// <returns> A RiverModelOutput.</returns>
        ///-------------------------------------------------------------------------------------------------

        public abstract RiverModelOutput Run(RiverModelInput InputData);