feat(phase-1): implement warehouse domain models, topological graph builder, connectivity validation, and export
This commit is contained in:
@@ -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"]:
|
||||
|
||||
Reference in New Issue
Block a user