Пример #1
0
def main():
    window=Tk();
    window.title("Medicine");
    window.geometry("940x600+400+200");
    window.resizable(False, False);

    menu=Interface(window, 800, 600);
    menu.Draw();

    window.mainloop();
Пример #2
0
    - Solve the planning problem.
    - Send the path into the graphics.
    - Print the cpu time needed to find the optimal path.
    """
if __name__ == '__main__':

    #Actual time
    a = time.datetime.now()
    #Information from the PDDL file using parse.py. Robots information, the initial state and the target state.
    robots, state, target = p.main()
    how_many_robots = len(robots)
    for i in range(0, how_many_robots):
        robots[i][1] += 1
        robots[i][0][0] -= 1
    rows = len(state)
    columns = len(state[0])
    solution = False
    #Solve and find the proper path
    solution = solve_NRobots(how_many_robots, robots, state, target)
    #Time needed
    print("Time: ")
    print(time.datetime.now() - a)
    if (solution == True):
        #We found a path. Needed to draw it.
        print("Solved")
        #Draw and simulate the path.
        gui.Draw(robots, state, path)
    else:
        #No path found.
        print("To solve")