Install
$ agentstack add skill-tangledgroup-tangled-skills-pulp-3-3-2 ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
pulp 3.3.2
Overview
PuLP is a Python library for formulating and solving linear programming (LP), mixed-integer linear programming (MILP), and binary programming problems. It provides a clean, declarative API for building optimization models and dispatches to any installed solver (CBC included by default; supports HiGHS, GLPK, Gurobi, CPLEX, MOSEK, XPRESS, SCIP, COPT, SAS, CHOCO, MIPCL, and more).
Install with pip install "pulp[cbc]==3.3.2" — the [cbc] extra bundles the CBC solver so prob.solve() works out of the box without separate solver setup.
PuLP 3.3.2 introduces prob.add_variable() / add_variable_dicts() / add_variable_matrix() as the preferred API. The legacy LpVariable() constructor still works but emits deprecation warnings (removed in PuLP 4.0).
Usage
Quick Start
from pulp import LpProblem, LpMinimize, value
prob = LpProblem("MyProblem", LpMinimize)
# Create variables attached to the problem
x = prob.add_variable("x", lowBound=0, upBound=4)
y = prob.add_variable("y", lowBound=-1, upBound=1)
z = prob.add_variable("z", lowBound=0) # upper bound is +∞
# Objective
prob += x + 4*y + 9*z, "Objective"
# Constraints
prob += x + y = 10, "C2"
prob += -y + z == 7, "C3"
# Solve (uses default CBC solver)
status = prob.solve()
print(f"Status: {LpStatus[status]}")
for v in prob.variables():
print(f"{v.name} = {v.varValue}")
print(f"Objective = {value(prob.objective)}")
Variable Categories
| Category | Constant | Usage | |---|---|---| | Continuous | LpContinuous (default) | Real-valued variables | | Integer | LpInteger | Integer-valued variables | | Binary | LpBinary | 0 or 1 only |
b = prob.add_variable("binary_var", cat="Binary") # 0 or 1
i = prob.add_variable("int_var", lowBound=0, cat="Integer")
c = prob.add_variable("cont_var", lowBound=0) # continuous (default)
Named Constraints and Variables
Always name constraints for debugging, sensitivity analysis, and resolve workflows:
prob += x + y /`** — These characters are replaced with `_`. Use alphanumeric names with underscores.
## References
- [01-core-api](references/01-core-api.md) — LpProblem, LpVariable, LpAffineExpression, LpConstraint classes and operators
- [02-variable-creation](references/02-variable-creation.md) — add_variable, add_variable_dicts, add_variable_matrix with examples
- [03-solvers](references/03-solvers.md) — Solver selection, configuration, availability checks, time limits
- [04-model-patterns](references/04-model-patterns.md) — Transportation, assignment, blending, facility location, Sudoku, cutting stock
- [05-advanced-topics](references/05-advanced-topics.md) — Sensitivity analysis, resolve, column generation, stochastic programming, warm starts
## Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- **Author:** [tangledgroup](https://github.com/tangledgroup)
- **Source:** [tangledgroup/tangled-skills](https://github.com/tangledgroup/tangled-skills)
- **License:** MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.