private void GreedyAlgorithm_Click(object sender, EventArgs e) { if (this.Validation()) { this.PrepareData(); Form showResult = new AlgorithmForm("Жадібний", manufactures, clients, (manufactures, clients) => { List <Route> _routes; Expensive greedy = new Expensive(); var resultAlgorithm = greedy.Solver(manufactures, clients, out _routes); return(new TransportTaskResult { ResultRoute = _routes, Cost = resultAlgorithm }); }); showResult.Show(); } else { MessageBox.Show("Перевірте введені дані"); } }
static int Expensive(List <Manufacture> manufactures, List <Client> clients) { List <Route> routes; Expensive algorithm = new Expensive(); return(algorithm.Solver(manufactures, clients, out routes)); }
private int GenerateGreedy(List <Manufacture> manufactures, List <Client> clients) { List <Route> routes; Expensive algorithm = new Expensive(); return(algorithm.Solver(manufactures, clients, out routes)); }