Exemplo n.º 1
0
        /// <summary>
        /// Normalizes the tabular output options data feed
        /// </summary>
        /// <remarks></remarks>
        private void NormalizeTabularOutputOptions()
        {
            DataSheet dsrc        = this.ResultScenario.GetDataSheet(Strings.DATASHEET_RUN_CONTROL_NAME);
            DataRow   drrc        = dsrc.GetDataRow();
            int       MaxTimestep = Convert.ToInt32(drrc[Strings.RUN_CONTROL_MAX_TIMESTEP_COLUMN_NAME], CultureInfo.InvariantCulture);
            DataSheet dsoo        = this.ResultScenario.GetDataSheet(Strings.DATASHEET_OO_TABULAR_NAME);
            DataRow   droo        = dsoo.GetDataRow();

            if (droo == null)
            {
                droo = dsoo.GetData().NewRow();
                dsoo.GetData().Rows.Add(droo);

                DataTableUtilities.SetRowValue(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_SC_COLUMN_NAME, Booleans.BoolToInt(true));
                DataTableUtilities.SetRowValue(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_TR_COLUMN_NAME, Booleans.BoolToInt(true));
                DataTableUtilities.SetRowValue(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_SC_AGES_COLUMN_NAME, Booleans.BoolToInt(true));
                DataTableUtilities.SetRowValue(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_TR_AGES_COLUMN_NAME, Booleans.BoolToInt(true));
                DataTableUtilities.SetRowValue(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_SC_TIMESTEPS_COLUMN_NAME, 1);
                DataTableUtilities.SetRowValue(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_TR_TIMESTEPS_COLUMN_NAME, 1);

                this.RecordStatus(StatusType.Information, MessageStrings.STATUS_NO_OUTPUT_OPTIONS_WARNIING);
            }

            this.ValidateTimesteps(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_SC_COLUMN_NAME, Strings.DATASHEET_OO_SUMMARY_OUTPUT_SC_TIMESTEPS_COLUMN_NAME, "Summary state classes", MaxTimestep);
            this.ValidateTimesteps(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_TR_COLUMN_NAME, Strings.DATASHEET_OO_SUMMARY_OUTPUT_TR_TIMESTEPS_COLUMN_NAME, "Summary transitions", MaxTimestep);
            this.ValidateTimesteps(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_TRSC_COLUMN_NAME, Strings.DATASHEET_OO_SUMMARY_OUTPUT_TRSC_TIMESTEPS_COLUMN_NAME, "Summary transitions by state class", MaxTimestep);
            this.ValidateTimesteps(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_SA_COLUMN_NAME, Strings.DATASHEET_OO_SUMMARY_OUTPUT_SA_TIMESTEPS_COLUMN_NAME, "Summary state attributes", MaxTimestep);
            this.ValidateTimesteps(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_TA_COLUMN_NAME, Strings.DATASHEET_OO_SUMMARY_OUTPUT_TA_TIMESTEPS_COLUMN_NAME, "Summary transition attributes", MaxTimestep);
            this.ValidateTimesteps(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_EV_COLUMN_NAME, Strings.DATASHEET_OO_SUMMARY_OUTPUT_EV_TIMESTEPS_COLUMN_NAME, "Summary external variables", MaxTimestep);
            this.ValidateTimesteps(droo, Strings.DATASHEET_OO_SUMMARY_OUTPUT_TST_COLUMN_NAME, Strings.DATASHEET_OO_SUMMARY_OUTPUT_TST_TIMESTEPS_COLUMN_NAME, "Summary TST", MaxTimestep);
        }
Exemplo n.º 2
0
        private void SetSpatialOutputDefaults(int MaxTimestep)
        {
            Debug.Assert(this.m_IsSpatial);
            DataSheet dsoo = this.ResultScenario.GetDataSheet(Strings.DATASHEET_OO_SPATIAL_NAME);
            DataRow   droo = dsoo.GetDataRow();

            if (droo == null)
            {
                droo = dsoo.GetData().NewRow();
                dsoo.GetData().Rows.Add(droo);
            }

            DataTableUtilities.SetRowValue(droo, Strings.DATASHEET_OO_SPATIAL_RASTER_OUTPUT_SC_COLUMN_NAME, Booleans.BoolToInt(true));
            DataTableUtilities.SetRowValue(droo, Strings.DATASHEET_OO_SPATIAL_RASTER_OUTPUT_SC_TIMESTEPS_COLUMN_NAME, MaxTimestep);
            DataTableUtilities.SetRowValue(droo, Strings.DATASHEET_OO_SPATIAL_RASTER_OUTPUT_TR_COLUMN_NAME, Booleans.BoolToInt(true));
            DataTableUtilities.SetRowValue(droo, Strings.DATASHEET_OO_SPATIAL_RASTER_OUTPUT_TR_TIMESTEPS_COLUMN_NAME, MaxTimestep);
        }