Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions TASK_DETAILS.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ We welcome new engineering problem ideas — even without complete verification
<td>C++ SHA3-256 throughput (OpenSSL verified)</td>
</tr>
<tr>
<td rowspan="3"><b>CommunicationEngineering</b></td>
<td rowspan="4"><b>CommunicationEngineering</b></td>
<td><code>AdaptiveLinkScheduling</code></td>
<td>Downlink resource-block scheduling with MCS and power control under queue, latency, fairness, and power-budget constraints</td>
</tr>
<tr>
<td><code>LDPCErrorFloor</code></td>
<td>LDPC code error floor estimation via importance sampling on trapping sets</td>
</tr>
Expand Down Expand Up @@ -298,7 +302,11 @@ We welcome new engineering problem ideas — even without complete verification
<td>pyMOTO-based 2D beam topology optimization (SIMP + OC/MMA) under a volume-fraction constraint</td>
</tr>
<tr>
<td rowspan="6"><b>Robotics</b></td>
<td rowspan="7"><b>Robotics</b></td>
<td><code>AGVWarehouseRouting</code></td>
<td>Warehouse AGV pick-sequence optimization with aisle obstacles, congestion, and turn costs</td>
</tr>
<tr>
<td><code>DynamicObstacleAvoidanceNavigation</code></td>
<td>Navigate a differential-drive robot from start to goal in a dynamic environment</td>
</tr>
Expand Down Expand Up @@ -337,10 +345,14 @@ We welcome new engineering problem ideas — even without complete verification
<td>Importance-sampling BER estimator for Hamming(127,120)</td>
</tr>
<tr>
<td><b>PowerSystems</b></td>
<td rowspan="2"><b>PowerSystems</b></td>
<td><code>EV2GymSmartCharging</code></td>
<td>Upstream-aligned EV smart charging scheduling</td>
</tr>
<tr>
<td><code>MicrogridBatteryDispatch</code></td>
<td>Commercial microgrid battery dispatch under solar forecasts, tariffs, demand charges, and degradation cost</td>
</tr>
<tr>
<td><b>AdditiveManufacturing</b></td>
<td><code>DiffSimThermalControl</code></td>
Expand Down
18 changes: 15 additions & 3 deletions TASK_DETAILS_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ Frontier-Eng 目前已覆盖以下领域的任务。每个任务均配有可运
<td>C++ SHA3-256 吞吐量(OpenSSL 验证)</td>
</tr>
<tr>
<td rowspan="3"><b>CommunicationEngineering</b></td>
<td rowspan="4"><b>CommunicationEngineering</b></td>
<td><code>AdaptiveLinkScheduling</code></td>
<td>在队列、时延、公平性与功率预算约束下进行下行资源块调度、MCS 与功率控制</td>
</tr>
<tr>
<td><code>LDPCErrorFloor</code></td>
<td>使用 importance sampling 针对 trapping sets 估计 LDPC 码 error floor</td>
</tr>
Expand Down Expand Up @@ -298,7 +302,11 @@ Frontier-Eng 目前已覆盖以下领域的任务。每个任务均配有可运
<td>基于 pyMOTO 的 2D 梁拓扑优化(SIMP + OC/MMA),体积分数约束</td>
</tr>
<tr>
<td rowspan="6"><b>Robotics</b></td>
<td rowspan="7"><b>Robotics</b></td>
<td><code>AGVWarehouseRouting</code></td>
<td>考虑巷道障碍、拥堵与转向成本的仓储 AGV 拣货顺序优化</td>
</tr>
<tr>
<td><code>DynamicObstacleAvoidanceNavigation</code></td>
<td>在动态环境中控制差分轮机器人从起点到终点</td>
</tr>
Expand Down Expand Up @@ -337,10 +345,14 @@ Frontier-Eng 目前已覆盖以下领域的任务。每个任务均配有可运
<td>使用 importance sampling 估计 Hamming(127,120) 的 BER</td>
</tr>
<tr>
<td><b>PowerSystems</b></td>
<td rowspan="2"><b>PowerSystems</b></td>
<td><code>EV2GymSmartCharging</code></td>
<td>上游对齐的电动车智能充电调度</td>
</tr>
<tr>
<td><code>MicrogridBatteryDispatch</code></td>
<td>在太阳能预测、分时电价、需量电费与退化成本下优化商业微电网电池调度</td>
</tr>
<tr>
<td><b>AdditiveManufacturing</b></td>
<td><code>DiffSimThermalControl</code></td>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# AdaptiveLinkScheduling

Optimize per-resource-block user scheduling, modulation/coding selection, and
transmit power for a small wireless downlink under queue, channel, latency, and
power-budget constraints.

## Files

- `Task.md`: task contract and scoring details.
- `scripts/init.py`: editable seed scheduler.
- `verification/evaluator.py`: deterministic link simulator and scorer.
- `verification/requirements.txt`: evaluator dependencies.
- `frontier_eval/`: unified-task metadata.

## Candidate Interface

Edit `scripts/init.py` only. The evaluator imports:

```python
schedule_frame(frame: dict) -> list[dict]
```

Return one decision per resource block. Each decision should contain:

```python
{"user": <int>, "mcs": <int>, "power_dbm": <float>}
```

## Quick Run

From this directory:

```bash
python verification/evaluator.py scripts/init.py
```

From the repository root:

```bash
python -m frontier_eval \
task=unified \
task.benchmark=CommunicationEngineering/AdaptiveLinkScheduling \
algorithm=openevolve \
algorithm.iterations=0
```

No GPU, Docker, API key, or external assets are required.
57 changes: 57 additions & 0 deletions benchmarks/CommunicationEngineering/AdaptiveLinkScheduling/Task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Adaptive Link Scheduling

