Esempio n. 1
0
        public TSPSpecimen()
        {
            thief = new Thief();
            citiesVisitedInOrder = new List <CityElement>();

            FillTheVisitedCitiesList();
            SetObjectiveFunction();
        }
Esempio n. 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);
        }