Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问许可证需确认审计通过

algo-sc-eoq算法 SC EOQ

Agent Skill

algo-sc-eoq 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

372

周安装

16

GitHub Stars

125

下载量

131
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:algo-sc-eoq(算法 SC EOQ)
来源仓库:https://github.com/asgard-ai-platform/skills
仓库路径:skills/algo-sc-eoq
安装命令:
npx skills add https://github.com/asgard-ai-platform/skills --skill algo-sc-eoq
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/asgard-ai-platform/skills --skill algo-sc-eoq

简介

algo-sc-eoq 计算使订货成本与持有成本之和最小的经济订购批量。

  • 适用于稳定需求的库存补货计划与仓储成本控制。
  • 基于年需求、单次订货费与单位持有费推导最优批量公式。
  • 安装命令:npx skills add https://github.com/asgard-ai-platform/skills --skill algo-sc-eoq
  • 假设需求恒定且到货即时,不适用于季节性或波动剧烈场景

SKILL.md

Economic Order Quantity (EOQ)

Overview

EOQ determines the order quantity that minimizes total inventory cost = ordering cost + holding cost. Formula: EOQ = √(2DS/H) where D=annual demand, S=ordering cost per order, H=holding cost per unit per year. Assumes constant demand and instantaneous replenishment.

When to Use

Trigger conditions:

  • Setting standard order quantities for inventory replenishment
  • Balancing ordering frequency against warehousing costs
  • Baseline calculation before applying safety stock adjustments

When NOT to use:

  • When demand is highly uncertain (use newsvendor model)
  • When products are perishable with short shelf life
  • When quantity discounts change the cost structure significantly

Algorithm

IRON LAW: EOQ Assumes CONSTANT, KNOWN Demand
If demand is variable or uncertain, EOQ gives the wrong answer.
Real-world application: use EOQ as a starting point, then add
safety stock for demand variability and lead time uncertainty.
Total cost curve is flat near EOQ — ±20% from optimal Q changes
total cost by only ~2%.

Phase 1: Input Validation

Determine: D (annual demand in units), S (fixed cost per order), H (holding cost per unit per year = unit cost × holding rate, typically 20-30% of unit value). Gate: All costs positive, demand estimate reasonable.

Phase 2: Core Algorithm

  1. EOQ = √(2 × D × S / H)
  2. Number of orders per year = D / EOQ
  3. Reorder point = d × L (daily demand × lead time in days)
  4. Total annual cost = (D/Q × S) + (Q/2 × H) at Q = EOQ

Phase 3: Verification

Check: ordering cost component ≈ holding cost component (they're equal at EOQ). Total cost is at minimum. Gate: Ordering cost ≈ holding cost (±5%).

Phase 4: Output

Return EOQ with cost breakdown and reorder point.

Output Format

{
  "eoq": 500,
  "orders_per_year": 20,
  "reorder_point": 150,
  "annual_cost": {"ordering": 2000, "holding": 2000, "total": 4000},
  "metadata": {"demand": 10000, "order_cost": 100, "holding_cost": 4.0}
}

Examples

Sample I/O

Input: D=10,000 units/year, S=$100/order, H=$4/unit/year Expected: EOQ = √(2×10000×100/4) = √500000 = 707 units

Edge Cases

InputExpectedWhy
Very high S, low HLarge EOQ, few ordersMinimize expensive ordering
Very low S, high HSmall EOQ, frequent ordersMinimize expensive holding
D = 0EOQ = 0, no orderingNo demand, no orders needed

Gotchas

  • Holding cost underestimation: H should include: capital cost, storage, insurance, obsolescence, handling. Companies often only count warehouse rent, understating true H.
  • Flat cost curve: Total cost is insensitive near EOQ. Rounding EOQ to a convenient number (full pallet, container) costs very little.
  • Quantity discounts: Price breaks at certain quantities may make it cheaper to order MORE than EOQ. Compare total cost at EOQ vs discount breakpoints.
  • Lead time variability: EOQ doesn't address when to order, only how much. Add safety stock: SS = z × σ_demand × √(lead time).
  • Multi-item coordination: When multiple items share ordering costs (same supplier), use joint replenishment models, not individual EOQs.

Scripts

ScriptDescriptionUsage
scripts/eoq.pyCompute Economic Order Quantity and cost breakdownpython scripts/eoq.py --help

Run python scripts/eoq.py --verify to execute built-in sanity tests.

References

  • For EOQ with quantity discounts, see references/eoq-discounts.md
  • For safety stock calculation, see algo-sc-safety-stock

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.15%
按下载量换算42

Claude

29.67%
按下载量换算39

Cursor

19.03%
按下载量换算25

Gemini CLI

9.32%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills