//--------------------------------------------------------------------- protected override IInputParameters Parse() { roundedIntervals.Clear(); ReadLandisDataVar(); InputParameters parameters = new InputParameters(); InputVar <int> timestep = new InputVar <int>("Timestep"); ReadVar(timestep); parameters.Timestep = timestep.Value; InputVar <string> mgmtAreaMap = new InputVar <string>("ManagementAreas"); ReadVar(mgmtAreaMap); parameters.ManagementAreaMap = mgmtAreaMap.Value; InputVar <string> standMap = new InputVar <string>("Stands"); ReadVar(standMap); parameters.StandMap = standMap.Value; //first read the prescription ReadPrescriptions(parameters.Prescriptions, timestep.Value.Actual); //then read the implementation ReadHarvestImplementations(parameters.ManagementAreas, parameters.Prescriptions); // Output file parameters InputVar <string> prescriptionMapNames = new InputVar <string>(Names.PrescriptionMaps); ReadVar(prescriptionMapNames); parameters.PrescriptionMapNames = prescriptionMapNames.Value; InputVar <string> eventLogFile = new InputVar <string>("EventLog"); ReadVar(eventLogFile); parameters.EventLog = eventLogFile.Value; InputVar <string> summaryLogFile = new InputVar <string>("SummaryLog"); ReadVar(summaryLogFile); parameters.SummaryLog = summaryLogFile.Value; CheckNoDataAfter("the " + summaryLogFile.Name + " parameter"); return(parameters); //.GetComplete(); }
//--------------------------------------------------------------------- /// <summary> /// Puts filename for BiomassMaps into the parameters /// </summary> /// <remarks> /// This overrides the base method in harvest-mgmt-lib /// </remarks> protected override void ReadBiomassMaps(InputParameters baseParameters) { InputVar<string> biomassMapNames = new InputVar<string>("BiomassMaps"); if (ReadOptionalVar(biomassMapNames)) { // Get the biomass harvest implementation of the InputParameters so we can set the biomassMaps property Parameters parameters = baseParameters as Parameters; parameters.BiomassMapNames = biomassMapNames.Value; } }