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
6 changes: 5 additions & 1 deletion TASK_DETAILS.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ We welcome new engineering problem ideas — even without complete verification
<td>JSSP YN family (Yamada and Nakano 1992)</td>
</tr>
<tr>
<td rowspan="4"><b>StructuralOptimization</b></td>
<td rowspan="5"><b>StructuralOptimization</b></td>
<td><code>ISCSO2015</code></td>
<td>Minimize weight of 45-bar 2D truss under stress / displacement constraints</td>
</tr>
Expand All @@ -302,6 +302,10 @@ We welcome new engineering problem ideas — even without complete verification
<td><code>PyMOTOSIMPCompliance</code></td>
<td>pyMOTO-based 2D beam topology optimization (SIMP + OC/MMA) under a volume-fraction constraint</td>
</tr>
<tr>
<td><code>CompositeLaminateStacking</code></td>
<td>Optimize balanced, symmetric 48-ply composite laminates for buckling and maximum-strain failure across ten plate cases</td>
</tr>
<tr>
<td rowspan="6"><b>Robotics</b></td>
<td><code>DynamicObstacleAvoidanceNavigation</code></td>
Expand Down
6 changes: 5 additions & 1 deletion TASK_DETAILS_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Frontier-Eng 目前已覆盖以下领域的任务。每个任务均配有可运
<td>JSSP YN 家族(Yamada &amp; Nakano 1992)</td>
</tr>
<tr>
<td rowspan="4"><b>StructuralOptimization</b></td>
<td rowspan="5"><b>StructuralOptimization</b></td>
<td><code>ISCSO2015</code></td>
<td>在应力 / 位移约束下最小化 45 杆 2D 桁架重量</td>
</tr>
Expand All @@ -302,6 +302,10 @@ Frontier-Eng 目前已覆盖以下领域的任务。每个任务均配有可运
<td><code>PyMOTOSIMPCompliance</code></td>
<td>基于 pyMOTO 的 2D 梁拓扑优化(SIMP + OC/MMA),体积分数约束</td>
</tr>
<tr>
<td><code>CompositeLaminateStacking</code></td>
<td>在十个板工况下优化平衡、对称的 48 层复合材料铺层,同时提高屈曲和最大应变失效性能</td>
</tr>
<tr>
<td rowspan="6"><b>Robotics</b></td>
<td><code>DynamicObstacleAvoidanceNavigation</code></td>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# CompositeLaminateStacking

Optimize balanced, symmetric 48-ply composite laminates across ten simply supported
plate cases derived from an MIT-licensed published benchmark.

## What the agent edits

Only [`scripts/init.py`](scripts/init.py) is editable. Implement:

```python
def design_laminates(cases: list[dict]) -> dict[str, list[int]]:
...
```

Return one list of 12 integer base angles in `[0, 90]` for every `case_id`. The evaluator
expands the list into a balanced, symmetric 48-ply stack. See [`Task.md`](Task.md) for the
complete contract and [`references/design_notes.md`](references/design_notes.md) for the
mechanics and source cross-check.

## Requirements

- Python 3.10+
- NumPy
- no GPU, Docker, external data, or proprietary solver

Install task-local requirements if needed:

```bash
python -m pip install -r verification/requirements.txt
```

## Direct evaluation

From this task directory:

```bash
python verification/evaluator.py scripts/init.py
python -m unittest discover -s verification -p "test_*.py" -v
```

## Unified evaluation

From the repository root:

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

The baseline is feasible in all ten cases and scores 50. Higher is better.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# CompositeLaminateStacking

在十个简支板工况上优化平衡、对称的 48 层复合材料铺层。任务参数来自一个采用
MIT 许可证发布的真实研究 benchmark。

## Agent 修改内容

仅允许修改 [`scripts/init.py`](scripts/init.py),并实现:

```python
def design_laminates(cases: list[dict]) -> dict[str, list[int]]:
...
```

必须为每个 `case_id` 返回一个包含 12 个 `[0, 90]` 区间整数角度的列表。评测器会
把它展开为平衡、对称的 48 层铺层。完整接口见 [`Task_zh-CN.md`](Task_zh-CN.md),
力学模型与来源交叉验证见 [`references/design_notes.md`](references/design_notes.md)。

## 环境要求

- Python 3.10+
- NumPy
- 不需要 GPU、Docker、外部数据或商业求解器

如有需要,可安装任务依赖:

```bash
python -m pip install -r verification/requirements.txt
```

## 直接评测

在当前任务目录运行:

```bash
python verification/evaluator.py scripts/init.py
python -m unittest discover -s verification -p "test_*.py" -v
```

## Unified 评测

