Пример #1
0
        /// <summary>
        /// Заглушка на алгоритмы.
        /// </summary>
        private void Create_Algorithms()
        {
            BlackBoxFunction function = new BlackBoxFunction();
            DataFormat.DataFormat data = new DataFormat.DataFormat();
            data.OpenFile("Tests/test_1.txt");
            ITaskPackage package = data.GetData();
            List<ITaskPackage> tasks=new List<ITaskPackage>();
            tasks.Add(package);
            test_system.TestSystem system = new test_system.TestSystem(tasks, function);
            Algorithms = new List<Algorithm.IAlgorithm>();
            system.AddAlgorithm(new Algorithm.Benchmark_Algorithm(null, function));

            system.SetListener(this);




            system.Test();
        }
Пример #2
0
        //private void CreateToolTip()
        //{
        //    tt = new ToolTip();
        //}

        /// <summary>
        /// Заглушка на алгоритмы.
        /// </summary>
        private void Create_TestSystem()
        {
            Algs = new List <IAlgorithm>();
            Algs.Add(new Algorithm.Benchmark_Algorithm());
            //Algs.Add(new Algorithm.Non_Benchmark_Algorithm());
            //Algs.Add(new Algorithm.Complex_Algorithm());
            Algs.Add(new Algorithm.Diagonal_Algoritm.DiagonalAlgorithmV2());



            CompleateTask = new int[Algs.Count];
            for (int i = 0; i < CompleateTask.Length; i++)
            {
                CompleateTask[i] = 0;
            }

            Tasks = new List <TestSystem.Tasks.ITaskPackage>();

            List <DataFormat.DataFormat> dtf = new List <DataFormat.DataFormat>();

            CreateTasks(dtf, true, MIN_NUMBER_TASK, MAX_NUMBER_TASK);
            //CreateTasks(dtf, false, 6);

            BenchRez = new double[Algs.Count, 2, dtf.Count];

            foreach (var d in dtf)
            {
                Tasks.Add(d.GetData());
                //dtf[0].OpenFile("/Tests/test_1.txt");
            }

            Algorithms = new test_system.TestSystem(Tasks);
            Algorithms.SetListener(this);


            Algorithms.AddAlgorithm(Algs);

            InitTab();
            Algorithms.Test();
            //Algorithms.Add(new Algorithm.Benchmark_Algorithm(null,null));
            //Algorithms.Add(new Algorithm.Genetic_Algorithm(null, null));
        }
Пример #3
0
        /// <summary>
        /// Заглушка на алгоритмы.
        /// </summary>
        private void Create_Algorithms()
        {
            BlackBoxFunction function = new BlackBoxFunction();

            DataFormat.DataFormat data = new DataFormat.DataFormat();
            data.OpenFile("Tests/test_1.txt");
            ITaskPackage        package = data.GetData();
            List <ITaskPackage> tasks   = new List <ITaskPackage>();

            tasks.Add(package);
            test_system.TestSystem system = new test_system.TestSystem(tasks, function);
            Algorithms = new List <Algorithm.IAlgorithm>();
            system.AddAlgorithm(new Algorithm.Benchmark_Algorithm(null, function));

            system.SetListener(this);



            system.Test();
        }
Пример #4
0
        /// <summary>
        /// Заглушка на алгоритмы.
        /// </summary>
        private void Create_TestSystem()
        {
            Line   l = new Line(new TestSystem.Algorithm.Diagonal_Algoritm.Point(-1, -1), new TestSystem.Algorithm.Diagonal_Algoritm.Point(4, 4));
            IPoint p = l.GetPoint(Math.Sqrt(2));

            Algs = new List <IAlgorithm>();
            Algs.Add(new Algorithm.Benchmark_Algorithm());
            //Algs.Add(new Algorithm.Non_Benchmark_Algorithm());

            Tasks = new List <TestSystem.Tasks.ITaskPackage>();

            List <DataFormat.DataFormat> dtf = new List <DataFormat.DataFormat>();

            dtf.Add(new DataFormat.DataFormat("/Tests/test_1.txt"));
            //dtf.Add(new DataFormat.DataFormat("/Tests/test_2.txt"));
            //dtf.Add(new DataFormat.DataFormat("/Tests/test_3.txt"));
            //dtf.Add(new DataFormat.DataFormat("/Tests/test_4.txt"));
            //dtf.Add(new DataFormat.DataFormat("/Tests/test_5.txt"));
            //dtf.Add(new DataFormat.DataFormat("/Tests/test_6.txt"));
            //dtf.Add(new DataFormat.DataFormat("/Tests/test_7.txt"));
            //dtf.Add(new DataFormat.DataFormat("/Tests/test_8.txt"));
            //dtf.Add(new DataFormat.DataFormat("/Tests/test_9.txt"));
            //dtf.Add(new DataFormat.DataFormat("/Tests/test_10.txt"));


            foreach (var d in dtf)
            {
                Tasks.Add(d.GetData());
                //dtf[0].OpenFile("/Tests/test_1.txt");
            }

            Algorithms = new test_system.TestSystem(Tasks);
            Algorithms.SetListener(this);


            Algorithms.AddAlgorithm(Algs);
            //Algorithms.Add(new Algorithm.Benchmark_Algorithm(null,null));
            //Algorithms.Add(new Algorithm.Genetic_Algorithm(null, null));
        }
Пример #5
0
        //private void CreateToolTip()
        //{
        //    tt = new ToolTip();
        //}

        /// <summary>
        /// Заглушка на алгоритмы.
        /// </summary>
        private void Create_TestSystem()
        {
           
            Algs = new List<IAlgorithm>();
            Algs.Add(new Algorithm.Benchmark_Algorithm());
            //Algs.Add(new Algorithm.Non_Benchmark_Algorithm());
            //Algs.Add(new Algorithm.Complex_Algorithm());
            Algs.Add(new Algorithm.Diagonal_Algoritm.DiagonalAlgorithmV2());



            CompleateTask = new int[Algs.Count];
            for (int i = 0; i < CompleateTask.Length; i++)
                CompleateTask[i] = 0;

            Tasks = new List<TestSystem.Tasks.ITaskPackage>();

            List<DataFormat.DataFormat> dtf = new List<DataFormat.DataFormat>();
            CreateTasks(dtf, true, MIN_NUMBER_TASK, MAX_NUMBER_TASK);
            //CreateTasks(dtf, false, 6);

            BenchRez = new double[Algs.Count, 2, dtf.Count];

            foreach (var d in dtf)
            {
                Tasks.Add(d.GetData());
                //dtf[0].OpenFile("/Tests/test_1.txt");
            }

            Algorithms = new test_system.TestSystem(Tasks);
            Algorithms.SetListener(this);

            
            Algorithms.AddAlgorithm(Algs);

            InitTab();
            Algorithms.Test();
            //Algorithms.Add(new Algorithm.Benchmark_Algorithm(null,null));
            //Algorithms.Add(new Algorithm.Genetic_Algorithm(null, null));        
        }