Skip to content

Commit

Permalink
update defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
chraibi committed Mar 14, 2024
1 parent 9897973 commit 11d30d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def read_data(output_file: str) -> pd.DataFrame:
json_str = f.read()
data = json.loads(json_str)
fps = parse_fps(data)
time_step = 0.005 # parse_time_step(data)
time_step = parse_time_step(data)
number_agents = parse_number_agents(data)
simulation_time = parse_simulation_time(data)
strategy = parse_motivation_strategy(data)
Expand Down
4 changes: 2 additions & 2 deletions files/bottleneck.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"simulation_parameters": {
"fps": 60,
"time_step": 0.01,
"time_step": 0.002,
"number_agents": 50,
"simulation_time": 100
},
Expand Down Expand Up @@ -57,7 +57,7 @@
"height": "1.0",
"seed": "1.0",
"max_value": "1.0",
"min_value": "0.0",
"min_value": "0.1",
"motivation_doors": [
{
"id": 1,
Expand Down
4 changes: 3 additions & 1 deletion src/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def ui_simulation_parameters(data: Dict[str, Any]) -> None:
)
data["simulation_parameters"]["time_step"] = st.number_input(
"Time Step:",
value=0.1,
format="%f",
value=data["simulation_parameters"]["time_step"],
min_value=0.0001,
max_value=0.5,
step=0.0001,
Expand Down Expand Up @@ -155,6 +156,7 @@ def ui_motivation_parameters(data: Dict[str, Any]) -> None:
"Min_value",
key="min_value",
step=0.5,
min_value=0.1,
value=float(data["motivation_parameters"]["min_value"]),
help="Min Value",
)
Expand Down

0 comments on commit 11d30d6

Please sign in to comment.