Cream.Solver.UpdateBest C# (CSharp) Method

UpdateBest() protected method

protected UpdateBest ( ) : bool
return bool
        protected internal virtual bool UpdateBest()
        {
            if (solution == null)
                return false;
            if (network.Objective == null)
            {
                bestSolution = solution;
                return true;
            }
            int value = solution.ObjectiveIntValue;
            if (IsBetter(value, bestValue))
            {
                bestSolution = solution;
                bestValue = value;
                return true;
            }
            return false;
        }