## Background

Wireless base stations continually decide which users receive resource blocks,
what modulation and coding scheme (MCS) to use, and how much power to transmit.
Good schedulers exploit favorable channel states while protecting users with
urgent queues and respecting power budgets. These decisions directly affect
throughput, latency, energy use, and fairness.

## Objective

For each fixed frame snapshot, produce one scheduling decision per resource
block. The verifier simulates packet delivery using deterministic SNR thresholds
and scores weighted throughput minus outage, power, budget, and fairness costs.

## Candidate API

The evaluator imports `schedule_frame(frame)` from `scripts/init.py`.

`frame` contains:

- `frame_id`
- `num_resource_blocks`
- `mcs_table`: list of `{mcs, snr_threshold_db, bits_per_rb}`
- `power_min_dbm`, `power_max_dbm`, `power_budget_mw`
- `users`: each user has `id`, `queue_bits`, `latency_weight`,
`min_service_bits`, and `snr_estimate_db` per resource block

Return a list with `num_resource_blocks` entries. Each entry should be a mapping
with `user`, `mcs`, and `power_dbm`.

## Constraints

- Do not import external packages.
- Do not read or write files.
- Keep the public `schedule_frame(frame)` interface.
- Keep all editable logic inside the EVOLVE block.
- The scheduler must be deterministic for the same input frame.

## Scoring

For each resource block, the evaluator computes:

```text
effective_snr = snr_estimate_db + (power_dbm - 20)
```

The selected MCS succeeds if `effective_snr` reaches the MCS threshold plus a
small implementation margin. Successful transmissions deliver `bits_per_rb`
subject to the selected user's remaining queue. Failed transmissions consume
power and incur outage penalty.

The frame utility combines latency-weighted delivered bits, minimum-service
satisfaction, Jain fairness, power cost, and budget violations.

`combined_score = mean(frame_utility across frames)`, so higher is better.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
README.md
Task.md
scripts/init.py
verification/evaluator.py
frontier_eval/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
metrics.json
artifacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scripts/init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
AdaptiveLinkScheduling constraints:
1) Modify only scripts/init.py.
2) Keep schedule_frame(frame) as the public entrypoint.
3) Return one decision per resource block with user, mcs, and power_dbm fields.
4) Do not use external packages, file I/O, network access, or randomness.
5) Keep EVOLVE-BLOCK markers intact and place editable scheduler logic inside them.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{python} verification/evaluator.py {candidate} --metrics-out metrics.json --artifacts-out artifacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scripts/init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
README.md
Task.md
verification/evaluator.py
verification/requirements.txt
frontier_eval/
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
from __future__ import annotations

from typing import Any


def _choose_mcs(snr_db: float, mcs_table: list[dict[str, Any]], margin_db: float = 2.0) -> int:
selected = int(mcs_table[0]["mcs"])
for item in mcs_table:
if snr_db >= float(item["snr_threshold_db"]) + margin_db:
selected = int(item["mcs"])
return selected


def schedule_frame(frame: dict[str, Any]) -> list[dict[str, float | int]]:
"""Return one scheduling decision per resource block."""

# EVOLVE-BLOCK-START
users = frame["users"]
mcs_table = frame["mcs_table"]
num_rbs = int(frame["num_resource_blocks"])
power_min = float(frame["power_min_dbm"])
power_max = float(frame["power_max_dbm"])
nominal_power = min(power_max, max(power_min, 20.0))

remaining = {int(user["id"]): float(user["queue_bits"]) for user in users}
served = {int(user["id"]): 0.0 for user in users}
decisions: list[dict[str, float | int]] = []

for rb in range(num_rbs):
best_user = None
best_score = None
for user in users:
user_id = int(user["id"])
if remaining[user_id] <= 0:
continue
snr = float(user["snr_estimate_db"][rb])
latency = float(user["latency_weight"])
deficit = max(0.0, float(user["min_service_bits"]) - served[user_id])
score = snr + 3.0 * latency + 0.002 * deficit + 0.0005 * remaining[user_id]
if best_score is None or score > best_score:
best_score = score
best_user = user

if best_user is None:
decisions.append({"user": int(users[0]["id"]), "mcs": 0, "power_dbm": power_min})
continue

user_id = int(best_user["id"])
snr_at_power = float(best_user["snr_estimate_db"][rb]) + (nominal_power - 20.0)
mcs = _choose_mcs(snr_at_power, mcs_table, margin_db=2.0)
bits = 0.0
for item in mcs_table:
if int(item["mcs"]) == int(mcs):
bits = float(item["bits_per_rb"])
break
delivered_estimate = min(bits, remaining[user_id])
remaining[user_id] -= delivered_estimate
served[user_id] += delivered_estimate
decisions.append({"user": user_id, "mcs": int(mcs), "power_dbm": nominal_power})

return decisions
# EVOLVE-BLOCK-END


if __name__ == "__main__":
demo = {
"num_resource_blocks": 2,
"power_min_dbm": 5.0,
"power_max_dbm": 24.0,
"mcs_table": [
{"mcs": 0, "snr_threshold_db": -3.0, "bits_per_rb": 180},
{"mcs": 1, "snr_threshold_db": 1.0, "bits_per_rb": 300},
],
"users": [
{"id": 0, "queue_bits": 1000, "latency_weight": 1.0, "min_service_bits": 200, "snr_estimate_db": [2.0, 1.0]},
{"id": 1, "queue_bits": 800, "latency_weight": 1.4, "min_service_bits": 200, "snr_estimate_db": [0.0, 4.0]},
],
}
print(schedule_frame(demo))
Loading
Loading