Esempio n. 1
0
        public void Copy(OutputGrid existing)
        {
            this.GridOutput.Dispose();
            this.GridOutput = null;

            System.IO.File.Copy(existing.FileName, this.FileName, true);

            var fileString = "msds:nc?file=" + this.FileName;

            this.GridOutput = DataSet.Open(fileString);
        }
Esempio n. 2
0
        /// <summary>
        /// Sets up the model outputs
        /// </summary>
        /// <param name="initialisation">An instance of the model initialisation class</param>
        /// <param name="simulation">The index of the simulation being run</param>
        /// <param name="scenarioIndex">The index of the scenario being run</param>
        public void SetUpOutputs(MadingleyModelInitialisation initialisation, int simulation, int scenarioIndex)
        {
            // Initialise the global outputs
            GlobalOutputs = new OutputGlobal(InitialisationFileStrings["OutputDetail"], initialisation);

            // Create new outputs class instances (if the model is run for the whold model grid then select the grid view for the live output,
            // if the model is run for specific locations then use the graph view)
            if (SpecificLocations)
            {

                // Initialise the vector of outputs instances
                CellOutputs = new OutputCell[_CellList.Count];

                for (int i = 0; i < _CellList.Count; i++)
                {
                    CellOutputs[i] = new OutputCell(InitialisationFileStrings["OutputDetail"], initialisation, i);
                }

#if false
                // Spawn a dataset viewer instance for each cell to display live model results
                if (initialisation.LiveOutputs)
                {
                    for (int i = 0; i < _CellList.Count; i++)
                    {
                        CellOutputs[i].SpawnDatasetViewer(NumTimeSteps);
                    }
                }
#endif

            }
            else
            {
                GridOutputs = new OutputGrid(InitialisationFileStrings["OutputDetail"], initialisation);

#if false
                // Spawn dataset viewer to display live grid results
                if (initialisation.LiveOutputs)
                {
                    GridOutputs.SpawnDatasetViewer();
                }
#endif
            }
        }
        /// <summary>
        /// Sets up the model outputs
        /// </summary>
        /// <param name="initialisation">An instance of the model initialisation class</param>
        /// <param name="simulation">The index of the simulation being run</param>
        /// <param name="scenarioIndex">The index of the scenario being run</param>
        public void SetUpOutputs(MadingleyModelInitialisation initialisation, int simulation, int scenarioIndex)
        {
            // Initialise the global outputs
            GlobalOutputs = new OutputGlobal(InitialisationFileStrings["OutputDetail"], initialisation);

            // Create new outputs class instances (if the model is run for the whold model grid then select the grid view for the live output,
            // if the model is run for specific locations then use the graph view)
            if (SpecificLocations)
            {

                // Initialise the vector of outputs instances
                CellOutputs = new OutputCell[_CellList.Count];

                for (int i = 0; i < _CellList.Count; i++)
                {
                    CellOutputs[i] = new OutputCell(InitialisationFileStrings["OutputDetail"], initialisation, i);
                }

                // Spawn a dataset viewer instance for each cell to display live model results
                if (initialisation.LiveOutputs)
                {
                    for (int i = 0; i < _CellList.Count; i++)
                    {
                        CellOutputs[i].SpawnDatasetViewer(NumTimeSteps);
                    }
                }

            }
            else
            {
                GridOutputs = new OutputGrid(InitialisationFileStrings["OutputDetail"], initialisation);

                // Spawn dataset viewer to display live grid results
                if (initialisation.LiveOutputs)
                {
                    GridOutputs.SpawnDatasetViewer();
                }
            }
        }
        public void Copy(OutputGrid existing)
        {
            this.GridOutput.Dispose();
            this.GridOutput = null;

            System.IO.File.Copy(existing.FileName, this.FileName, true);

            var fileString = "msds:nc?file=" + this.FileName;
            this.GridOutput = DataSet.Open(fileString);
        }