private int GetSolutionWeight() { var totalWeight = _softConstraints.Where(c => c.IsSatisfied()).Sum(c => c.Weight); BestSolutionWeight = totalWeight < BestSolutionWeight ? BestSolutionWeight : totalWeight; return totalWeight; }