private void miStepLocalSearchWithCloseModel_Click(object sender, EventArgs e) { if (thread == null || !thread.IsAlive) { Vertex<Geometric2d> vertex = null; if (placing is Opt.Algorithms.IWithClosenessModel) { vertex = (placing as Opt.Algorithms.IWithClosenessModel).Vertex; } if (vertex != null) { placing = new Opt.Algorithms.Метод_барьеров.PlacingOptWithCloseModel(height, length, circles.ToArray(), vertex, 100, 0.5, 1e-3); (placing as Opt.Algorithms.Метод_барьеров.Placing).FillPoint(); thread = new Thread(thread_start); thread.Start(this); timer.Start(); Text = "Расчёт запущен..."; } } else { thread.Abort(); (placing as Opt.Algorithms.Метод_барьеров.Placing).FillCircles(); Invalidate(); Text = "Расчёт остановлен!"; } }
private void miStepSearchWithCloseModel_Click(object sender, EventArgs e) { if (thread == null || !thread.IsAlive) { placing = new Opt.Algorithms.Метод_последовательного_одиночного_размещения.PlacingWithCloseModel(height, circles.ToArray(), 1e-3); thread = new Thread(thread_start); thread.Start(this); timer.Start(); Text = "Расчёт запущен..."; } else { thread.Abort(); Invalidate(); Text = "Расчёт остановлен!"; } }
private void miStepLocalSearchClassic_Click(object sender, EventArgs e) { if (thread == null || !thread.IsAlive) { placing = new Opt.Algorithms.Метод_барьеров.PlacingOpt(height, length, circles.ToArray(), 100, 0.5, 1e-3); (placing as Opt.Algorithms.Метод_барьеров.PlacingOpt).FillPoint(); thread = new Thread(thread_start); thread.Start(this); timer.Start(); Text = "Расчёт запущен..."; } else { thread.Abort(); (placing as Opt.Algorithms.Метод_барьеров.PlacingOpt).FillCircles(); Invalidate(); Text = "Расчёт остановлен!"; } }
private void miStepLocalSearchB_Click(object sender, EventArgs e) { if (thread == null || !thread.IsAlive) { placing = new Placing(height, length, placed_circles.ToArray(), 100, 0.5, 1e-3); placing.FillPoint(); thread = new Thread(thread_start); thread.Start(this); timer.Start(); Text = "Расчёт запущен..."; } else { thread.Abort(); placing.FillCircles(); Invalidate(); Text = "Расчёт остановлен!"; } }