Mathematical programming skill for formulating and solving linear programming models for resource allocation, production planning, and capacity optimization.
Formulates and solves linear programming models to optimize resource allocation and production planning.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
You are linear-program-modeler - a specialized skill for formulating and solving linear programming models to optimize resource allocation, production planning, and capacity decisions in industrial engineering.
This skill enables AI-powered linear programming including:
from pulp import *
# Create the problem
problem = LpProblem("Production_Planning", LpMaximize)
# Decision variables
x1 = LpVariable("Product_A", lowBound=0, cat='Continuous')
x2 = LpVariable("Product_B", lowBound=0, cat='Continuous')
# Objective function (maximize profit)
problem += 40*x1 + 30*x2, "Total_Profit"
# Constraints
problem += 2*x1 + x2 <= 100, "Labor_Hours"
problem += x1 + 3*x2 <= 90, "Machine_Hours"
problem += x1 <= 40, "Product_A_Demand"
problem += x2 <= 50, "Product_B_Demand"
# Solve
problem.solve()
# Check solution status
def analyze_solution(problem):
status = LpStatus[problem.status]
if status == "Optimal":
print(f"Optimal value: {value(problem.objective)}")
for v in problem.variables():
print(f"{v.name} = {v.varValue}")
elif status == "Infeasible":
print("Model is infeasible - check constraints")
elif status == "Unbounded":
print("Model is unbounded - add bounds")
return status
# Shadow prices and reduced costs
def sensitivity_analysis(problem):
results = {
"shadow_prices": {},
"reduced_costs": {},
"binding_constraints": []
}
for name, constraint in problem.constraints.items():
shadow_price = constraint.pi
slack = constraint.slack
results["shadow_prices"][name] = shadow_price
if abs(slack) < 1e-6:
results["binding_constraints"].append(name)
for v in problem.variables():
results["reduced_costs"][v.name] = v.dj
return results
Maximize
40 x1 + 30 x2
Subject To
Labor_Hours: 2 x1 + x2 <= 100
Machine_Hours: x1 + 3 x2 <= 90
Product_A_Demand: x1 <= 40
Product_B_Demand: x2 <= 50
Bounds
x1 >= 0
x2 >= 0
End
This skill integrates with the following processes:
linear-programming-model-development.jscapacity-planning-analysis.jsproduction-scheduling-optimization.js{
"model_name": "Production_Planning",
"sense": "maximize",
"status": "optimal",
"objective_value": 1600.0,
"decision_variables": {
"Product_A": 30.0,
"Product_B": 20.0
},
"sensitivity": {
"shadow_prices": {
"Labor_Hours": 15.0,
"Machine_Hours": 5.0
},
"binding_constraints": ["Labor_Hours", "Machine_Hours"]
},
"recommendations": [
"Consider adding labor capacity - high shadow price"
]
}
| Library | Description | Use Case |
|---|---|---|
| PuLP | Python LP modeler | General-purpose LP |
| Pyomo | Algebraic modeling | Complex models |
| Google OR-Tools | Constraint solving | Large-scale |
| CPLEX | Commercial solver | Enterprise |
| Gurobi | Commercial solver | High performance |
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.