Exemple #1
0
        public TSPSpecimen()
        {
            thief = new Thief();
            citiesVisitedInOrder = new List <CityElement>();

            FillTheVisitedCitiesList();
            SetObjectiveFunction();
        }
Exemple #2
0
        public Thief Clone()
        {
            Thief thief = new Thief();

            thief.currentVelocity      = currentVelocity;
            thief.currentValueOfItems  = currentValueOfItems;
            thief.currentWeightOfItems = currentWeightOfItems;
            for (int i = 0; i < knapsack.Count; i++)
            {
                thief.knapsack.Add(knapsack[i].Clone());
            }

            return(thief);
        }