예제 #1
0
 public void ExportForCluster(PopulationSimulation populationSimulation, FileSelection populationExport)
 {
     if (populationExport == null)
     {
         return;
     }
     ExportForCluster(populationSimulation, populationExport.FilePath, populationExport.Description);
 }
        public void ExportToCSV(PopulationSimulation populationSimulation, string fileFullPath)
        {
            var fileSelection = new FileSelection {
                FilePath = fileFullPath
            };

            ExportToCSV(populationSimulation, fileSelection);
        }
        public void ExportToCSV(PopulationSimulation populationSimulation, FileSelection fileSelection)
        {
            exportVectorialParametersContainerToCSV(populationSimulation, x => CreatePopulationDataFor(x, includeUnitsInHeader: true), fileSelection);

            //Also export all aging data
            var agingData = populationSimulation.AgingData.ToDataTable();

            if (agingData.Rows.Count == 0)
            {
                return;
            }

            var agingDataFile = fileSelection.AddSuffixToFileName(CoreConstants.Population.AGING_PARAMETER_EXPORT);

            agingData.ExportToCSV(agingDataFile.FilePath, comments: CreateProjectMetaInfoFrom(agingDataFile.Description));
        }
예제 #4
0
        private void exportVectorialParametersContainerToCSV <T>(T advancedParameterContainer, Func <T, DataTable> createData, FileSelection fileSelection) where T : IAdvancedParameterContainer
        {
            if (fileSelection == null)
            {
                return;
            }

            exportVectorialParametersContainerToCSV(advancedParameterContainer, createData, fileSelection.FilePath, fileSelection.Description);
        }
예제 #5
0
 public void ExportToCSV(PopulationSimulation populationSimulation, FileSelection fileSelection)
 {
     exportVectorialParametersContainerToCSV(populationSimulation, x => CreatePopulationDataFor(x, includeUnitsInHeader: true), fileSelection);
 }