/// <summary> /// Begins a New Search corresponding with the <see cref="Solver"/> and /// <paramref name="agent"/>. /// </summary> /// <param name="agent"></param> /// <returns></returns> protected virtual ISearchAgent NewSearch(ISearchAgent agent) { agent.ProcessVariables -= OnProcessVariables; agent.ProcessVariables += OnProcessVariables; return(agent.NewSearch(a => a.Solver.MakePhase(a.Variables, IntVarSimple, IntValueSimple))); }
/// <summary> /// Begins a New Search corresponding with the <see cref="Solver"/> and /// <paramref name="agent"/>. /// </summary> /// <param name="agent"></param> /// <returns></returns> /// <inheritdoc /> protected override ISearchAgent NewSearch(ISearchAgent agent) { agent.ProcessVariables -= OnProcessVariables; agent.ProcessVariables += OnProcessVariables; // The simple strategies are okay and yield expected results. But let's keep it interesting. return(agent.NewSearch(a => a.Solver.MakePhase(a.Variables, ChooseRandom, AssignRandomValue))); }