Skip to content

Improve terminal printout#251

Open
misi9170 wants to merge 4 commits intoNatLabRockies:developfrom
misi9170:ehmt/printout
Open

Improve terminal printout#251
misi9170 wants to merge 4 commits intoNatLabRockies:developfrom
misi9170:ehmt/printout

Conversation

@misi9170
Copy link
Copy Markdown
Collaborator

@misi9170 misi9170 commented Apr 20, 2026

This small PR fixes some bad formatting in the printout provided by Hercules. It also removes the line stating the speed-up of Hercules relative to real time, as this probably isn't super relevant for most users and can be easily calculated from what is still printed to screen. However, this second change can be easily reverted if we still want the speed up information.

Example printout prior to the change:

[BATTERY] 2026-04-20 17:16:58,222 - INFO - read in verbose flag = False
[HERCULES] 2026-04-20 17:16:58,470 - INFO -  #### Entering main loop #### 
Simulation Progress: 100%|████████████████████████████| 604501/604501 [00:16<00:00, 37152.12steps/s]
[HERCULES] 2026-04-20 17:17:14,759 - INFO - =====================================
[HERCULES] 2026-04-20 17:17:14,760 - INFO - ('Total simulated time: ', '604501.0 seconds (6.996539351851852 days)')
[HERCULES] 2026-04-20 17:17:14,760 - INFO - Total wall time: 16.289391040802002
[HERCULES] 2026-04-20 17:17:14,760 - INFO - ('Rate of simulation: ', '37110.1', 'x real time')
[HERCULES] 2026-04-20 17:17:14,760 - INFO - =====================================
[HERCULES] 2026-04-20 17:17:14,760 - INFO - Finalizing HDF5 output file
[HERCULES] 2026-04-20 17:17:14,981 - INFO - Process completed successfully
Real-time revenue over simulation: $6876.8

After the change:

[BATTERY] 2026-04-20 17:15:40,978 - INFO - read in verbose flag = False
[HERCULES] 2026-04-20 17:15:41,218 - INFO -  #### Entering main loop #### 
Simulation Progress: 100%|████████████████████████████| 604501/604501 [00:16<00:00, 36856.39steps/s]
[HERCULES] 2026-04-20 17:15:57,647 - INFO - =====================================
[HERCULES] 2026-04-20 17:15:57,647 - INFO - Total simulated time: 604501.0 seconds (7.00 days)
[HERCULES] 2026-04-20 17:15:57,647 - INFO - Total wall time: 16.4 seconds
[HERCULES] 2026-04-20 17:15:57,647 - INFO - =====================================
[HERCULES] 2026-04-20 17:15:57,647 - INFO - Finalizing HDF5 output file
[HERCULES] 2026-04-20 17:15:57,851 - INFO - Process completed successfully
Real-time revenue over simulation: $6876.8

I'm not totally sure what the read in verbose flag = False is meant to be used for, so perhaps that could also be addressed in this PR?

@misi9170 misi9170 changed the base branch from main to develop April 20, 2026 23:18
@misi9170 misi9170 requested a review from Copilot April 20, 2026 23:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves Hercules’ terminal/log output by cleaning up the end-of-run timing summary, making it more readable and removing the “x real time” line that was previously printed as a tuple.

Changes:

  • Replace tuple-based logging of “Total simulated time” with a single formatted string.
  • Format wall time with units and fixed precision, and remove the “Rate of simulation … x real time” log line.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@misi9170 misi9170 added the enhancement New feature or request label Apr 21, 2026
@misi9170
Copy link
Copy Markdown
Collaborator Author

@genevievestarke @paulf81 tagging you in case you have any other suggestions for cleaning up the screen printout while I'm at it (and perhaps weigh in on the read in verbose flag bit)

@genevievestarke
Copy link
Copy Markdown
Collaborator

I changed it so that it only prints out if verbose = True. I also got rid of an old AMR wind file I found floating around in the examples. This seemed like a good PR to put that in, too!

@genevievestarke genevievestarke self-requested a review April 22, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants