Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude loads one when your task matches it, or you run it by name.
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Variable aggregation (reduced-space presolve) for nonlinear optimization —
a standalone plugin for discopt that
installs into the discopt.aggregation namespace.
It implements Naik, Biegler, Bent & Parker, Variable aggregation for nonlinear optimization problems (arXiv:2502.13869): substitute variables defined by equality constraints into the rest of a model, eliminating both a variable and a constraint to yield a smaller reduced-space formulation, then recover the eliminated variables from the reduced solution.
import discopt.modeling as dm
from discopt.aggregation import aggregate, solve
m = dm.Model("example")
x = m.continuous("x", lb=-5, ub=5)
y = m.continuous("y", lb=-5, ub=5)
m.subject_to(y - (x + 1) == 0.0) # y is defined by x
m.minimize(x**2 + y**2)
res = solve(m, method="d2") # aggregate → solve → recover
print(res.status, res.objective) # optimal 0.5
print(res.x) # {'x': -0.5, 'y': 0.5} (y recovered)
pip install discopt-aggregation # from PyPI
Or from a checkout for development:
uv pip install -e ".[dev]" # or: pip install -e ".[dev]"
Requires discopt >= 0.6. The plugin is a discopt.aggregation namespace
package: it merges into the installed discopt package at import time. This
needs discopt/__init__.py to extend its search path, i.e. to contain:
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
discopt 0.6+ includes this line. (If you use an older discopt, add it once.)
This package ships a Claude Code skill
that documents how to use aggregation (method choice, the structure-preserving vs
Hessian-cost tradeoff, every option, recovery, diagnostics, the study harnesses).
Claude Code does not auto-discover skills from installed Python packages, so
after pip install run the bundled installer once to copy it into a
.claude/skills/ directory Claude scans:
discopt-aggregation-skill install # -> ./.claude/skills/ (this project)
discopt-aggregation-skill install --user # -> ~/.claude/skills/ (every project)
discopt-aggregation-skill path # where the packaged skill lives
Working inside this repo, the skill is already at .claude/skills/ (no install
needed). The repo is also a Claude Code plugin (.claude-plugin/plugin.json
skills/), so it can be loaded with claude --plugin-dir <repo> or published
to a marketplace. The single source of truth is
src/discopt/aggregation/skill/; the two .claude/skills / skills entries are
symlinks to it.method= selects the strategy, most conservative to most aggressive:
| key | name | eliminates | paper |
|---|---|---|---|
ld1 | fixed-variable (degree-1) | y = a | Alg 3 |
ecd2 | equal-coefficient degree-2 | y = x + a | Alg 6 |
ld2 | linear degree-2 | y = a*x + b | Alg 5 |
d2 | degree-2 (default) | y = f(x) (≤ 2 variables) | Alg 4 |
gr | greedy | y = f(w, x, …) (y linear) | Alg 1 |
lm | linear-matching | y = f(w, x, …) (y linear) | Alg 2 |
ld1/ecd2/ld2/d2 are structure-preserving; gr/lm are
approximate-maximum. The paper recommends d2; it is the default.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Generated from the plugin's indexed repository (jkitchin/discopt-aggregation) — no native marketplace selected
npx claudepluginhub p/jkitchin-discopt-aggregationPlugins from other owners that cover similar ground