コード例 #1
0
        private SiteClusteringCvrpp(SiteClusteringCvrpp site)
            : base(site)
        {
            PenaltyCluster = new Cluster(site.PenaltyCluster);
            kilometerCost = site.kilometerCost;

            FormAllClusters();
        }
コード例 #2
0
        protected override Site GetNeighbour()
        {
            SiteClusteringCvrpp result = new SiteClusteringCvrpp(this);

            double probability = TaskController.Rnd.NextDouble();

            if (probability < 0.5)
            {
                MoveNodeFromOneClusterToAnother(result.allClusters);
            }
            else
            {
                ExchangeNodesInClusters(result.allClusters);
            }

            return result;
        }