public void OnEndTask(Algorithm.IAlgorithm alg, Tasks.ITaskPackage task, DataFormat.IOutBlackBoxParam rez, int time) { Init_Table(alg, task, rez, time); if (CompleateTask[0] == Tasks.Count) { Init_Table(); } }
/// <summary> /// Заполнение таблиц. /// </summary> private void Init_Table(Algorithm.IAlgorithm alg, Tasks.ITaskPackage task, DataFormat.IOutBlackBoxParam rez, int time) { for (int i = 0; i < Algorithms.Length; i++) { if (i == 0) { if (alg.Name == Algs[i].Name) { CompleateTask[i]++; for (int j = 0; j < Tasks.Count; j++) { if (Tasks[j].Name == task.Name) { //dataGridViews[i].Rows[j].Cells[0].Value = task.Name; dataGridViews[i].Rows[j].Cells[1].Value = time; BenchRez[i, 0, j] = time; dataGridViews[i].Rows[j].Cells[2].Value = alg.Calls; //dataGridViews[i].Rows[j].Cells[3].Value = "10*i + j ="; dataGridViews[i].Rows[j].Cells[4].Value = rez.Cost; BenchRez[i, 1, j] = rez.Cost; } } } } else { if (alg.Name == Algs[i].Name) { CompleateTask[i]++; for (int j = 0; j < Tasks.Count; j++) { if (Tasks[j].Name == task.Name) { //dataGridViews[i].Rows[j].Cells[0].Value = task.Name; dataGridViews[i].Rows[j].Cells[1].Value = time; BenchRez[i, 0, j] = time; dataGridViews[i].Rows[j].Cells[2].Value = alg.Calls; //dataGridViews[i].Rows[j].Cells[3].Value = "10*i + j ="; dataGridViews[i].Rows[j].Cells[4].Value = rez.Cost; BenchRez[i, 1, j] = rez.Cost; //if (CompleateTask[0] >= CompleateTask[i]) //{ // Init_Table(i, j); //} //else // Init_Table(i, CompleateTask[0]); } } } } } }
/// <summary> /// Заполнение таблиц. /// </summary> private void Init_Table(Algorithm.IAlgorithm alg, Tasks.ITaskPackage task, DataFormat.IOutBlackBoxParam rez, int time) { for (int i = 0; i < Algorithms.GetAlgorithms.Count; i++) { if (alg.Name == Algs[i].Name) { for (int j = 0; j < Tasks.Count; j++) { if (Tasks[j].Name == task.Name) { //dataGridViews[i].Rows[j].Cells[0].Value = task.Name; dataGridViews[i].Rows[j].Cells[1].Value = time; dataGridViews[i].Rows[j].Cells[2].Value = alg.Calls; //dataGridViews[i].Rows[j].Cells[3].Value = "10*i + j ="; dataGridViews[i].Rows[j].Cells[4].Value = rez.Cost; } } } } }
public void OnEndCalculate(Algorithm.IAlgorithm alg, Tasks.ITaskPackage task, DataFormat.IOutBlackBoxParam rez, int time) { ///Init_Table(alg, task, rez, time); //throw new NotImplementedException(); }
public void OnEndTask(Algorithm.IAlgorithm alg, Tasks.ITaskPackage task, DataFormat.IOutBlackBoxParam rez, int time) { Init_Table(alg, task, rez, time); }