用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/MikeTreml/MissionControl --skill linear-programming-solver命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | linear-programming-solver |
| description | Linear programming skill for resource allocation, scheduling, and optimization problems |
| allowed-tools | ["Read","Write","Glob","Grep","Bash"] |
| metadata | {"specialization":"decision-intelligence","domain":"business","category":"optimization","priority":"medium","shared-candidate":true,"tools-libraries":["pulp","ortools","pyomo","cvxpy"]} |
The Linear Programming Solver skill provides comprehensive capabilities for formulating and solving linear optimization problems. It supports resource allocation, production planning, scheduling, and other business optimization challenges through efficient solver integration and solution analysis.
# Define LP problem
lp_problem = {
"name": "Production Planning",
"sense": "maximize", # or "minimize"
"decision_variables": {
"product_A": {"type": "continuous", "lower_bound": 0, "upper_bound": 1000},
"product_B": {"type": "continuous", "lower_bound": 0, "upper_bound": 800},
"product_C": {"type": "integer", "lower_bound": 0} # integer variable
},
"objective": {
"expression": "50*product_A + 40*product_B + 60*product_C",
"description": "Maximize total profit"
},
"constraints": [
{
"name": "labor_hours",
"expression": "2*product_A + 3*product_B + 4*product_C <= 2400",
"description": "Total labor hours available"
},
{
"name": "machine_time",
"expression": "3*product_A + 2*product_B + 3*product_C <= 2000",
"description": "Machine time capacity"
},
{
"name": "raw_material",
"expression": "product_A + product_B + product_C <= 1200",
"description": "Raw material availability"
},
{
"name": "demand_A",
"expression": "product_A >= 100",
"description": "Minimum demand for product A"
}
]
}
# Solver settings
solver_config = {
"solver": "CBC", # or "GLPK", "CPLEX", "GUROBI"
"time_limit": 300, # seconds
"mip_gap": 0.01, # 1% optimality gap for MIP
"threads": 4,
"presolve": True,
"cuts": "automatic"
}
# Request sensitivity information
sensitivity_config = {
"shadow_prices": True,
"reduced_costs": True,
"allowable_ranges": True,
"what_if": [
{"constraint": "labor_hours", "change": 100},
{"objective_coeff": "product_A", "change": 5}
]
}
| Problem Type | Objective | Key Constraints |
|---|---|---|
| Production Planning | Maximize profit | Capacity, demand |
| Transportation | Minimize cost | Supply, demand |
| Assignment | Minimize cost/time | One-to-one matching |
| Blending | Minimize cost | Quality specs, availability |
| Network Flow | Min cost/max flow | Flow balance, capacity |
| Portfolio | Maximize return | Risk, budget, diversification |
{
"problem_definition": {
"name": "string",
"sense": "maximize|minimize",
"decision_variables": "object",
"objective": {
"expression": "string",
"description": "string"
},
"constraints": ["object"]
},
"solver_config": {
"solver": "string",
"time_limit": "number",
"mip_gap": "number"
},
"analysis_options": {
"sensitivity": "boolean"
{
"status": "Optimal|Infeasible|Unbounded|TimeLimit",
"objective_value": "number",
"solution": {
"variable_name": "number"
},
"sensitivity": {
"shadow_prices": {
"constraint_name": {
"value": "number",
"allowable_increase": "number",
"allowable_decrease": "number"
}
},
"reduced_costs": {
"variable_name": {
"value": "number",
"allowable_increase": "number",
"allowable_decrease":
| Metric | Meaning | Use |
|---|---|---|
| Shadow Price | Value of relaxing constraint by 1 unit | Prioritize constraint relief |
| Reduced Cost | Cost of forcing non-basic variable into solution | Evaluate non-optimal alternatives |
| Allowable Range | Range where basis stays optimal | Assess stability of solution |
When model is infeasible: