Skip to content
Merged
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
2 changes: 1 addition & 1 deletion skills/cdopt-optimization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,4 @@ reviewed model, and do not copy official example code verbatim.

## License

Released under the [MIT License](LICENSE).
Released under the [MIT License](../../LICENSE).
2 changes: 1 addition & 1 deletion skills/cdopt-optimization/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,4 @@ python3 skills/cdopt-optimization/scripts/write_constrained_rnn_runner.py \

## 许可证

基于 [MIT License](LICENSE) 发布。
基于 [MIT License](../../LICENSE) 发布。
25 changes: 10 additions & 15 deletions skills/osqp-solver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
Chinese guide: [README.zh-CN.md](README.zh-CN.md)

This AI4Math skill models, solves, updates, and independently checks continuous
convex quadratic programs with the native OSQP Python interface. It is a
release-ready local candidate for
[`VeryMath/AI4Math-Optimization`](https://github.com/VeryMath/AI4Math-Optimization);
it is not an official upstream package until that repository accepts and merges
it.
convex quadratic programs with the native OSQP Python interface. It is included
in [`VeryMath/AI4Math-Optimization`](https://github.com/VeryMath/AI4Math-Optimization)
under the repository's [MIT License](../../LICENSE).

## Scope

Expand Down Expand Up @@ -88,11 +86,10 @@ acceptance conditions.

## Validation

From the AI4Math Skill Library root, with the isolated environment active:
From the `AI4Math-Optimization` repository root, with the isolated environment active:

```bash
python -m unittest discover -s tests -p 'test_osqp_solver_skill.py' -v
python scripts/validate_skill_repo.py
python -m unittest discover -s tests -v
```

Do not treat skipped numerical tests as release evidence. The OSQP-enabled
Expand All @@ -101,15 +98,13 @@ and require `skipped=0`.

## License, citation, and provenance

This package is intended to follow the AI4Math repository's MIT license after
maintainer authorization and upstream acceptance. The separately installed
OSQP project is Apache-2.0 licensed; this package does not vendor or relicense
This package is distributed under the repository's [MIT License](../../LICENSE).
The separately installed OSQP project is Apache-2.0 licensed; this package does
not vendor or relicense
OSQP code. Software licensing and academic citation are separate obligations.
Use [references/citation.md](references/citation.md) for the official OSQP
citation.

The workflow and references were prepared from the official OSQP documentation
linked in [references/python-api.md](references/python-api.md). Before public
release, a human maintainer must confirm publication authorization and record
factual contributor attribution. Packaging by an AI agent is not that
authorization.
linked in [references/python-api.md](references/python-api.md). Repository
attribution is recorded in [CONTRIBUTORS.md](../../CONTRIBUTORS.md).
14 changes: 6 additions & 8 deletions skills/osqp-solver/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
English guide: [README.md](README.md)

这个 AI4Math skill 使用原生 OSQP Python 接口,对连续凸二次规划进行建模、求解、
参数更新和独立复核。它目前是
参数更新和独立复核。该技能包已纳入
[`VeryMath/AI4Math-Optimization`](https://github.com/VeryMath/AI4Math-Optimization)
的发布就绪本地候选;只有目标仓库接受并合并后,才能称为官方上游 package。
仓库,采用仓库的 [MIT License](../../LICENSE)。

## 适用范围

Expand Down Expand Up @@ -78,24 +78,22 @@ python scripts/solve_qp.py references/feasible-example.json \

## 验证

激活隔离环境后,在 AI4Math Skill Library 根目录运行:
激活隔离环境后,在 `AI4Math-Optimization` 仓库根目录运行:

```bash
python -m unittest discover -s tests -p 'test_osqp_solver_skill.py' -v
python scripts/validate_skill_repo.py
python -m unittest discover -s tests -v
```

被跳过的数值测试不能作为发布证据;公开发布前必须在安装 OSQP 的环境中做到该测试集
零跳过,并检查 unittest 汇总中 `skipped=0`。

## 许可证、引用与来源边界

在维护者授权并被上游接受后,本 package 预期沿用 AI4Math 仓库的 MIT license。
本技能包采用仓库的 [MIT License](../../LICENSE)。
单独安装的 OSQP 项目采用 Apache-2.0 license;本 package 不打包、也不重新许可
OSQP 代码。软件许可和学术引用是两项不同义务。官方 OSQP 引用见
[references/citation.md](references/citation.md)。

本工作流和参考材料依据
[references/python-api.md](references/python-api.md) 所列 OSQP 官方文档整理。
公开发布前,人类维护者必须确认发布授权,并如实记录贡献者署名;AI agent 完成打包
不能替代这项授权。
仓库的贡献者署名记录见 [CONTRIBUTORS.md](../../CONTRIBUTORS.md)。
2 changes: 1 addition & 1 deletion skills/second-order-cone-programming/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pip install numpy cvxpy # 必装
pip install clarabel # 推荐开源求解器
```

支持 **10 种求解器**:COPT、Gurobi、MOSEK、CPLEX、CLARABEL、ECOS、SCS、CVXOPT、COSMO、OSQP。无任何求解器时自动从 GitHub 搜索开源代码。
支持 **9 种求解器**:COPT、Gurobi、MOSEK、CPLEX、CLARABEL、ECOS、SCS、CVXOPT、COSMO。OSQP 用于带线性约束的凸 QP;包含一般二阶锥约束时,使用上述 SOCP 后端。无任何求解器时自动从 GitHub 搜索开源代码。

## 输出格式

Expand Down
11 changes: 7 additions & 4 deletions skills/second-order-cone-programming/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: second-order-cone-programming
description: >-
Models and solves second-order cone programs and problems convertible to SOCP
form using cvxpy with multiple solver backends (COPT, Gurobi, MOSEK, CPLEX,
CLARABEL, ECOS, SCS, CVXOPT, COSMO, OSQP). Handles linear objectives with
CLARABEL, ECOS, SCS, CVXOPT, COSMO). Handles linear objectives with
second-order cone constraints, as well as problems reducible to SOCP such as
portfolio optimization, robust optimization, and engineering design. When no
local solver is available, searches GitHub for open-source SOCP solving code.
Expand Down Expand Up @@ -43,7 +43,7 @@ metadata:
2. 目标需要安装或配置时,将后端名称、cvxpy 接口、Python 环境及实际报错交给 `../or-solver/SKILL.md`;该 skill 只配置指定目标
3. 配置后由本任务继续求解;配置失败时,由本任务决定下一步,必要时走 GitHub 搜索路径
- [ ] 路径判断:用户给的是自然语言描述、矩阵/JSON,还是要求从 GitHub 找代码
- [ ] 求解器选择:优先使用可用求解器(COPT > Gurobi > MOSEK > CPLEX > CLARABEL > ECOS > SCS > CVXOPT > COSMO > OSQP),无可用求解器时走 GitHub 搜索路径
- [ ] 求解器选择:优先使用可用求解器(COPT > Gurobi > MOSEK > CPLEX > CLARABEL > ECOS > SCS > CVXOPT > COSMO),无可用求解器时走 GitHub 搜索路径
- [ ] 问题类型:是标准的 SOCP(锥约束),还是可转化为 SOCP 的问题
- [ ] 输出重述(1-2 句)
- [ ] 列变量/目标/约束(符号化)
Expand Down Expand Up @@ -128,7 +128,8 @@ site:github.com second order cone programming solver python <问题特征>
- [未安装] ecos — pip install ecos (1.5s, 安装成功 ✓)
- 安装操作记录:
- pip install ecos → 成功 (version 2.0.14)
- cvxpy 可用求解器列表:['SCS', 'ECOS', 'OSQP']
- cvxpy 已安装的求解器列表:['SCS', 'ECOS', 'OSQP']
- 本次 SOCP 可用后端:['SCS', 'ECOS']
- 选用求解器:SCS (COPT 不可用时的降级选择)

### 问题重述
Expand Down Expand Up @@ -178,7 +179,9 @@ site:github.com second order cone programming solver python <问题特征>

求解器选择由本建模任务负责;选定后需要安装、许可证配置或环境排错时,将指定后端交给 `../or-solver/SKILL.md`。

SOCP 求解器优先级:**COPT > Gurobi > MOSEK > CPLEX > CLARABEL > ECOS > SCS > CVXOPT > COSMO > OSQP > GitHub 搜索**。
SOCP 求解器优先级:**COPT > Gurobi > MOSEK > CPLEX > CLARABEL > ECOS > SCS > CVXOPT > COSMO > GitHub 搜索**。

仅将支持模型全部约束的后端列为本次可用求解器。OSQP 用于带线性约束的凸 QP;包含一般二阶锥约束时,使用上述 SOCP 后端。

cvxpy 作为统一建模接口,可无缝切换后端求解器。开源首选 `CLARABEL`(Apache 2.0,同质嵌入内点法,2024),备选 `ECOS`(GPLv3)。商业首选 COPT。

Expand Down
Loading