Пример #1
0
        public OutputGrid(string outputDetail, MadingleyModelInitialisation modelInitialisation)
        {
            // Set the output path
            _OutputPath = modelInitialisation.OutputPath;

            // Initialise the grid viewer
            GridViewer = new ViewGrid();

            // Set the output detail level
            if (outputDetail == "low")
            {
                ModelOutputDetail = OutputDetailLevel.Low;
            }
            else if (outputDetail == "medium")
            {
                ModelOutputDetail = OutputDetailLevel.Medium;
            }
            else if (outputDetail == "high")
            {
                ModelOutputDetail = OutputDetailLevel.High;
            }
            else
            {
                Debug.Fail("Specified output detail level is not valid, must be 'low', 'medium' or 'high'");
            }


            // Get whether to track marine specifics
            OutputMetrics = modelInitialisation.OutputMetrics;

            //Initialise the EcosystemMetrics class
            Metrics = new EcosytemMetrics();

            // Initialise the data converter
            DataConverter = new ArraySDSConvert();

            // Initialise the SDS object creator
            SDSCreator = new CreateSDSObject();

            // Set the local variable designating whether to display live outputs during this model run
            if (modelInitialisation.LiveOutputs)
            {
                LiveOutputs = true;
            }

            Utils = new UtilityFunctions();
        }
        /// <summary>
        /// Constructor for the cell output class
        /// </summary>
        /// <param name="outputDetail">The level of detail to include in the ouputs: 'low', 'medium' or 'high'</param>
        /// <param name="modelInitialisation">Model initialisation object</param>
        /// <param name="cellIndex">The index of the current cell in the list of all cells to run the model for</param>
        public OutputCell(string outputDetail, MadingleyModelInitialisation modelInitialisation, 
            int cellIndex)
        {
            // Set the output path
            _OutputPath = modelInitialisation.OutputPath;

            // Set the initial maximum value for the y-axis of the live display
            MaximumYValue = 1000000;

            // Set the local copy of the mass bin handler from the model initialisation
            _MassBinHandler = modelInitialisation.ModelMassBins;

            // Get the number of mass bins to be used
            MassBinNumber = _MassBinHandler.NumMassBins;

            // Get the specified mass bins
            MassBins = modelInitialisation.ModelMassBins.GetSpecifiedMassBins();

            // Set the output detail level
            if (outputDetail == "low")
                ModelOutputDetail = OutputDetailLevel.Low;
            else if (outputDetail == "medium")
                ModelOutputDetail = OutputDetailLevel.Medium;
            else if (outputDetail == "high")
                ModelOutputDetail = OutputDetailLevel.High;
            else
                Debug.Fail("Specified output detail level is not valid, must be 'low', 'medium' or 'high'");

            // Get whether to track marine specifics
            TrackMarineSpecifics = modelInitialisation.TrackMarineSpecifics;

            // Get whether to track marine specifics
            OutputMetrics = modelInitialisation.OutputMetrics;

            //Initialise the EcosystemMetrics class
            Metrics = new EcosytemMetrics();

            // Initialise the data converter
            DataConverter = new ArraySDSConvert();

            // Initialise the SDS object creator
            SDSCreator = new CreateSDSObject();

            // Initialise the grid viewer
            GridViewer = new ViewGrid();

            // Set the local variable designating whether to display live outputs
            if (modelInitialisation.LiveOutputs)
                LiveOutputs = true;
        }
        public OutputGrid(string outputDetail, MadingleyModelInitialisation modelInitialisation)
        {
            // Set the output path
            _OutputPath = modelInitialisation.OutputPath;

            // Initialise the grid viewer
            GridViewer = new ViewGrid();

            // Set the output detail level
            if (outputDetail == "low")
                ModelOutputDetail = OutputDetailLevel.Low;
            else if (outputDetail == "medium")
                ModelOutputDetail = OutputDetailLevel.Medium;
            else if (outputDetail == "high")
                ModelOutputDetail = OutputDetailLevel.High;
            else
                Debug.Fail("Specified output detail level is not valid, must be 'low', 'medium' or 'high'");

            // Get whether to track marine specifics
            OutputMetrics = modelInitialisation.OutputMetrics;

            //Initialise the EcosystemMetrics class
            Metrics = new EcosytemMetrics();

            // Initialise the data converter
            DataConverter = new ArraySDSConvert();

            // Initialise the SDS object creator
            SDSCreator = new CreateSDSObject();

            // Set the local variable designating whether to display live outputs during this model run
            if (modelInitialisation.LiveOutputs)
                LiveOutputs = true;
        }