Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use for formulating, solving, debugging, and validating mixed-integer linear optimization models with open-source solvers, including variable indexing, sparse constraints, linearized costs, solver limits, MIP gaps, incumbent extraction, numerical tolerances, and deterministic output reporting.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Use this skill for binary/integer decisions, linear constraints, and linear or piecewise-linear objectives. It is useful for time-expanded scheduling models with many repeated resource-period constraints.
This is a workflow and implementation guide, not a complete formulation for any one task.
Use helper functions or dictionaries, not scattered index arithmetic.
offset = {}
n = 0
def alloc(name, shape, lb=0.0, ub=float("inf"), integer=False):
global n
size = int(np.prod(shape))
idx = np.arange(n, n + size).reshape(shape)
offset[name] = idx
n += size
return idx
u = alloc("commitment", (G, T), lb=0, ub=1, integer=True)
start = alloc("startup", (G, T), lb=0, ub=1, integer=True)
dispatch = alloc("dispatch", (G, T), lb=0)
reserve = alloc("reserve", (G, T), lb=0)
Keep variable ownership obvious: type, resource, period, and optional segment/tier.
Use sparse rows for large time-expanded models:
rows, cols, vals = [], [], []
lb, ub = [], []
row = 0
def add_row(terms, lo, hi):
global row
for j, a in terms:
if abs(a) > 0:
rows.append(row)
cols.append(j)
vals.append(float(a))
lb.append(float(lo))
ub.append(float(hi))
row += 1
Use equality rows for conservation/linking and upper/lower bound rows for capacity, reserve, ramping, timing, and logic.
Write the intended inequality first, then move variable terms to the left-hand side.
# Intended: x + y <= cap * u - reduction * start
# Row form: x + y - cap*u + reduction*start <= 0
add_row(
[(x, 1.0), (y, 1.0), (u, -cap), (start, reduction)],
lo=-INF,
hi=0.0,
)
For non-obvious rows, test a tiny hand case. Example: set u=1, start=1 and check the remaining capacity equals the intended startup capability; set u=1, start=0 and check normal capacity returns.
Keep a checklist linking each model constraint family to a validation check:
transition linking -> startup/shutdown match status
online capacity -> offline zeroes and min/max output
joint reserve capacity -> production plus reserve fits capability
ramp deliverability -> reserve can be deployed within ramp-up
minimum durations -> starts/stops imply required status windows
balance equations -> demand/load/inventory conservation
cost-curve logic -> recomputed objective matches report
If validation checks something not in the model, the solver may produce an invalid report. If the model has a constraint not validated after extraction, conversion bugs can slip through.
Identify the curve convention before modeling:
For segment variables, constrain segment quantities to their widths and sum them to the modeled production quantity. Use slopes only when the data represents total-cost breakpoints or incremental segment costs consistently.
HiGHS through SciPy is a common default when available:
from scipy.optimize import milp, LinearConstraint, Bounds
result = milp(
c=c,
integrality=integrality,
bounds=Bounds(lb, ub),
constraints=constraints,
options={"time_limit": 600.0, "mip_rel_gap": 0.01, "disp": False},
)
if result.x is None:
raise RuntimeError(f"No incumbent: status={result.status}, message={result.message}")
Capture status, objective, incumbent values, and any reliable gap/bound. A time-limit status can be useful if a feasible incumbent exists; a failure with no incumbent is not a solution.
After solving:
"pass" self-checks only after validation passes.First suspect the model encoding. Common causes:
t or t-1 index;Debug in stages: check shapes, relax one family at a time, add diagnostic slack variables, print largest violations, and compare local validation with final requirements.
A fixed-commitment repair LP is useful only if it includes every feasibility family judged in the final report. Do not repair only balance and capacity while omitting transition-dependent ramp, reserve, startup, shutdown, or minimum-duration limits.
Always rerun independent validation after repair.
null/empty gap when no reliable bound exists, if the schema allows it."pass" strings without validation.아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching `acopf-math-model.md` and MATPOWER branch fields. Use when computing branch flows in either direction, aggregating bus injections for nodal balance, checking MVA (rateA) limits, computing branch loading %, or debugging sign/units issues in AC power flow.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Redact text from PDF documents for blind review anonymization
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when checking simplified ADA-derived plan-view bathroom accessibility constraints such as turning space, door clear width, toilet centerline, grab bars, and lavatory knee/toe clearance.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Analyze failed GitHub Action jobs for a pull request.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when extracting plan-view architectural geometry from DXF files with semantic CAD layers, especially when outputs must normalize rooms, doors, fixtures, clearances, and grab bars into machine-checkable JSON.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.