下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「simpy」。 Create a SimPy simulation of customers arriving at a bank with 2 tellers. Customers arrive every 3-5 minutes and service takes 5-8 minutes. Run for 8 hours and show average wait time.
預期結果:
- Simulation Results: 8-hour bank operation
- Total customers served: 147
- Average wait time: 4.2 minutes
- Maximum wait time: 18.7 minutes
- Teller utilization: 87%
- Queue length peaked at 12 customers around hour 6
正在使用「simpy」。 Build a SimPy model of a 3-stage manufacturing line where parts go through cutting (10 min), assembly (15 min), and inspection (5 min). Each stage has 1 machine. Analyze throughput.
預期結果:
- Manufacturing Line Analysis Results:
- Parts completed: 23 over 8-hour shift
- Stage utilization: Cutting 96%, Assembly 72%, Inspection 36%
- Bottleneck identified: Cutting station
- Average cycle time per part: 32 minutes
- Suggestion: Add second cutting machine to increase throughput by 35%
正在使用「simpy」。 Model a cloud data center with 10 servers handling 3 types of jobs.
預期結果:
- Resource Allocation Results:
- Short jobs: 450 completed, avg wait 0.3 min, utilization 45%
- Medium jobs: 180 completed, avg wait 2.1 min, utilization 78%
- Long jobs: 45 completed, avg wait 8.4 min, utilization 92%
- Optimal allocation: 3 servers short, 4 medium, 3 long jobs
- Current over-provisioning: 2 servers
安全審計
安全Static analysis flagged 260 potential security issues, but evaluation confirms all are false positives. The 'external_commands' findings are markdown backticks used for code formatting, not shell execution. The 'weak cryptographic algorithm' flags refer to random.seed() for simulation reproducibility. No actual security risks exist in this legitimate SimPy discrete-event simulation skill.
風險因素
⚙️ 外部命令 (6)
品質評分
你能建構什麼
最佳化製造產線
建模生產流程以找出瓶頸、平衡產能並縮短週期時間。
模擬網路流量
在不同負載條件下分析封包路由、頻寬分配與延遲。
設計排隊系統
模擬銀行、醫院或零售業的顧客流量,以決定最佳人力配置。
試試這些提示
Create a SimPy simulation of customers arriving at a bank with 2 tellers. Customers arrive every 3-5 minutes and service takes 5-8 minutes. Run for 8 hours and show average wait time.
Build a SimPy model of a 3-stage manufacturing line where parts go through cutting (10 min), assembly (15 min), and inspection (5 min). Each stage has 1 machine. Analyze throughput.
Simulate packets arriving at a router with 100 Mbps bandwidth. Packets are 1-5 KB and arrive at 50 packets per second. Show queue length and packet loss under peak load.
Model a cloud data center with 10 servers handling 3 types of jobs: short (1-5 min), medium (10-20 min), long (30-60 min). Jobs arrive randomly. Find optimal server allocation per job type.
最佳實務
- 在請求資源時一律使用 context manager(with 陳述式)以確保正確清理並避免死結
- 在比較不同模擬情境時設定 random.seed() 以確保結果可重現
- 在模擬過程中持續監控並蒐集資料,而不是只在結束時,才能捕捉暫態行為
避免
- 在流程函式中忘記 yield 陳述式會使流程瞬間執行完畢,沒有正確的時間推進
- 重複使用已觸發的事件會造成模擬錯誤或非預期行為
- 使用 time.sleep() 這類阻塞式 Python 操作而非 env.timeout() 會破壞模擬的時間模型