Пример #1
0
        public bool Equals(ISolution other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (!ReferenceEquals(Problem, other.Problem))
            {
                return(false);
            }

            foreach (Job job in Problem)
            {
                if (!ReferenceEquals(GetRoute(job), other.GetRoute(job)))
                {
                    return(false);
                }
            }

            for (int i = 0; i < Problem.OperationCount; i++)
            {
                if (GetEntryTime(i) != other.GetEntryTime(i))
                {
                    return(false);
                }
            }

            return(true);
        }