示例#1
0
        private Stellage CreateStellage(double x, double y, double z)
        {
            Stellage s = new Stellage(x, y, z, 0, 0, 0);

            worldObjects.Add(s);
            return(s);
        }
示例#2
0
        public World()
        {
            Robot r = CreateRobot(0, 0, 0);

            r.Move(28, 0, 28);
            VanCar v = CreateVanCar(0, 0, 0);

            v.Move(14, 0, -3);
            Stellage s = CreateStellage(0, 0, 0);

            s.Move(10, 1, 10);
        }
示例#3
0
        public World()
        {
            Robot r = CreateRobot(0, 0, 0);

            r.Move(28, 0.1, 15);
            VanCar v = CreateVanCar(0, 0, 0);

            v.Move(14, 0, -3);
            Stellage s1 = CreateStellage(0, 0, 0);

            s1.Move(15, 1.5, 11);
            Stellage s2 = CreateStellage(0, 0, 0);

            s2.Move(15, 1.5, 19);
            Stellage s3 = CreateStellage(0, 0, 0);

            s3.Move(15, 1.5, 27);

            Node A = CreateNode("A", 2, 4);
            Node B = CreateNode("B", 14, 4);
            Node C = CreateNode("C", 28, 4);
            Node D = CreateNode("D", 2, 12);
            Node E = CreateNode("E", 14, 12);
            Node F = CreateNode("F", 28, 12);
            Node G = CreateNode("G", 2, 20);
            Node H = CreateNode("H", 14, 20);
            Node I = CreateNode("I", 28, 20);
            Node J = CreateNode("J", 2, 28);
            Node K = CreateNode("K", 14, 28);
            Node L = CreateNode("L", 28, 28);

            CreateConnection(A, B);
            CreateConnection(A, D);

            CreateConnection(B, A);
            CreateConnection(B, C);

            CreateConnection(C, B);
            CreateConnection(C, F);

            CreateConnection(D, A);
            CreateConnection(D, E);
            CreateConnection(D, G);

            CreateConnection(E, D);
            CreateConnection(E, F);

            CreateConnection(F, C);
            CreateConnection(F, E);
            CreateConnection(F, I);

            CreateConnection(G, D);
            CreateConnection(G, H);
            CreateConnection(G, J);

            CreateConnection(H, G);
            CreateConnection(H, I);

            CreateConnection(I, F);
            CreateConnection(I, H);
            CreateConnection(I, L);

            CreateConnection(J, K);
            CreateConnection(J, G);

            CreateConnection(K, J);
            CreateConnection(K, L);

            CreateConnection(L, K);
            CreateConnection(L, I);



            SearchEngine searchEngine = new SearchEngine(nodes);

            searchEngine.FindShortestPath(A, C);
            searchEngine.FindShortestPath(A, D);

            searchEngine.FindShortestPath(B, E);

            List <Node> NodeList1 = new List <Node>();

            NodeList1 = searchEngine.FindShortestPath(B, H);
            r.RouteHeenweg(NodeList1);

            List <Node> NodeList2 = new List <Node>();

            NodeList2 = searchEngine.FindShortestPath(H, B);
            r.RouteTerugweg(NodeList2);
        }