D2OC commited on
Commit
5ad3dd6
·
verified ·
1 Parent(s): 6e02c68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -90,7 +90,7 @@ def run_simulation(num_agents, battery_life):
90
  fig, ax = plt.subplots(figsize=(6, 6))
91
  max_vel = 0.8
92
 
93
- max_steps = 10000
94
  for t in range(1, max_steps+1):
95
  for n in range(no_of_agents):
96
  trajectories[n].append(agents[n, [0, 4]].copy())
@@ -146,7 +146,7 @@ with gr.Blocks() as demo:
146
  gr.Markdown("Interactive Demo for Decentralized Multi-Agent Coverage using Optimal Transport (OT) and Wasserstein Distance.")
147
  with gr.Row():
148
  num_agents = gr.Slider(minimum=2, maximum=20, value=8, step=1, label="Number of Agents")
149
- bat_life = gr.Slider(minimum=1000, maximum=50000, value=10000, step=1000, label="Task Capacity (Battery Life)")
150
  btn = gr.Button("Run Simulation")
151
  output_gif = gr.Image(label="Simulation Result (GIF)")
152
  btn.click(fn=run_simulation, inputs=[num_agents, bat_life], outputs=output_gif)
 
90
  fig, ax = plt.subplots(figsize=(6, 6))
91
  max_vel = 0.8
92
 
93
+ max_steps = 20000
94
  for t in range(1, max_steps+1):
95
  for n in range(no_of_agents):
96
  trajectories[n].append(agents[n, [0, 4]].copy())
 
146
  gr.Markdown("Interactive Demo for Decentralized Multi-Agent Coverage using Optimal Transport (OT) and Wasserstein Distance.")
147
  with gr.Row():
148
  num_agents = gr.Slider(minimum=2, maximum=20, value=8, step=1, label="Number of Agents")
149
+ bat_life = gr.Slider(minimum=5000, maximum=20000, value=8000, step=1000, label="Task Capacity (Battery Life)")
150
  btn = gr.Button("Run Simulation")
151
  output_gif = gr.Image(label="Simulation Result (GIF)")
152
  btn.click(fn=run_simulation, inputs=[num_agents, bat_life], outputs=output_gif)