protected bool UpdateState(List <Element> solution, EvaluationResult value, bool onlyImprovements = true) { return(state.Update(solution, value, iterationNumber, evaluation.iFFE, TimeUtils.DurationInSeconds(startTime), onlyImprovements)); }
private bool CheckNewBest(List <Element> solution, double value, bool onlyImprovements = true) { if (Result == null || value > Result.BestValue || value == Result.BestValue && !onlyImprovements) { Result = new OptimizationResult <Element>(value, solution, iterationNumber, evaluation.iFFE, TimeUtils.DurationInSeconds(startTime)); return(true); } return(false); }
public bool Stop(long iterationNumber, long FFE, DateTime startTime) { return(TimeUtils.DurationInSeconds(startTime) >= maxRunningTime); }