bulc_set_exit_assignment
Configure evacuation agent exit selection strategy to optimize building evacuation flow using modes like nearest exit, shortest path, or balanced distribution.
Instructions
Set the exit assignment strategy for evacuation agents. Determines how agents choose which exit to use.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Assignment mode: 'NEAREST' (closest exit), 'SHORTEST_PATH' (shortest walking path), 'BALANCED' (balance exit flow), 'CUSTOM' (manual assignment) | |
| balanceThreshold | No | For BALANCED mode: max agents per exit ratio difference. Default: 0.2 | |
| customAssignments | No | For CUSTOM mode: array of {agentIds: [...], exitId: '...'} assignments |
Implementation Reference
- src/tools/evac.ts:1067-1074 (handler)Handler case for 'bulc_set_exit_assignment': parses input arguments with Zod schema and sends 'set_exit_assignment' command to BULC client.case "bulc_set_exit_assignment": { const validated = SetExitAssignmentSchema.parse(args); result = await client.sendCommand({ action: "set_exit_assignment", params: validated, }); break; }
- src/tools/evac.ts:519-559 (schema)Tool definition object for 'bulc_set_exit_assignment' including name, description, input schema, and annotations.{ name: "bulc_set_exit_assignment", description: "Set the exit assignment strategy for evacuation agents. " + "Determines how agents choose which exit to use.", inputSchema: { type: "object" as const, properties: { mode: { type: "string", description: "Assignment mode: 'NEAREST' (closest exit), 'SHORTEST_PATH' (shortest walking path), 'BALANCED' (balance exit flow), 'CUSTOM' (manual assignment)", enum: ["NEAREST", "SHORTEST_PATH", "BALANCED", "CUSTOM"], }, balanceThreshold: { type: "number", description: "For BALANCED mode: max agents per exit ratio difference. Default: 0.2", }, customAssignments: { type: "array", description: "For CUSTOM mode: array of {agentIds: [...], exitId: '...'} assignments", items: { type: "object", properties: { agentIds: { type: "array", items: { type: "integer" }, }, exitId: { type: "string", }, }, }, }, }, required: ["mode"], }, annotations: { readOnlyHint: false, destructiveHint: true, }, },
- src/tools/evac.ts:832-839 (schema)Zod validation schema (SetExitAssignmentSchema) used to parse and validate tool input arguments.const SetExitAssignmentSchema = z.object({ mode: z.enum(["NEAREST", "SHORTEST_PATH", "BALANCED", "CUSTOM"]), balanceThreshold: z.number().positive().optional(), customAssignments: z.array(z.object({ agentIds: z.array(z.number().int()), exitId: z.string(), })).optional(), });
- src/index.ts:139-148 (registration)Explicit routing in main MCP server handler dispatches 'bulc_set_exit_assignment' tool calls to the evac-specific handleEvacTool function.if ( name === "bulc_set_agent_properties" || name === "bulc_generate_rset_report" || name === "bulc_save_evac_result" || name === "bulc_set_exit_assignment" || name === "bulc_set_premovement_time" || name === "bulc_set_fire_coupling" ) { return await handleEvacTool(name, safeArgs); }