def update(self, step, T, E, acceptance, improvement):
        """Print progress."""
        if acceptance is None:
            acceptance = 0
        if improvement is None:
            improvement = 0
        if step > 0:
            elapsed = time.time() - self.start
            remain = (self.steps - step) * (elapsed / step)
            # print('Time {}  ({} Remaing)'.format(time_string(elapsed), time_string(remain)))
        else:
            elapsed = 0
            remain = 0

        curr = self.cmd(self.state)
        curr_score = float(E)
        best = self.cmd(self.best_state)
        best_score = self.best_energy
        report = progress_report(
            curr,
            best,
            curr_score,
            best_score,
            step,
            self.steps,
            acceptance * 100,
            improvement * 100,
            time_string(elapsed),
            time_string(remain),
        )
        print(report)

        if fig:
            imgs[1].set_data(
                reshape_as_image(self.apply_color(self.src.copy(), self.state))
            )
            imgs[2].set_data(
                reshape_as_image(self.apply_color(self.src.copy(), self.best_state))
            )
            if txt:
                txt.set_text(report)
            fig.canvas.draw()
Print progress.