在仓库根目录运行:

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

baseline 在全部十个工况中均可行,得分为 50;分数越高越好。
127 changes: 127 additions & 0 deletions benchmarks/StructuralOptimization/CompositeLaminateStacking/Task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Task: Composite Laminate Stacking Optimization

## 1. Engineering problem

Design the stacking sequence of a 48-ply orthotropic composite plate. A good laminate
must resist both material failure and plate buckling under several geometries and load
ratios. This is a discrete, coupled structural-design problem: moving stiff plies toward
the surfaces can help buckling, while changing fiber directions alters in-plane strength
and can hurt another load case.

The task is derived from the MIT-licensed Zenodo release *Beyond Double-Double Theory:
n-Directional Stacking Sequence Optimisation in Composite Laminates*
([doi:10.5281/zenodo.15864525](https://doi.org/10.5281/zenodo.15864525)). It preserves
the released 48-ply construction, orthotropic material, ply thickness, five aspect ratios,
uniaxial/biaxial compression, strain allowables, and Haftka reference layup. The evaluator
is an independent NumPy implementation documented in `references/design_notes.md`.

## 2. Candidate API

Implement in `scripts/init.py`:

```python
def design_laminates(cases: list[dict]) -> dict[str, list[int]]:
...
```

The function receives all public cases in one call. Each case contains only:

```python
{
"case_id": str,
"aspect_ratio": float,
"a_mm": float,
"b_mm": float,
"Nx_N_per_mm": float,
"Ny_N_per_mm": float,
}
```

Compression is negative. `Ny_N_per_mm == 0` denotes uniaxial loading; a negative value
denotes biaxial compression.

Return a dictionary with exactly the supplied `case_id` values. Each value must be a JSON
list containing exactly 12 finite integer angles in the inclusive interval `[0, 90]`.

## 3. Layup construction

For candidate angles `theta_1 ... theta_12`, the verifier constructs the first half as:

```text
[theta_1, -theta_1, theta_2, -theta_2, ..., theta_12, -theta_12]
```

and appends its reverse. The result has 48 plies and is balanced and symmetric by
construction. The candidate therefore optimizes both angle selection and through-thickness
ordering without needing to implement manufacturing-constraint repair.

## 4. Evaluation cases

Ten deterministic cases combine aspect ratios `0.5, 1, 2, 3, 4` with:

- uniaxial compression: `Nx = -0.175126835 N/mm`, `Ny = 0`;
- biaxial compression: `Nx = -0.175126835 N/mm`, `Ny = -0.087563418 N/mm`.

The plate widths are fixed at `127 mm`; lengths vary with aspect ratio. Material and
allowable values are committed in `references/config.json`.

## 5. Physics

The verifier applies classical lamination theory to compute `A`, `B`, and `D`. It then
computes:

1. a maximum-strain failure load factor from the most critical longitudinal, transverse,
or shear ply strain under the released 1.5 design-load factor;
2. a simply supported plate buckling load factor from a double-sine Ritz basis, numerical
quadrature, and a symmetric generalized eigenproblem.

The governing reserve factor is:

```text
reserve = min(failure_load_factor, buckling_load_factor)
```

## 6. Score

Each case is normalized against the released Haftka reference stacking sequence:

```text
case_score = clip(50 + 50*tanh(log(reserve/anchor_reserve)/0.5), 0, 100)
```

The final diagnostic score is:

```text
0.75 * mean(case_scores) + 0.25 * percentile(case_scores, 20)
```

A valid candidate receives that value as `combined_score`. Missing cases, extra case ids,
bad types, non-integer/out-of-range angles, timeouts, import failures, or invalid mechanics
make the candidate invalid and set `combined_score` to zero. Per-case diagnostic feedback
remains available.

## 7. Runtime and integrity contract

- Keep `design_laminates` deterministic and self-contained.
- Candidate import and execution occur in a separate Python process with a bounded runtime.
- The process receives cases and returns designs through a JSON-lines protocol.
- Candidate stdout is discarded so it cannot corrupt the evaluator protocol.
- This is process isolation, not an operating-system security sandbox.
- Do not read or modify evaluator, reference, output, or environment-secret files.
- Edit only the region between the `EVOLVE-BLOCK` markers in `scripts/init.py`.

## 8. Commands

Direct evaluation, from this directory:

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

Unified evaluation, from the repository root:

```bash
python -m frontier_eval task=unified \
task.benchmark=StructuralOptimization/CompositeLaminateStacking \
algorithm=openevolve algorithm.iterations=0
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# 任务:复合材料层合板铺层优化

## 1. 工程问题

设计一个 48 层正交各向异性复合材料板的铺层顺序。铺层需要在多种几何尺寸和载荷
比例下同时抵抗材料失效和板屈曲。这是一个耦合的离散结构设计问题:把高刚度方向
的铺层放到外侧可能提高屈曲性能,但改变纤维方向也会改变面内强度,并可能损害另一
载荷工况。

本任务源自采用 MIT 许可证发布的 Zenodo 数据集 *Beyond Double-Double Theory:
n-Directional Stacking Sequence Optimisation in Composite Laminates*
([doi:10.5281/zenodo.15864525](https://doi.org/10.5281/zenodo.15864525))。任务保留了
原发布代码中的 48 层构造、正交各向异性材料、单层厚度、五种长宽比、单轴/双轴压缩、
应变许用值和 Haftka 参考铺层。评测器采用独立的 NumPy 实现,详见
`references/design_notes.md`。

## 2. 候选程序接口

在 `scripts/init.py` 中实现:

```python
def design_laminates(cases: list[dict]) -> dict[str, list[int]]:
...
```

函数一次收到所有公开工况。每个工况仅包含 `case_id`、长宽比、板长宽和 `Nx/Ny`
膜内载荷。负值表示压缩;`Ny_N_per_mm == 0` 表示单轴载荷。

返回字典必须恰好包含输入给出的全部 `case_id`。每个值必须是可 JSON 序列化的列表,
包含恰好 12 个 `[0, 90]` 闭区间内的有限整数角度。

## 3. 铺层构造

对于候选角度 `theta_1 ... theta_12`,评测器先构造:

```text
[theta_1, -theta_1, theta_2, -theta_2, ..., theta_12, -theta_12]
```

再追加其逆序,得到平衡、对称的 48 层铺层。候选程序需要优化角度选择和厚度方向顺序,
但不需要自行修复制造约束。

## 4. 评测工况与物理模型

十个确定性工况由长宽比 `0.5, 1, 2, 3, 4` 与单轴、双轴压缩组合而成。板宽固定为
`127 mm`,长度随长宽比变化。材料、载荷和许用值记录在 `references/config.json`。

评测器使用经典层合板理论计算 `A`、`B`、`D`,然后求得:

1. 由最危险的纵向、横向或剪切层内应变确定的最大应变失效载荷因子;
2. 通过双正弦 Ritz 基、数值积分和对称广义特征值问题得到的简支板屈曲载荷因子。

控制储备因子为:

```text
reserve = min(failure_load_factor, buckling_load_factor)
```

## 5. 评分

每个工况相对于已发布的 Haftka 参考铺层归一化:

```text
case_score = clip(50 + 50*tanh(log(reserve/anchor_reserve)/0.5), 0, 100)
```

最终诊断分数为 `75%` 平均工况分加 `25%` 的第 20 百分位工况分。缺少工况、多余 ID、
错误类型、非整数或越界角度、超时、导入失败或非法力学结果都会令 `combined_score=0`;
逐工况诊断反馈仍会保留。

## 6. 运行与完整性约束

- `design_laminates` 必须确定性、可独立运行。
- 候选程序在受时间限制的独立 Python 进程中导入和执行。
- 工况和设计通过 JSON-lines 协议交换;候选 stdout 会被丢弃。
- 这是进程隔离,并非操作系统安全沙箱。
- 不得读取或修改 evaluator、参考参数、输出或环境机密文件。
- 仅修改 `scripts/init.py` 内 `EVOLVE-BLOCK` 标记之间的区域。

## 7. 运行命令

```bash
python verification/evaluator.py scripts/init.py
python -m frontier_eval task=unified \
task.benchmark=StructuralOptimization/CompositeLaminateStacking \
algorithm=openevolve algorithm.iterations=0
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
CompositeLaminateStacking baseline verification
================================================

Reference dataset:
Dataset for Beyond Double-Double Theory: n-Directional Stacking Sequence
Optimisation in Composite Laminates
DOI: 10.5281/zenodo.15864525
License: MIT

Verification date: 2026-08-13

Direct evaluator:
python verification/evaluator.py scripts/init.py
feasible_cases: 10 / 10
diagnostic_score: 50.0
combined_score: 50.0

Unit tests:
python -m unittest discover -s verification -p "test_*.py" -v
result: 13 tests passed

Unified evaluator:
python -m frontier_eval task=unified \
task.benchmark=StructuralOptimization/CompositeLaminateStacking \
algorithm=openevolve algorithm.iterations=0
benchmark_returncode: 0
valid: 1
feasible_cases: 10
combined_score: 50.0

The unified run was also exercised on Windows with platform-specific shell and
Python-path overrides; the benchmark output and score matched the direct run.
Loading
Loading