Comments (4)
The frequency of printing is determined by the updates
and steps
properties. What does oa.steps
and oa.updates
give you?
from simanneal.
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.
@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.
@Iain-S sounds like a good solution. Would you mind creating a PR for it?
from simanneal.
Related Issues (20)
- .auto() yields tmax == tmin, and negative remaining time HOT 2
- Problem in code HOT 1
- copy_state() returns None HOT 1
- Allow any type of state variable HOT 1
- multithreading HOT 2
- Is it possible to perform a continuous problem with this package?
- Dependency injection for external data
- Travis builds failing HOT 1
- tsp example move() needs a fix
- question on multi-objective HOT 1
- Unit tests HOT 1
- ZeroDivisionError in anneal.py HOT 4
- Litterature reference for auto scheduling HOT 2
- Temperature and Energy stuck at zero HOT 1
- Litterature reference for simulated annealing HOT 2
- Pass current temperature to move function HOT 2
- Annealing problem HOT 1
- Speeding Up the Calculation HOT 2
- Replacing lines to shorten output HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simanneal.