Exemplo n.º 1
0
        public async void optimizeGAP()
        {
            if (P.checkFile())
            {
                P.setGFromFile();
            }
            else
            {
                double[] list = await getPrevisionsList("arima_forecast.py");

                P.setGFromData(list);
            }

            P.readGAPinstance(this.dbPath);
            GAPclass G   = P.getG();
            double   zub = G.simpleContruct();

            Trace.WriteLine($"Constructive, zub = {zub}");
            zub = G.opt10(G.c);
            Trace.WriteLine($"Local search, zub = {zub}");
            zub = G.TabuSearch(30, 100);
            Trace.WriteLine($"Tabu search, zub = {zub}");
        }
Exemplo n.º 2
0
        public async void optimizeGAP(string dbPath)
        {
            readGAPinstance(dbPath);

            if (File.Exists("GAPreq.dat"))
            {
                string[] txtData = File.ReadAllLines("GAPreq.dat");
                GAP.req = Array.ConvertAll <string, int>(txtData, new Converter <string, int>(i => int.Parse(i)));
            }
            else
            {
                await sarimaForecasts(dbPath);

                File.WriteAllLines("GAPreq.dat", GAP.req.Select(x => x.ToString()));
            }

            double zub = GAP.simpleConstruct();

            Trace.WriteLine($"Constructive, zub = {zub}");
            zub = GAP.opt10(GAP.c);
            Trace.WriteLine($"Local search, zub = {zub}");
            zub = GAP.tabuSearch(30, 1000);
            Trace.WriteLine($"Tabu search, zub = {zub}");
        }
Exemplo n.º 3
0
 public double GetOpt10Value()
 {
     return(G.opt10(G.c));
 }