ホーム / Skills / リサーチ・学習 / cuOpt 最適化の定式化 cuOpt Optimization Formulation
リサーチ・学習

cuOpt 最適化の定式化 cuOpt Optimization Formulation

NVIDIAApache-2.0Skill の言語: 英語
ライセンス確認済みスクリプトなし
デモ実行記録 · claude-sonnet-5-5 · 2026年10月
A bakery operates 2 ovens and plans to bake 300 loaves of bread this week. It may also bake cakes, which earn $12 each and cost $5 in ingredients; bread earns $4 and costs $1.5. Each oven runs at most 40 hours; a loaf takes 0.1 oven-hours and a cake 0.4. Determine the weekly baking plan. Classify each sentence as parameter, constraint, decision or objective, and state the objective. No code.
Skill: cuopt-numerical-optimization-formulation

Sentence classification

Sentence Label Note
"Operates 2 ovens" Parameter Both ovens are available. This is not an oven-selection problem.
"Plans to bake 300 loaves this week" Constraint (implicit) Committed phrasing, so bread = 300 exactly.
"May also bake cakes" Decision The number of cakes is chosen.
"Cakes earn $12, cost $5; bread earns $4, costs $1.50" Parameters Net per unit is $7 per cake and $2.50 per loaf.
"Each oven runs at most 40 hours" Parameter (40) and constraint Oven time used is at most 2 × 40 = 80 hours.
"A loaf takes 0.1 oven-hours, a cake 0.4" Parameters They set the oven-time usage.
"Determine the weekly baking plan" Objective (implicit) Revenue and costs are both given, so maximize total profit.

Formulation

  • Decision: c = number of cakes (≥ 0). Integer in practice, though the LP optimum is already whole.
  • Fixed by commitment: loaves b = 300.
  • Objective: maximize 2.5·b + 7·c, which is profit = revenue − ingredient cost.
  • Constraint: 0.1·b + 0.4·c ≤ 80 oven-hours.
  • Problem type: LP, or a trivial MILP if cakes must be integers.

Solution

  • Bread uses 300 × 0.1 = 30 oven-hours, leaving 50 hours.
  • Each cake nets a positive $7, so the oven time left over goes to cakes: c = 50 / 0.4 = 125 cakes.
  • The plan splits across the two ovens without trouble. For example, oven 1 bakes all 300 loaves and 25 cakes (30 + 10 = 40 h), and oven 2 bakes 100 cakes (40 h).

Plan: 300 loaves and 125 cakes. Profit = 300 × 2.50 + 125 × 7 = $750 + $875 = $1,625. Revenue is $2,700 and ingredient cost is $1,075. Both ovens are fully used at 80 of 80 hours.

Ambiguities

  • "Plans to bake 300 loaves": I read this as exactly 300. If it meant at least 300, the answer changes. Bread earns $25 per oven-hour against $17.50 for cakes, so the plan would become 800 loaves and 0 cakes, with a profit of $2,000. Tell me if that is what you meant.
  • "Earn": I read this as revenue, with cost subtracted. If $12 and $4 were already profits, the plan stays the same (300 loaves and 125 cakes) and the profit would be $2,700.

Concepts-only skill, so the trial gave the model only the Skill and Read tools. The model's arithmetic was checked by hand (300 loaves and 125 cakes, profit 1,625; 800 loaves if the commitment were a minimum). Nothing was compared against a no-skill run.

できること
文章で与えられた問題から、線形計画(LP)、混合整数計画(MILP)、二次計画(QP)のモデルを作る方法をモデルに教えます。扱うのは考え方だけで、ソルバー API もコードもありません。

仕組み

  1. すべての文をパラメータ・制約・意思決定・目的のいずれかに分類し、「〜する予定」「〜を保有する」のような確定した表現と、「〜してもよい」「〜を検討する」のような選択の表現を区別します。
  2. 暗黙の目的を見つけます。コストだけが与えられていて「計画を立てる」なら費用最小化、コストと収入の両方があるなら利益最大化です。
  3. 曖昧な点は黙って一つに決めず、質問するか、考えられる解釈をすべて解いて結果を報告するよう求めます。
  4. よくある定式化パターンと落とし穴を扱います:区分線形の利益と整数の総量、裁断問題の端材、目標計画法、多期間の在庫、共通の混合工程があるブレンド。

向いている場面
オペレーションズ・リサーチの課題や、生産・スケジューリング・ブレンド・ポートフォリオ・資源配分といった実務の計画問題。

制限
定式化までで、解くことはしません。どのソルバーと組み合わせるかはご自身で決めます。同梱の NVIDIA 自身の評価レポート(当サイトの評価ではありません)では、cuOpt の QP 対応はベータとされています。

補足とリスク

低リスク:NVIDIA 公式 Skills リポジトリ(Apache-2.0)の指示ファイルのみで、スクリプトなし、通信なし、ファイル書き込みなし、アカウントやキーも不要です。パッケージには NVIDIA 自身の評価レポートと署名ファイルも含まれますが、そのまま収録しており、署名の検証は行っていません。結果はモデルが生成したものです。実際の意思決定に使う前に、モデルと数値をご自身で確認してください。

SKILL.md 原文パッケージ内 6 ファイル