feat(phase3): implement SimPy discrete-event simulation engine, multi-zone order generation, fleet dispatcher, and wider Zone B aisles
This commit is contained in:
@@ -73,8 +73,8 @@ def test_build_graph_structure(project_config_dir: Path):
|
||||
builder = WarehouseGraphBuilder.from_config_dict(bundle.warehouse)
|
||||
graph = builder.build_graph()
|
||||
|
||||
assert graph.number_of_nodes() > 500
|
||||
assert graph.number_of_edges() > 1500
|
||||
assert graph.number_of_nodes() > 450
|
||||
assert graph.number_of_edges() > 1400
|
||||
|
||||
# Verify key operational station nodes exist
|
||||
assert graph.has_node("station_dock_inbound_1")
|
||||
@@ -203,8 +203,8 @@ def test_export_topology_dict_and_json(project_config_dir: Path, tmp_path: Path)
|
||||
assert "nodes" in topo
|
||||
assert "edges" in topo
|
||||
|
||||
assert topo["metadata"]["node_count"] > 500
|
||||
assert topo["metadata"]["edge_count"] > 1500
|
||||
assert topo["metadata"]["node_count"] > 450
|
||||
assert topo["metadata"]["edge_count"] > 1400
|
||||
|
||||
out_file = tmp_path / "test_export_graph.json"
|
||||
saved = builder.export_json(out_file)
|
||||
@@ -274,3 +274,30 @@ def test_export_usda_with_robots(project_config_dir: Path, tmp_path: Path):
|
||||
assert 'def Xform "amr_heavy_02"' in content
|
||||
assert 'def Cube "StatusDome"' in content
|
||||
|
||||
|
||||
def test_slow_moving_zone_b_has_wider_aisles(project_config_dir: Path):
|
||||
"""Verify that slow-moving Zone B has significantly wider aisles than fast-moving Zone A."""
|
||||
loader = ConfigLoader(project_config_dir)
|
||||
bundle = loader.load_all()
|
||||
builder = WarehouseGraphBuilder.from_config_dict(bundle.warehouse)
|
||||
graph = builder.build_graph()
|
||||
|
||||
# Extract unique X positions of internal aisles in Zone A and Zone B
|
||||
zone_a_xs = sorted(set(
|
||||
d["x"] for n, d in graph.nodes(data=True)
|
||||
if d.get("zone") == "zone_a" and d.get("node_type") == NodeType.WAYPOINT.value
|
||||
))
|
||||
zone_b_xs = sorted(set(
|
||||
d["x"] for n, d in graph.nodes(data=True)
|
||||
if d.get("zone") == "zone_b" and d.get("node_type") == NodeType.WAYPOINT.value
|
||||
))
|
||||
|
||||
# Calculate aisle spacings
|
||||
zone_a_spacing = zone_a_xs[1] - zone_a_xs[0]
|
||||
zone_b_spacing = zone_b_xs[1] - zone_b_xs[0]
|
||||
|
||||
assert zone_b_spacing > zone_a_spacing
|
||||
assert zone_b_spacing == 4.0
|
||||
assert zone_a_spacing == 2.0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user