Skip to content

Commit

Permalink
Add some helpful messagesw and fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
chraibi committed Mar 12, 2024
1 parent b153107 commit 9f4b5ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def read_data(output_file: str) -> pd.DataFrame:
st.session_state.data = {}

if "all_files" not in st.session_state:
st.session_state.all_files = []
st.session_state.all_files = ["files/bottleneck.json"]
# User will select from these files to do simulations

tab = init_sidebar()
Expand Down Expand Up @@ -144,15 +144,15 @@ def read_data(output_file: str) -> pd.DataFrame:

with st.spinner("Simulating ..."):
if fps and time_step:
simulation.main(
evac_time = simulation.main(
number_agents,
fps,
time_step,
simulation_time,
data,
Path(OUTPUT_FILE),
)
msg.code("Finished simulation")
msg.code(f"Finished simulation. Evac time {evac_time} s")
st.empty()
output_path = Path(OUTPUT_FILE)
if Path("values.txt").exists():
Expand Down
2 changes: 1 addition & 1 deletion simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def main(
logging.info(f"Simulation completed after {simulation.iteration_count()} iterations")
logging.info(f"simulation time: {simulation.iteration_count()*_time_step} [s]")
# logging.info(f"Trajectory: {_trajectory_path}")

return simulation.iteration_count()*_time_step

if __name__ == "__main__":
init_logger()
Expand Down

0 comments on commit 9f4b5ff

Please sign in to comment.