/// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="c">FunctionalGroupDefinitions to copy</param>
 public FunctionalGroupDefinitions(FunctionalGroupDefinitions c)
 {
     this.Data = c.Data.Select(d => new FunctionalGroupDefinition(d)).ToArray();
     this.Definitions = c.Definitions.ToArray();
     this.Properties = c.Properties.ToArray();
 }
 /// <summary>
 /// Configuration constructor.
 /// </summary>
 /// <param name="globalModelTimeStepUnit">Time step units to be used.</param>
 /// <param name="numTimeSteps">Number of time steps to be run.</param>
 /// <param name="burninTimeSteps">Number of time steps before any impacts are applied.</param>
 /// <param name="impactTimeSteps">Number of time steps to apply the impact for.</param>
 /// <param name="recoveryTimeSteps">Number of time steps to apply the impact for.</param>
 /// <param name="runCellsInParallel">Whether to run the model for different grid cells in parallel?</param>
 /// <param name="runSimulationsInParallel">Whether to run the model for different simulations in parallel?</param>
 /// <param name="runRealm">Which realm to run the model for.</param>
 /// <param name="drawRandomly">Whether to draw cohort properties randomly when seeding them, and whether cohorts will undergo ecological processes in a random order.</param>
 /// <param name="extinctionThreshold">Threshold abundance below which cohorts will be made extinct.</param>
 /// <param name="maxNumberOfCohorts">Maximum number of cohorts to be in the model, per grid cell, when it is running.</param>
 /// <param name="dispersalOnly">Whether to run only dispersal (i.e. turn all other ecological processes off, and set dispersal probability to one temporarily).</param>
 /// <param name="dispersalOnlyType">If DispersalOnly, which dispersal type?</param>
 /// <param name="planktonDispersalThreshold">Weight threshold (grams) below which marine organisms that are not obligate zooplankton will be dispersed planktonically.</param>
 /// <param name="cohortFunctionalGroupDefinitions">Functional group definitions of cohorts in the model.</param>
 /// <param name="stockFunctionalGroupDefinitions">Functional group definitions of stocks in the model.</param>
 /// <param name="impactCellIndices">Cells to apply impacts to (unless ImpactAll).</param>
 /// <param name="impactAll">Apply impacts to all cells?</param>
 /// <param name="scenarioParameters">All available ScenarioParameters.</param>
 /// <param name="scenarioIndex">Which ScenarioParameter to use?</param>
 /// <param name="simulation">Simulation number, only used for formatting output.</param>
 /// <param name="ecologicalParameters">EcologicalParameters to use.</param>
 /// <param name="fileNames">List of file names loaded.</param>
 public Configuration(
     string globalModelTimeStepUnit,
     int numTimeSteps,
     int burninTimeSteps,
     int impactTimeSteps,
     int recoveryTimeSteps,
     bool runCellsInParallel,
     bool runSimulationsInParallel,
     string runRealm,
     bool drawRandomly,
     double extinctionThreshold,
     int maxNumberOfCohorts,
     bool dispersalOnly,
     string dispersalOnlyType,
     double planktonDispersalThreshold,
     FunctionalGroupDefinitions cohortFunctionalGroupDefinitions,
     FunctionalGroupDefinitions stockFunctionalGroupDefinitions,
     IEnumerable<int> impactCellIndices,
     bool impactAll,
     IEnumerable<ScenarioParameters> scenarioParameters,
     int scenarioIndex,
     int simulation,
     EcologicalParameters ecologicalParameters,
     IEnumerable<string> fileNames)
 {
     this.GlobalModelTimeStepUnit = globalModelTimeStepUnit;
     this.NumTimeSteps = numTimeSteps;
     this.BurninTimeSteps = burninTimeSteps;
     this.ImpactTimeSteps = impactTimeSteps;
     this.RecoveryTimeSteps = recoveryTimeSteps;
     this.RunCellsInParallel = runCellsInParallel;
     this.RunSimulationsInParallel = runSimulationsInParallel;
     this.RunRealm = runRealm;
     this.DrawRandomly = drawRandomly;
     this.ExtinctionThreshold = extinctionThreshold;
     this.MaxNumberOfCohorts = maxNumberOfCohorts;
     this.DispersalOnly = dispersalOnly;
     this.DispersalOnlyType = dispersalOnlyType;
     this.PlanktonDispersalThreshold = planktonDispersalThreshold;
     this.CohortFunctionalGroupDefinitions = new FunctionalGroupDefinitions(cohortFunctionalGroupDefinitions);
     this.StockFunctionalGroupDefinitions = new FunctionalGroupDefinitions(stockFunctionalGroupDefinitions);
     this.ImpactCellIndices = impactCellIndices.ToArray();
     this.ImpactAll = impactAll;
     this.ScenarioParameters = scenarioParameters.Select(s => new ScenarioParameters(s)).ToArray();
     this.ScenarioIndex = scenarioIndex;
     this.Simulation = simulation;
     this.EcologicalParameters = new EcologicalParameters(ecologicalParameters);
     this.FileNames = fileNames.ToList();
 }