Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing lines to shorten output #7

Closed
straningera opened this issue Nov 16, 2014 · 2 comments
Closed

Replacing lines to shorten output #7

straningera opened this issue Nov 16, 2014 · 2 comments

Comments

@straningera
Copy link

Hi. I'm using the simulated annealing part several times in my scripts. The console output is too long for my task, so I changed the print statements in lines 86 et seqq. to the following:

        sys.stdout.write('\r%12.2f  %12.2f                      %s            ' % \
            (T, E, time_string(elapsed)))
        sys.stdout.flush()

and

        sys.stdout.write('\r%12.2f  %12.2f  %7.2f%%  %7.2f%%  %s  %s' % \
            (T, E, 100.0 * acceptance, 100.0 * improvement,
                time_string(elapsed), time_string(remain))),
        sys.stdout.flush()

By doing so, previous outputs are replaced by the most recent output.

@perrygeo
Copy link
Owner

Looks good to me, If possible, could you submit the change as a pull request so you get credit for it? :-)

@kim0
Copy link
Contributor

kim0 commented Apr 9, 2015

@perrygeo .. Guess this was merged and should be closed!

@perrygeo perrygeo closed this as completed Apr 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants