Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reformat using black
  • Loading branch information
Logende committed Dec 27, 2022
commit 8ca554a7e7e0ef19c97d113a81d92a117c3a173f
10 changes: 6 additions & 4 deletions examples/caching_and_replay/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ def get_cache_file_status(_):
"""
Display an informational text about caching and the status of the cache file (existing versus not existing)
"""
return f"This example writes every simulation run into a cache file. Cached runs can be replayed later. " \
f"Activate the 'Replay cached run?' toggle to replay the latest cached run. " \
f"Only activate the replay when a cache file already exists, otherwise it will fail. Cache file existing: " \
f"'{os.path.exists('my_cache_file_path.cache')}'."
return (
f"This example writes every simulation run into a cache file. Cached runs can be replayed later. "
f"Activate the 'Replay cached run?' toggle to replay the latest cached run. "
f"Only activate the replay when a cache file already exists, otherwise it will fail. Cache file existing: "
f"'{os.path.exists('my_cache_file_path.cache')}'."
)


server = mesa.visualization.ModularServer(
Expand Down