示例#1
0
    def run_to_completion(self):
        'run the computation until it finishes (without plotting)'

        Timers.tic("total")

        while not self.is_finished():
            self.do_step()

        Timers.toc("total")

        if self.settings.print_output:
            LpInstance.print_stats()
            Timers.print_stats()

        self.result.time = Timers.timers["total"].total_secs
示例#2
0
        def anim_iterator():
            'generator for the computation iterator'
            Timers.tic("total")

            # do the computation until its done
            while not is_finished_func():
                yield False

            # redraw one more (will clear cur_state)
            # yield False

            Timers.toc("total")

            LpInstance.print_stats()
            Timers.print_stats()