Exemple #1
0
 def run(self):
     """Starts a new event loop with this object as the main program.
     Note: might not return, in the case of GLUT.
     """
     import visualization
     visualization.setWindowTitle(self.name)
     visualization.run(self)
Exemple #2
0
 def run(self):
     """Starts a new event loop with this object as the main program.
     Note: might not return, in the case of GLUT.
     """
     import visualization
     visualization.setWindowTitle(self.name)
     visualization.run(self)
Exemple #3
0
def run():
    print("Running @", datetime.now())
    print("Downloading data..")
    collection.run()
    print("Aggregating data..")
    aggregation.run()
    print("Analyzing data..")
    analysis.run()
    print("Creating plots..")
    visualization.run()
    print("Done!")
Exemple #4
0
def main(filename, display):
    dimensions, rowCons, colCons = nn.get_scenarioFromFile(filename)
    initialNonogram = nn.get_initialNonogram(dimensions, rowCons, colCons)
    if display:
        nn.print_nonogram(initialNonogram)
    #initialNonogram, stateOk = nn.filterDomains(initialNonogram)
    result = astar.run(initialNonogram, display, nn)
    if display:
        for nonogram in result[0]:
            nn.print_nonogram(nonogram)
            visualization.run(nonogram, 100)
    #print stats
    nn.print_resultStats(result)
Exemple #5
0
def main(filename, algorithm, display):
    scenario = rH.get_scenarioFromFile(filename)
    initial_board = rH.get_initialBoard(scenario)
    if display:
        rH.print_board(initial_board)
    if algorithm == 'astar':
        result = astar.run(initial_board, display, rH)
    elif algorithm == 'bfs':
        result = bfs.run(initial_board, display, rH)
    elif algorithm == 'dfs':
        result = dfs.run(initial_board, display, rH)
    if display:
        for board in result[0]:
            rH.print_board(board)
            visualization.run(board, 100)
    #print stats
    rH.print_resultStats(result)
Exemple #6
0
 def display(nonogram, waitTime):
     nn.print_nonogram(nonogram)
     visualization.run(nonogram, waitTime)
Exemple #7
0
 def display(board, waitTime):
     rH.print_board(board)
     visualization.run(board, waitTime)