private void InitializeSolversFuncs() { var len = new Func <Route, double>(RouteMetrics.Length); var maxlen = new Func <Route, double>(x => RouteMetrics.MaxLength(x)); var noloops = new Func <Route, bool>(RouteConstraints.NoLoops); _geneticSolverBuilder.AddConstraint(noloops); _bruteForceSolverBuilder.AddConstraint(noloops); _geneticSolverBuilder.AddObjective(len); _geneticSolverBuilder.AddObjective(maxlen); _bruteForceSolverBuilder.AddObjective(len); _bruteForceSolverBuilder.AddObjective(maxlen); }