def line_search(cls):
        optimize.initialize_search()

        while True:
            cls.evaluate_function()
            optimize.update_status()

            if optimize.isdone:
                optimize.finalize_search()
                break

            elif optimize.step_count < PAR.STEPMAX:
                optimize.compute_step()
                continue

            else:
                retry = optimize.retry_status
                if retry:
                    print ' Line search failed... retry'
                    optimize.restart()
                    cls.line_search()
                    break
                else:
                    print ' Line search failed... abort'
                    sys.exit(-1)
    def line_search(cls):
        optimize.initialize_search()

        while True:
            cls.evaluate_function()
            optimize.update_status()

            if optimize.isdone:
                optimize.finalize_search()
                break

            elif optimize.step_count < PAR.STEPMAX:
                optimize.compute_step()
                continue

            else:
                retry = optimize.retry_status
                if retry:
                    print ' Line search failed... retry'
                    optimize.restart()
                    cls.line_search()
                    break
                else:
                    print ' Line search failed... abort'
                    sys.exit(-1)
    def line_search(self):
        """ Conducts line search in given search direction
        """
        optimize.initialize_search()

        while True:
            self.iterate_search()

            if optimize.isdone:
                optimize.finalize_search()
                break
            elif optimize.step_count < PAR.STEPMAX:
                optimize.compute_step()
                continue
            else:
                retry = optimize.retry_status()
                if retry:
                    print ' Line search failed\n\n Retrying...'
                    optimize.restart()
                    self.line_search()
                    break
                else:
                    print ' Line search failed\n\n Aborting...'
                    sys.exit(-1)
Beispiel #4
0
    def line_search(self):
        """ Conducts line search in given search direction
        """
        optimize.initialize_search()

        while True:
            self.iterate_search()

            if optimize.isdone:
                optimize.finalize_search()
                break
            elif optimize.step_count < PAR.STEPMAX:
                optimize.compute_step()
                continue
            else:
                retry = optimize.retry_status()
                if retry:
                    print ' Line search failed...\n\n Retrying...'
                    optimize.restart()
                    self.line_search()
                    break
                else:
                    print ' Line search failed...\n\n Aborting...'
                    sys.exit(-1)