예제 #1
0
        public void ChooseProgramMode()
        {
            Console.WriteLine("Choose program mode:\n");
            Console.WriteLine("1 - Brute Force");
            Console.WriteLine("2 - Evolution Algorithm");

            int mode = Int32.Parse(Console.ReadLine());

            switch (mode)
            {
            case 1:
                BruteForceAlgorithm bruteForce = new BruteForceAlgorithm(Links, Demands);
                break;

            case 2:
                EvolutionAlgorithm evolutionAlgorithm = new EvolutionAlgorithm(Links, Demands);
                break;

            default:
                Console.WriteLine("Invalid choice");
                ChooseProgramMode();
                break;
            }
        }
예제 #2
0
 public void BruteForce(List <Link> links, List <Demand> demands)
 {
     Console.WriteLine("You have chosen brute-force algorithm");
     BruteForceAlgorithm bruteForce = new BruteForceAlgorithm(this.Links, this.Demands);
 }