SimPyは、プロセス、キュー、共有リソースを用いて複雑なシステムをモデル化できます。製造ライン、サービス運用、ネットワークトラフィック、物流をシミュレートし、実装前に性能を最適化します。
スキル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.
期待される結果:
- シミュレーション結果: 8時間の銀行運用
- 対応した顧客数: 147
- 平均待ち時間: 4.2分
- 最大待ち時間: 18.7分
- テラー稼働率: 87%
- キュー長は6時間目ごろに12人でピーク
「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.
期待される結果:
- 製造ライン分析結果:
- 完成部品数: 8時間シフトで23
- 工程稼働率: 切断 96%、組立 72%、検査 36%
- ボトルネック特定: 切断工程
- 部品あたり平均サイクルタイム: 32分
- 提案: 切断機を1台追加してスループットを35%向上
「simpy」を使用しています。 Model a cloud data center with 10 servers handling 3 types of jobs.
期待される結果:
- リソース配分結果:
- 短時間ジョブ: 450件完了、平均待ち 0.3分、稼働率 45%
- 中時間ジョブ: 180件完了、平均待ち 2.1分、稼働率 78%
- 長時間ジョブ: 45件完了、平均待ち 8.4分、稼働率 92%
- 最適配分: 短時間3台、中時間4台、長時間3台
- 現在の過剰配備: 2台
セキュリティ監査
安全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)
📁 ファイルシステムへのアクセス (2)
品質スコア
作れるもの
製造ラインの最適化
生産ワークフローをモデル化してボトルネックを特定し、能力配分を調整してサイクルタイムを最小化します。
ネットワークトラフィックのシミュレーション
さまざまな負荷条件でのパケットルーティング、帯域幅配分、遅延を分析します。
待ち行列システムの設計
銀行、病院、小売における顧客フローをシミュレートし、最適な人員配置レベルを決定します。
これらのプロンプトを試す
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.
ベストプラクティス
- リソース要求時は常にコンテキストマネージャ(with文)を使用し、適切なクリーンアップとデッドロック防止を確保する
- 異なるシミュレーションシナリオを比較する際は再現性のためにrandom.seed()を設定する
- シミュレーション中は終盤だけでなく継続的にデータを監視・収集し、過渡的な挙動を捉える
回避
- プロセス関数でyield文を忘れると、適切な時間進行なしにプロセスが即時に実行される
- 既にトリガーされたイベントを再利用すると、シミュレーションエラーや予期しない挙動を引き起こす
- time.sleep()のようなブロッキングなPython操作をenv.timeout()の代わりに使うと、シミュレーションのタイミングモデルが破綻する