PunitRaveendran commited on
Commit
c5c1610
·
2 Parent(s): 9ed58af95fe08e

Merge branch 'main' of https://huggingface.co/spaces/PunitRaveendran/Air_Traffic_Control_System

Browse files
Files changed (2) hide show
  1. .gitattributes +35 -0
  2. README.md +4 -196
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,206 +1,14 @@
1
- # ATC OpenEnv - Air Traffic Control Runway Sequencing Environment
2
  ---
 
3
  title: ATC Agentic Inference
 
4
  emoji: ✈️
5
  colorFrom: blue
6
  colorTo: indigo
7
- sdk: docker
8
  pinned: false
9
  tags:
10
  - openenv
11
  ---
12
- # ATC Agent Hackathon Submission
13
- This Space runs the inference script for the ATC environment.
14
- Production-ready OpenEnv-compliant environment for AI agents to act as ATC sequencing controllers.
15
-
16
- ## Overview & Motivation
17
-
18
- **ATC OpenEnv** is an Air Traffic Control sequencing environment simulator explicitly designed for AI agents. The primary motivation is to evaluate reinforcement learning and LLM-based agents in an operational safety-critical setting where delays cause compounding penalties and physical errors (like fuel starvation) lead to episode-terminating crashes.
19
-
20
- An AI agent acts as the primary ATC sequencing controller, observing inbound flights and making continuous decisions on runway assignments, landing order, and flow expediting. This is a physics-grounded workflow simulation, capturing real ATC operational pressure.
21
-
22
- ## Observation Space
23
-
24
- | Field | Type | Description |
25
- |-------|------|-------------|
26
- | aircraft | List[dict] | All aircraft in the sector |
27
- | aircraft[].id | str | Unique aircraft identifier |
28
- | aircraft[].aircraft_type | str | HEAVY, MEDIUM, or LIGHT |
29
- | aircraft[].priority | str | NORMAL, FUEL_CRITICAL, or EMERGENCY |
30
- | aircraft[].status | str | INBOUND, HOLDING, ASSIGNED, LANDING, LANDED |
31
- | aircraft[].distance_nm | float | Distance to runway in nautical miles |
32
- | aircraft[].speed_knots | float | Current speed in knots |
33
- | aircraft[].fuel_remaining_min | float | Fuel remaining in minutes |
34
- | aircraft[].assigned_runway | str | Assigned runway ID (if any) |
35
- | aircraft[].sequence_position | int | Position in landing sequence |
36
- | runways | List[dict] | All runways at the airport |
37
- | runways[].id | str | Runway identifier |
38
- | runways[].status | str | OPEN, REDUCED, or CLOSED |
39
- | runways[].next_available_step | int | Step when runway is next available |
40
- | runways[].current_occupant | str | Aircraft ID currently on runway |
41
- | timestep | int | Current simulation step |
42
- | new_arrivals_count | int | Number of new arrivals this episode |
43
- | episode_done | bool | Whether episode has ended |
44
-
45
- ## Action Space
46
-
47
- | Field | Type | Description |
48
- |-------|------|-------------|
49
- | aircraft_id | str | Target aircraft identifier |
50
- | action_type | str | assign, hold, or expedite |
51
- | runway_id | str | Runway to assign (for assign action) |
52
- | sequence_position | int | Landing sequence position |
53
-
54
- ## Tasks
55
-
56
- ### Task 1: Clear Skies
57
- - **Difficulty**: Easy
58
- - **Aircraft**: 5
59
- - **Runways**: 2 (both OPEN)
60
- - **Fuel**: All > 40 min
61
- - **Emergencies**: None
62
- - **Max Steps**: 20
63
- - **Initial Distances**: 10-50 nm spread
64
-
65
- ### Task 2: Fuel Pressure
66
- - **Difficulty**: Medium
67
- - **Aircraft**: 10 initial, 2 arrive at step 5
68
- - **Runways**: 1 OPEN, 1 REDUCED
69
- - **Fuel Critical**: 2 aircraft with < 12 min
70
- - **Max Steps**: 30
71
-
72
- ### Task 3: Full Emergency
73
- - **Difficulty**: Hard
74
- - **Aircraft**: 15 initial, 2 every 4 steps
75
- - **Runways**: 2 (one closes at step 3)
76
- - **Emergency**: One aircraft at step 5
77
- - **Max Steps**: 40
78
-
79
- ## Scoring
80
-
81
- ### Grader 1 (Task 1)
82
- - **Formula**: landings_completed / total_aircraft - avg_delay_penalty
83
- - **Focus**: Basic landing completion efficiency
84
-
85
- ### Grader 2 (Task 2)
86
- - **Formula**: 40% delay score + 40% fuel-critical handling + 20% separation compliance
87
- - **Focus**: Handling fuel-critical situations
88
-
89
- ### Grader 3 (Task 3)
90
- - **Formula**: 25% landings + 25% emergency + 25% no fuel exhaust + 25% queue < 12
91
- - **Focus**: Multi-objective complex scenario handling
92
-
93
- ## Setup Instructions
94
-
95
- ### Local Setup
96
-
97
- ### Local LLM Inference
98
-
99
- To run the inference script locally, you **must** supply environment variables pointing to your Language Model:
100
-
101
- ```bash
102
- cd atc-openenv
103
- pip install -r requirements.txt
104
-
105
- # Linux/macOS
106
- export API_BASE_URL="https://api.openai.com/v1" # Or Hugging Face Router, local vLLM etc.
107
- export MODEL_NAME="gpt-4o"
108
- export HF_TOKEN="your_hugging_face_or_api_key"
109
 
110
- # Windows (Command Prompt)
111
- set API_BASE_URL=https://router.huggingface.co/v1
112
- set MODEL_NAME=Qwen/Qwen2.5-72B-Instruct
113
- set HF_TOKEN=hf_YourTokenHere
114
-
115
- # Run validation inference
116
- python inference.py
117
- ```
118
-
119
- ### Local API Server
120
-
121
- ```bash
122
- # Run the FastAPI Web API server locally
123
- python app.py
124
- ```
125
-
126
- ### Docker Setup
127
-
128
- ```bash
129
- cd atc-openenv
130
- docker build -t atc-openenv .
131
- docker run -p 7860:7860 atc-openenv
132
- ```
133
-
134
- ## API Endpoints
135
-
136
- | Endpoint | Method | Description |
137
- |----------|--------|-------------|
138
- | `/health` | GET | Health check |
139
- | `/reset?task_id={1,2,3}` | POST | Reset environment |
140
- | `/step` | POST | Execute actions |
141
- | `/state` | GET | Get full state |
142
-
143
- ## Baseline Scores (from inference.py)
144
-
145
- | Task | Score | Total Reward |
146
- |------|-------|--------------|
147
- | 1 - Clear Skies | 1.000 | 4.35 |
148
- | 2 - Fuel Pressure | 1.000 | 5.35 |
149
- | 3 - Full Emergency | 0.967 | -2.00 |
150
-
151
- ## Example Interaction
152
-
153
- ```python
154
- from env.atc_env import ATCEnv, Action
155
-
156
- # Initialize environment
157
- env = ATCEnv()
158
- obs = env.reset(task_id=1)
159
-
160
- # Observe current state
161
- print(f"Timestep: {obs.timestep}")
162
- print(f"Aircraft: {len(obs.aircraft)}")
163
- print(f"Runways: {len(obs.runways)}")
164
-
165
- # Submit actions (assign aircraft to runways)
166
- actions = [
167
- Action(aircraft_id="AC1", action_type="assign", runway_id="RW01", sequence_position=1),
168
- Action(aircraft_id="AC2", action_type="assign", runway_id="RW02", sequence_position=1),
169
- ]
170
-
171
- # Step simulation
172
- obs, reward, done, info = env.step(actions)
173
- print(f"Reward: {reward.value}")
174
- print(f"Done: {done}")
175
-
176
- # Get final state
177
- state = env.state()
178
- print(f"Score so far: {state.score_so_far}")
179
- ```
180
-
181
- ## Wake Turbulence Separation Rules
182
-
183
- | Lead Type | Trail Type | Separation (nm) |
184
- |-----------|------------|-----------------|
185
- | HEAVY | HEAVY | 4 |
186
- | HEAVY | MEDIUM | 5 |
187
- | HEAVY | LIGHT | 6 |
188
- | MEDIUM | LIGHT | 3 |
189
- | OTHER | OTHER | 2 |
190
-
191
- ## Reward Events
192
-
193
- | Event | Value |
194
- |-------|-------|
195
- | LANDING_SUCCESS | +1.0 |
196
- | DELAY_PER_STEP | -0.05 per waiting aircraft |
197
- | FUEL_CRITICAL_LATE | -2.0 per step after threshold |
198
- | FUEL_EXHAUSTED | -10.0 |
199
- | EMERGENCY_NOT_PRIORITIZED | -10.0 |
200
- | SEPARATION_VIOLATION | -5.0 |
201
- | RUNWAY_CONFLICT | -20.0 |
202
- | HOLDING_PENALTY | -0.1 per step per holding aircraft |
203
-
204
- ## Environment Implementation
205
-
206
- All models use Pydantic v2 for data validation. The environment is fully deterministic given a random seed. Graders are stateless and accept episode_log as input.
 
 
1
  ---
2
+ license: apache-2.0
3
  title: ATC Agentic Inference
4
+ sdk: docker
5
  emoji: ✈️
6
  colorFrom: blue
7
  colorTo: indigo
 
8
  pinned: false
9
  tags:
10
  - openenv
11
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
+ # ATC Agent Hackathon Submission
14
+ This Space runs the inference script for the ATC environment. Production-ready OpenEnv-compliant environment for AI agents to act as ATC sequencing controller.