Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                Console.WriteLine("Usage: implementation.exe <input-filename>");
                return;
            }

            TaskInstance taskInstance = TaskInstance.FromFile(args[0]);

            RoutingTaskSolver solver = new RoutingTaskSolver(taskInstance);

            string answer = solver.Solve();

            File.WriteAllText(args[0] + ".ans", answer);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Random rn = new Random((int)DateTime.Now.Ticks);

            GeographicPoint[] gp = new GeographicPoint[10];
            for (int i = 0; i < gp.Length; i++)
            {
                GeographicPoint _gp = new GeographicPoint(rn.Next(0, 10), rn.Next(0, 10), rn.Next(0, 100));
                gp[i] = _gp;
            }
            GeographicPoint[] wh = new GeographicPoint[2];
            for (int i = 0; i < wh.Length; i++)
            {
                GeographicPoint _wh = new GeographicPoint(rn.Next(0, 10), rn.Next(0, 10), rn.Next(0, 100));
                wh[i] = _wh;
            }
            Vehicle[] ven = new Vehicle[3];
            ven[0] = new Vehicle {
                LiftingCapacity = 10
            };
            ven[1] = new Vehicle {
                LiftingCapacity = 10
            };
            ven[2] = new Vehicle {
                LiftingCapacity = 10
            };
            RoutingTask rt = new RoutingTask(wh, gp, ven);
            var         v  = new RoutingTaskSolver(rt).Solve();


            SimpeExample.Execute();
            OpenCLTemplate.CLCalc.InitCL();
            List <Cloo.ComputeDevice> L = OpenCLTemplate.CLCalc.CLDevices;

            foreach (object o in L)
            {
                Console.WriteLine("\n" + o.ToString());
            }


            SpeedTest(10000);
            Console.ReadKey();
        }