コード例 #1
0
        public void Setup()
        {
            _pool = GATestHelper.GetTravelingSalesmanPopulation();
            var calc = new SimpleTravelingSalesmanSolution();

            foreach (var chromosome in _pool)
            {
                chromosome.FitnessScore = calc.GetFitnessScoreFor(chromosome);
            }
        }
コード例 #2
0
        public static Chromosome GetTravelingSalesmanChromosome()
        {
            var _solution = new SimpleTravelingSalesmanSolution();

            return(new OrderedChromosome(_solution.GetOptions()));
        }
コード例 #3
0
 public void BeforeEach()
 {
     _config   = GATestHelper.GetTravelingSalesmanDefaultConfiguration();
     _solution = new SimpleTravelingSalesmanSolution();
 }
コード例 #4
0
 public void BeforeEach()
 {
     _config = GATestHelper.GetTravelingSalesmanDefaultConfiguration();
     _config.DuplicationStrategy = DuplicationStrategy.Allow;
     _solution = new SimpleTravelingSalesmanSolution();
 }