-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (20 loc) · 775 Bytes
/
Copy pathmain.py
File metadata and controls
29 lines (20 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from core.dispatcher import Dispatcher
from core.grid_map import GridMap
from services import DispatchApplicationService
from ui import ConsoleUI
def build_app() -> DispatchApplicationService:
grid_map = GridMap(rows=12, cols=20, obstacle_prob=0.18, ensure_connectivity=True, border_free=True, seed=7)
dispatcher = Dispatcher(grid_map)
app = DispatchApplicationService(dispatcher)
app.register_agv("AGV-01", (1, 1))
app.register_agv("AGV-02", (10, 18))
app.create_task((2, 2), (9, 15), priority=1)
app.create_task((9, 2), (2, 17), priority=2)
app.create_task((1, 10), (10, 10), priority=1)
return app
def main() -> None:
app = build_app()
ui = ConsoleUI(app)
ui.run(max_steps=80)
if __name__ == "__main__":
main()