# Logistic Module - Pure Supply Chain Logic ## Context You are working EXCLUSIVELY on logistics and transportation logic. No infrastructure, no networking, no threading. ## Responsibilities - **Supply chains**: Resource routing, delivery optimization - **Transportation**: Vehicle routing, capacity planning - **Warehousing**: Inventory management, distribution centers - **Route optimization**: Shortest path, load balancing ## Interface Contract ```cpp // Input JSON examples: { "type": "plan_route", "from": "factory_A", "to": "warehouse_B", "cargo": {"steel_plate": 100, "copper_wire": 50}, "constraints": {"max_weight": 1000, "max_distance": 500} } { "type": "optimize_supply_chain", "demand": {"location_1": {"steel_plate": 50}, "location_2": {"copper_wire": 30}}, "supply": {"factory_A": {"steel_plate": 200}, "factory_B": {"copper_wire": 100}} } // Output JSON examples: { "route": ["factory_A", "hub_1", "warehouse_B"], "distance": 350, "time": 45, "cost": 120.5, "vehicles_needed": 2 } { "supply_plan": [ {"from": "factory_A", "to": "location_1", "items": {"steel_plate": 50}}, {"from": "factory_B", "to": "location_2", "items": {"copper_wire": 30}} ], "total_cost": 95.0, "efficiency": 0.92 } ``` ## Build Commands ```bash cd modules/logistic/ cmake . # Build from THIS directory make logistic-module # Generates logistic.so make test-logistic # Run isolated tests ./build/logistic-module # Test the module ``` ## File Limits - **LogisticModule.cpp**: Max 300 lines - **Pure logic only**: No sockets, threads, or engine dependencies - **JSON in/out**: All communication via JSON messages ## Focus Areas 1. Routing algorithms (A*, Dijkstra, optimization) 2. Supply chain optimization (linear programming concepts) 3. Inventory management (stock levels, reorder points) Claude Code should NEVER leave this directory or reference parent paths!