private void RunSimulation_Click(object sender, EventArgs e) { try { this.preyInitialParams = new InitialParameters(); this.predatorInitialParams = new InitialParameters(); this.predatorpreyModel = new PredatorPrey(); this.setInitialParameters(); //this.predatorpreyModel.StartModel(); this.SelectModelToRun(); this.preyResults = this.predatorpreyModel.PreyResults; this.predatorResults = this.predatorpreyModel.PredatorResults; this.populateGridViewWithSeriesData(); this.populateChartSeriesData(); MessageBox.Show("Simulation run is complete.", "Simulation complete", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { MessageBox.Show("Error", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void RunSimulation_Click(object sender, EventArgs e) { //try //{ this.susceptableInitialParams = new InitialParameters(); this.infectedInitialParams = new InitialParameters(); this.removedInitialParams = new InitialParameters(); this.SIR = new SIRModel(); this.setInitialParameters(); this.SIR.InfectedIndividualsInitialParameters = this.infectedInitialParams; this.SIR.SusceptableIndividualsInitialParameters = this.susceptableInitialParams; this.SIR.RemovedIndividualsInitialParameters = this.removedInitialParams; //this.predatorpreyModel.StartModel(); this.SIR.StartModel(); this.susceptableResults = this.SIR.SusceptablePopulation; this.infectedResults = this.SIR.InfectionPopulation; this.removedResults = this.SIR.RemovedPopulation; this.populateGridViewWithSeriesData(); this.populateChartSeriesData(); MessageBox.Show("Simulation run is complete.", "Simulation complete", MessageBoxButtons.OK, MessageBoxIcon.Information); //} //catch (Exception ex) //{ // MessageBox.Show("Error", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); // } }
private void RunSimulation_Click(object sender, EventArgs e) { this.initialParams = new InitialParameters(); this.unconstrainedGrowthModel = new UnconstrainedGrowth(); this.setInitialParameters(); this.unconstrainedGrowthModel.StartModel(); this.results = this.unconstrainedGrowthModel.ResultSet; this.populateGridViewWithSeriesData(); this.populateChartSeriesData(); MessageBox.Show("Simulation run is complete.", "Simulation complete", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void RunSimulation_Click(object sender, EventArgs e) { this.competitorOneInitialParams = new InitialParameters(); this.competitorTwoInitialParams = new InitialParameters(); this.competitionModel = new Competition(); this.setInitialParameters(); this.competitionModel.StartModel(); this.competitorOneResults = this.competitionModel.CompetitorOneResults; this.competitorTwoResults = this.competitionModel.CompetitorTwoResults; this.populateGridViewWithSeriesData(); this.populateChartSeriesData(); MessageBox.Show("Simulation run is complete.", "Simulation complete", MessageBoxButtons.OK, MessageBoxIcon.Information); }