Giter Club home page Giter Club logo

Comments (4)

perrygeo avatar perrygeo commented on September 1, 2024

The frequency of printing is determined by the updates and steps properties. What does oa.steps and oa.updates give you?

from simanneal.

sanguinettib avatar sanguinettib commented on September 1, 2024

Somehow, the end="\r" in the print statement of the default update function seemed to prevent it from printing on my system (macOS mojave). Removing the end="\r' fixed the problem, at least for me.

from simanneal.

Iain-S avatar Iain-S commented on September 1, 2024

@Br1000
There is a known issue with PyCharm where it won't print properly with end='\r' but will print strings containing '\r' just fine.

@perrygeo
Commit 2e79630 added end='\r' but I don't think it is necessary since the string begins with '\r' anyway. Perhaps it could be changed to end='' to help out PyCharm users?

Also, the annealing process seems to be run twice (once by auto and then again, for real). This leads to output like:

Temperature Energy Accept Improve Elapsed Remaining
Temperature Energy Accept Improve Elapsed Remaining
7.30000 6801.84 5.60% 0.27% 0:00:11 0:00:00

If you were to change

    print(' Temperature        Energy    Accept   Improve     Elapsed   Remaining',
                      file=sys.stderr)

to

    print('\n Temperature        Energy    Accept   Improve     Elapsed   Remaining',
                  file=sys.stderr) 

then the output would be:

empty line
Temperature Energy Accept Improve Elapsed Remaining
4.90000 6801.84 4.60% 0.00% 0:00:03 -1:59:59
Temperature Energy Accept Improve Elapsed Remaining
4.90000 6845.62 6.81% 0.14% 0:00:09 0:00:00
which I think is a bit neater.

from simanneal.

perrygeo avatar perrygeo commented on September 1, 2024

@Iain-S sounds like a good solution. Would you mind creating a PR for it?

from simanneal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.