feat(phase-1): implement warehouse domain models, topological graph builder, connectivity validation, and export

This commit is contained in:
Warehouse Twin Dev
2026-10-19 15:12:38 +05:30
parent 7ef65ce65d
commit 88b922a3e1
13 changed files with 1535 additions and 50 deletions
+16
View File
@@ -93,6 +93,22 @@ class ConfigLoader:
if "charging_stations" not in data or not isinstance(data["charging_stations"], list):
raise ConfigurationError("warehouse.json missing 'charging_stations' list.")
if "storage_locations" in data:
if not isinstance(data["storage_locations"], list):
raise ConfigurationError("warehouse.json 'storage_locations' must be a list.")
known_zones = set(data["zones"].keys())
for loc in data["storage_locations"]:
if "location_id" not in loc or not loc["location_id"]:
raise ConfigurationError("warehouse.json storage location missing 'location_id'.")
if "zone" not in loc or loc["zone"] not in known_zones:
raise ConfigurationError(
f"warehouse.json storage location '{loc.get('location_id')}' references unknown zone '{loc.get('zone')}'."
)
if "position" not in loc or len(loc["position"]) != 3:
raise ConfigurationError(
f"warehouse.json storage location '{loc.get('location_id')}' must specify a 3D [x, y, z] position."
)
def validate_robots(self, data: Dict[str, Any]) -> None:
"""Validate robot specifications and fleet registry."""
if "robot_types" not in data or not isinstance(data["robot_types"], dict) or not data["robot_types"]: