Python、C、またはCLIを通じて、GPU加速ソルバーを使用した線形、混合整数、および二次計画問題のモデリングと解決が可能です。
- GitHubスター
- 3,934
- ファイル
- 52
- 最終コミット
- 2026年11月11日
- ライセンス
- Apache-2.0
- 許可されたツール
- —
cuopt-numerical-optimization-api skillは何をしますか
cuopt-numerical-optimization-apiはAgent Skillsです。 Python、C、またはCLIを通じて、GPU加速ソルバーを使用した線形、混合整数、および二次計画問題のモデリングと解決が可能です。.
skillのSKILL.mdから生成された要約。
cuopt-numerical-optimization-api skill について
このSKILLは、GPU加速を利用して線形、混合整数、および二次計画問題を解決することを、開発者や研究者に提供します。Python、C/C++、またはコマンドラインインターフェースを通じて、NVIDIA cuOptソルバーへのアクセスを可能にします。リソースフローの決定や、離散的なYes/Noの意思決定など、複雑な数学的最適化のモデリングが必要な場合に、エージェントはこのツールをロードする必要があります。
直接的なAPI呼び出しに加えて、このSKILLはAMPL、GAMS、PuLP、JuMP、Pyomo、CVXPYを含む確立されたモデリング言語のバックエンドとして機能します。これにより、ユーザーは最小限のコード変更でGPU加速ソルバーに切り替えることができます。このツールは、線形問題の連続変数や、離散的なカウントまたはバイナリ選択のための整数変数を扱います。また、分散や二乗誤差を最小化するための二次計画もベータ版としてサポートしていますが、目的関数が最小化タスクであること、および行列が半正定値であることが条件となります。
エージェントができること
- 1連続的なリソース配分の解決線形計画法を使用して、リットルやドルなどの分数的な量の最適な分配を決定します。
- 2離散的なエンティティ数の管理混合整数計画法を使用して、特定のタスクに必要なトラックや作業員の数を算出します。
- 3ポートフォリオの分散の最小化二次計画法を実行して、データセット内の二乗誤差または分散を最小化します。
- 4既存モデルとの統合PyomoまたはCVXPYですでに記述されているモデルのソルバーバックエンドとしてcuOptを使用します。
skill の SKILL.md から作成されています。すべてのユースケースは、その引用と照合されています。
cuopt-numerical-optimization-api skillのインストール方法
各コマンドはskillフォルダをクライアントのskillsディレクトリにコピーします。読み込むには、クライアントを再起動するか新しいセッションを開始してください。Claude Codeにcuopt-numerical-optimization-api skillをインストールする
~/.claude/skills/cuopt-numerical-optimization-api/SKILL.md
$ npx degit NVIDIA/skills/skills/cuopt-numerical-optimization-api ~/.claude/skills/cuopt-numerical-optimization-apiClaude Code (project)にcuopt-numerical-optimization-api skillをインストールする
.claude/skills/cuopt-numerical-optimization-api/SKILL.md
$ npx degit NVIDIA/skills/skills/cuopt-numerical-optimization-api .claude/skills/cuopt-numerical-optimization-apiCodexにcuopt-numerical-optimization-api skillをインストールする
~/.agents/skills/cuopt-numerical-optimization-api/SKILL.md
$ npx degit NVIDIA/skills/skills/cuopt-numerical-optimization-api ~/.agents/skills/cuopt-numerical-optimization-apiGemini CLIにcuopt-numerical-optimization-api skillをインストールする
~/.gemini/skills/cuopt-numerical-optimization-api/SKILL.md
$ npx degit NVIDIA/skills/skills/cuopt-numerical-optimization-api ~/.gemini/skills/cuopt-numerical-optimization-apiClaude.aiにcuopt-numerical-optimization-api skillをインストールする
npx degit NVIDIA/skills/skills/cuopt-numerical-optimization-api cuopt-numerical-optimization-api && zip -r cuopt-numerical-optimization-api.zip cuopt-numerical-optimization-api # claude.ai → Customize → Skills → + → Create skill → Upload a skill → cuopt-numerical-optimization-api.zip
自動チェック
実行日 2026年11月15日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。エージェントに実行させる前にスクリプトを読んでください。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能nvidia/skills/skills/cuopt-numerical-optimization-api is public and reachablegithub.com/nvidia/skills/tree/HEAD/skills/cuopt-numerical-op ↗合格
- オープンソースライセンス (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit 2026-11-11github.com/nvidia/skills/commits ↗合格
- スクリプトにダウンロード実行や認証情報の窃取がない5 of 10 scripts read; none of them downloads and runs code, the rest were not read検出事項
- SKILL.md に隠れた指示がないNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/nvidia/skills/blob/HEAD/skills/cuopt-numerical-op ↗合格
- 事前許可ツールが限定されているNo pre-approved tools; the agent asks before using onegithub.com/nvidia/skills/blob/HEAD/skills/cuopt-numerical-op ↗合格
- SKILL.md が Agent Skills の形式に従っているValid name and description; says when to use it; 104 linesgithub.com/nvidia/skills/blob/HEAD/skills/cuopt-numerical-op ↗合格
SKILL.md
GitHubで表示cuOpt Numerical Optimization API
Model and solve LP, MILP, and QP problems using NVIDIA cuOpt's GPU-accelerated solver.
Interface Selection
Choose the reference for the user's interface:
| Interface | When to use | Reference |
|---|---|---|
| Python | User is writing Python code | references/python_api.md |
| C / C++ | User is embedding in a C/C++ application | references/c_api.md |
| CLI | User is solving from MPS files on the command line | references/cli_api.md |
If the interface is not yet clear, ask before writing any code.
Already using a modeling language? cuOpt also works as a solver backend for third-party modeling tools — AMPL, GAMS / GAMSPy, PuLP, JuMP, Pyomo, and CVXPY — with near-zero code changes (point the model's solver at cuOpt). CVXPY additionally covers convex QP and, in beta, QCQP / SOCP. Prefer this when the user already has a model in one of these tools rather than porting it to the cuOpt API. See Third-Party Modeling Languages.
Choosing LP vs MILP vs QP
Decide from the objective and variables:
| If the objective is... | And variables are... | Use |
|---|---|---|
Linear (sum of c_i * x_i) |
All continuous | LP |
| Linear | Some integer or binary | MILP |
Has squared (x*x) or cross (x*y) terms |
Continuous (integer QP not supported) | QP (beta) |
Prefer LP when the problem allows it. LP solves faster and has stronger optimality guarantees. Use MILP only when the problem logically requires whole numbers or yes/no decisions. Use QP only when the objective is genuinely quadratic (variance, squared error, kinetic energy).
- Use LP when every quantity can meaningfully be fractional: flows, proportions, rates, dollars, hours, tonnes of material, etc.
- Use MILP when the problem mentions counts of discrete entities, yes/no choices, or either/or decisions (e.g. open a facility or not, assign a person to a shift, number of trucks).
- Use QP when the objective minimizes variance, squared error, or any expression with
x*xorx*yterms (portfolio optimization, least squares, regularized regression).
Integer vs Continuous from Wording
| Problem wording / concept | Variable type | Examples |
|---|---|---|
| Discrete entities (counts) | INTEGER | Workers, cars, trucks, machines, pilots, facilities, units to manufacture |
| Yes/no or on/off | INTEGER (binary, lb=0 ub=1) | Open a facility, run a machine, assign a person to a shift |
| Amounts that can be fractional | CONTINUOUS | Tonnes, litres, dollars, hours, kWh, proportion of capacity |
| Rates or fractions | CONTINUOUS | Utilization, percentage, share of budget |
Rule of thumb: "How many things" → INTEGER. "How much" → CONTINUOUS.
QP Rules (all interfaces)
- MINIMIZE only — the solver rejects MAXIMIZE for quadratic objectives. To maximize
f(x), minimize-f(x)and negate the reported objective value. - Continuous variables only — integer QP is not supported.
- Q should be positive semi-definite for a convex, well-posed problem.
- Beta — API may evolve; treat as production-capable for typical convex QP.
Dual Values
Duals and reduced costs are available for LP and QP only:
- MILP — no duals (integer optima are not continuous).
- Quadratic constraints — duals unavailable even for LP/QP; all values return
NaN. - PDLP warmstart — LP only; MILP solves do not accept a PDLP warmstart.
Common Issues (all interfaces)
| Problem | Likely cause | Fix |
|---|---|---|
| Infeasible | Conflicting constraints | Check constraint logic and bounds |
| Unbounded | Missing bounds | Add variable bounds |
| Slow solve | Large problem | Set time limit; increase gap tolerance |
| QP rejected with MAXIMIZE | QP only supports MINIMIZE | Negate the objective; negate the result |
| QP returns non-optimal | Q not PSD or badly scaled | Check Q is PSD; rescale variables |
Solver Settings (concepts)
| Setting | Purpose |
|---|---|
time_limit |
Stop after N seconds |
mip_relative_gap |
Stop MILP when within X% of optimal |
mip_absolute_tolerance |
Absolute MIP gap stop |
log_to_console |
Enable solver logging |
Syntax varies by interface — see the interface reference file.
このスキルのファイル
52cuopt-numerical-optimization-api skillに関する質問
Claude Codeにcuopt-numerical-optimization-api skillをインストールするには
npx degit NVIDIA/skills/skills/cuopt-numerical-optimization-api ~/.claude/skills/cuopt-numerical-optimization-apiを実行してください。Claude Codeは~/.claude/skills(すべてのプロジェクト)または.claude/skills(単一プロジェクト)からskillsを読み込み、説明がタスクに一致する場合にskillを使用します。
cuopt-numerical-optimization-api skillはどのクライアントで使用できますか
Agent Skills形式を読み込むすべてのクライアントで使用できます: Claude Code、Codex、Gemini CLI、claude.ai(ZIPとしてアップロード)。skill内のスクリプトは、クライアントがコード実行を許可した場合にのみ実行されます。
PyomoやPuLPなどの既存のモデリング言語でcuOptを使用できますか?
はい、cuOptはAMPL、GAMS、PuLP、JuMP、Pyomo、CVXPYを含むサードパーティ製ツールのソルバーバックエンドとして機能します。