public WarehouseResult Run()
        {
            var result = _genetic.OptimizeForBestIndividual();

            return(new WarehouseResult()
            {
                BestChromosome = result,
                fitness = wm.GetFitnessHistory()
            });
        }
예제 #2
0
        public TSPResult Run()
        {
            var result = _genetic.OptimizeForBestIndividual();

            if (_use2opt)
            {
                result = Optimizer2Opt.Optimize(result);
            }
            var fitness = _tspModule.GetFitnessHistory();

            return(new TSPResult(fitness, result)
            {
                ResolveInEpoch = _tspModule.ResolveCountInEpoch,
                RandomizedResolveInEpoch = _tspModule.RandomizedResolveCountInEpoch,
                ResolvePercentInEpoch = _tspModule.ConflictResolvesPercent,
                RandomizedResolvePercentInEpoch = _tspModule.RandomResolvesPercent,
                DifferencesInEpoch = _tspModule.DifferencesInEpoch.ToArray()
            });
        }
 public int[] FindShortestPath(int[] order)
 {
     return(_genetic.OptimizeForBestIndividual());
 }