Math & Numbers
计算 M/M/1 单服务台排队系统的稳态指标:泊松到达(率 λ)、指数服务(率 μ)、FCFS。要求 λ < μ,否则系统不稳定(队列无限增长)并按业务拒绝处理。输出利用率 ρ、系统空闲概率 P0、系统中平均人数 L、队列平均等待人数 Lq、平均逗留时间 W、平均等待时间 Wq、顾客需等待的概率 ρ,以及状态概率 P(n) = (1−ρ)ρⁿ(n = 0…5),并用 Little 公式 L = λW、Lq = λWq 交叉验证。经典例:λ = 4/小时、μ = 6/小时 → ρ = 0.6667、L = 2、Lq = 1.3333、W = 0.5、Wq = 0.3333。
用三种语言从你的代码中调用此工具。
curl -X POST 'http://127.0.0.1:3003/zh/api/tools/queuing-theory-mm1' \
-H 'Content-Type: application/json' \
-d '{"arrivalRate":4,"serviceRate":6,"decimalPlaces":4}'以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。
POST http://127.0.0.1:3003/zh/api/tools/queuing-theory-mm1| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| arrivalRate | number | 是 | Average arrivals per time unit (Poisson process). Must be below the service rate μ. |
| serviceRate | number | 是 | Average services per time unit (exponential distribution). Must exceed the arrival rate λ. |
| decimalPlaces | number | 否 | — |
文本结果
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。
将以下内容加入你的 MCP 客户端配置:
{
"mcpServers": {
"elysiatools-queuing-theory-mm1": {
"name": "queuing-theory-mm1",
"description": "计算 M/M/1 单服务台排队系统的稳态指标:泊松到达(率 λ)、指数服务(率 μ)、FCFS。要求 λ < μ,否则系统不稳定(队列无限增长)并按业务拒绝处理。输出利用率 ρ、系统空闲概率 P0、系统中平均人数 L、队列平均等待人数 Lq、平均逗留时间 W、平均等待时间 Wq、顾客需等待的概率 ρ,以及状态概率 P(n) = (1−ρ)ρⁿ(n = 0…5),并用 Little 公式 L = λW、Lq = λWq 交叉验证。经典例:λ = 4/小时、μ = 6/小时 → ρ = 0.6667、L = 2、Lq = 1.3333、W = 0.5、Wq = 0.3333。",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=queuing-theory-mm1",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}连接到 SSE 端点后,列出已开放的工具:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}通过工具 id 调用,参数由其参数表构建:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "queuing-theory-mm1",
"arguments": {
"arrivalRate": 4,
"serviceRate": 6,
"decimalPlaces": 4
}
}
}有问题或反馈?请联系 [email protected]