diff --git a/unilabos/devices/workstation/bioyond_studio/config.py b/unilabos/devices/workstation/bioyond_studio/config.py index d609440d..b594125b 100644 --- a/unilabos/devices/workstation/bioyond_studio/config.py +++ b/unilabos/devices/workstation/bioyond_studio/config.py @@ -147,7 +147,89 @@ WAREHOUSE_MAPPING = { "C03": "3a1baa20-a7b1-cca7-781e-0522b729bf5d", "C04": "3a1baa20-a7b1-7c98-5fd9-5855355ae4b3" } + }, + "大分液瓶堆栈": { + "uuid": "", + "site_uuids": { + "A01": "3a19da3d-4f3d-bcac-2932-7542041e10e0", + "A02": "3a19da3d-4f3d-4d75-38ac-fb58ad0687c3", + "A03": "3a19da3d-4f3d-b25e-f2b1-85342a5b7eae", + "B01": "3a19da3d-4f3d-fd3e-058a-2733a0925767", + "B02": "3a19da3d-4f3d-37bd-a944-c391ad56857f", + "B03": "3a19da3d-4f3d-e353-7862-c6d1d4bc667f", + "C01": "3a19da3d-4f3d-9519-5da7-76179c958e70", + "C02": "3a19da3d-4f3d-b586-d7ed-9ec244f6f937", + "C03": "3a19da3d-4f3d-5061-249b-35dfef732811" + } + }, + "小分液瓶堆栈": { + "uuid": "", + "site_uuids": { + "C03": "3a19da40-55bf-8943-d20d-a8b3ea0d16c0" + } + }, + "站内Tip头盒堆栈": { + "uuid": "", + "site_uuids": { + "A01": "3a19deab-d5cc-be1e-5c37-4e9e5a664388", + "A02": "3a19deab-d5cc-b394-8141-27cb3853e8ea", + "B01": "3a19deab-d5cc-4dca-596e-ca7414d5f501", + "B02": "3a19deab-d5cc-9bc0-442b-12d9d59aa62a", + "C01": "3a19deab-d5cc-2eaf-b6a4-f0d54e4f1246", + "C02": "3a19deab-d5cc-d9f4-25df-b8018c372bc7" + } + }, + "配液站内配液大板仓库(无需提前上料)": { + "uuid": "", + "site_uuids": { + "A01": "3a1a21dc-06af-3915-9cb9-80a9dc42f386" + } + }, + "配液站内配液小板仓库(无需以前入料)": { + "uuid": "", + "site_uuids": { + "A01": "3a1a21de-8e8b-7938-2d06-858b36c10e31" + } + }, + "移液站内大瓶板仓库(无需提前如料)": { + "uuid": "", + "site_uuids": { + "A01": "3a1a224c-c727-fa62-1f2b-0037a84b9fca" + } + }, + "移液站内小瓶板仓库(无需提前入料)": { + "uuid": "", + "site_uuids": { + "A01": "3a1a224d-ed49-710c-a9c3-3fc61d479cbb" + } + }, + "适配器位仓库": { + "uuid": "", + "site_uuids": { + "A01": "3a1abd46-18fe-1f56-6ced-a1f7fe08e36c" + } + }, + "1号2号手套箱交接堆栈": { + "uuid": "", + "site_uuids": { + "A01": "3a1baa49-7f77-35aa-60b1-e55a45d065fa" + } + }, + "2号手套箱内部堆栈": { + "uuid": "", + "site_uuids": { + "A01": "3a1baa4b-393e-9f86-3921-7a18b0a8e371", + "A02": "3a1baa4b-393e-9425-928b-ee0f6f679d44", + "A03": "3a1baa4b-393e-0baf-632b-59dfdc931a3a", + "B01": "3a1baa4b-393e-f8aa-c8a9-956f3132f05c", + "B02": "3a1baa4b-393e-ef05-42f6-53f4c6e89d70", + "B03": "3a1baa4b-393e-c07b-a924-a9f0dfda9711", + "C01": "3a1baa4b-393e-4c2b-821a-16a7fe025c48", + "C02": "3a1baa4b-393e-2eaf-61a1-9063c832d5a2", + "C03": "3a1baa4b-393e-034e-8e28-8626d934a85f" + } } + } # 物料类型配置 @@ -155,15 +237,14 @@ MATERIAL_TYPE_MAPPINGS = { "100ml液体": ("YB_1Bottle100mlCarrier", "d37166b3-ecaa-481e-bd84-3032b795ba07"), "液": ("YB_1BottleCarrier", "3a190ca1-2add-2b23-f8e1-bbd348b7f790"), "高粘液": ("YB_1GaoNianYeBottleCarrier", "abe8df30-563d-43d2-85e0-cabec59ddc16"), - # "加样头(大)": ("YB_jia_yang_tou_da", "3a190ca0-b2f6-9aeb-8067-547e72c11469"), "加样头(大)": ("YB_jia_yang_tou_da_1X1_carrier", "3a190ca0-b2f6-9aeb-8067-547e72c11469"), # "加样头(大)板": ("YB_jia_yang_tou_da_1X1_carrier", "a8e714ae-2a4e-4eb9-9614-e4c140ec3f16"), "5ml分液瓶板": ("YB_6x5ml_DispensingVialCarrier", "3a192fa4-007d-ec7b-456e-2a8be7a13f23"), "5ml分液瓶": ("YB_fen_ye_5ml_Bottle", "3a192c2a-ebb7-58a1-480d-8b3863bf74f4"), "20ml分液瓶板": ("YB_6x20ml_DispensingVialCarrier", "3a192fa4-47db-3449-162a-eaf8aba57e27"), - "20ml分液瓶": ("YB_fen_ye_20ml_Bottler", "3a192c2b-19e8-f0a3-035e-041ca8ca1035"), + "20ml分液瓶": ("YB_fen_ye_20ml_Bottle", "3a192c2b-19e8-f0a3-035e-041ca8ca1035"), "配液瓶(小)板": ("YB_6x_SmallSolutionBottleCarrier", "3a190c8b-3284-af78-d29f-9a69463ad047"), - "配液瓶(小)": ("YB_pei_ye_xiao_Bottler", "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"), + "配液瓶(小)": ("YB_pei_ye_xiao_Bottle", "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"), "配液瓶(大)板": ("YB_4x_LargeSolutionBottleCarrier", "53e50377-32dc-4781-b3c0-5ce45bc7dc27"), "配液瓶(大)": ("YB_pei_ye_da_Bottle", "19c52ad1-51c5-494f-8854-576f4ca9c6ca"), "适配器块": ("YB_AdapterBlock", "efc3bb32-d504-4890-91c0-b64ed3ac80cf"), diff --git a/unilabos/resources/bioyond/YB_warehouses.py b/unilabos/resources/bioyond/YB_warehouses.py index c546759d..39f79eac 100644 --- a/unilabos/resources/bioyond/YB_warehouses.py +++ b/unilabos/resources/bioyond/YB_warehouses.py @@ -1,9 +1,9 @@ -from unilabos.resources.warehouse import WareHouse, warehouse_factory +from unilabos.resources.warehouse import WareHouse, YB_warehouse_factory def bioyond_warehouse_1x4x4(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=1, num_items_y=4, @@ -20,7 +20,7 @@ def bioyond_warehouse_1x4x4(name: str) -> WareHouse: def bioyond_warehouse_1x4x2(name: str) -> WareHouse: """创建BioYond 4x1x2仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=1, num_items_y=4, @@ -37,7 +37,7 @@ def bioyond_warehouse_1x4x2(name: str) -> WareHouse: # 定义benyond的堆栈 def bioyond_warehouse_1x2x2(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=2, num_items_y=2, @@ -50,9 +50,26 @@ def bioyond_warehouse_1x2x2(name: str) -> WareHouse: item_dz=120.0, category="YB_warehouse", ) + +def bioyond_warehouse_2x2x1(name: str) -> WareHouse: + """创建BioYond 2x2x1仓库(自动堆栈)""" + return YB_warehouse_factory( + name=name, + num_items_x=2, + num_items_y=2, + num_items_z=1, + dx=10.0, + dy=10.0, + dz=10.0, + item_dx=137.0, + item_dy=96.0, + item_dz=120.0, + category="YB_warehouse", + ) + def bioyond_warehouse_10x1x1(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=10, num_items_y=1, @@ -67,7 +84,7 @@ def bioyond_warehouse_10x1x1(name: str) -> WareHouse: ) def bioyond_warehouse_1x3x3(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=1, num_items_y=3, @@ -82,7 +99,7 @@ def bioyond_warehouse_1x3x3(name: str) -> WareHouse: ) def bioyond_warehouse_2x1x3(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=2, num_items_y=1, @@ -98,7 +115,7 @@ def bioyond_warehouse_2x1x3(name: str) -> WareHouse: def bioyond_warehouse_3x3x1(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=3, num_items_y=3, @@ -113,7 +130,7 @@ def bioyond_warehouse_3x3x1(name: str) -> WareHouse: ) def bioyond_warehouse_5x1x1(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=5, num_items_y=1, @@ -128,7 +145,7 @@ def bioyond_warehouse_5x1x1(name: str) -> WareHouse: ) def bioyond_warehouse_3x3x1_2(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=3, num_items_y=3, @@ -144,7 +161,7 @@ def bioyond_warehouse_3x3x1_2(name: str) -> WareHouse: def bioyond_warehouse_liquid_and_lid_handling(name: str) -> WareHouse: """创建BioYond开关盖加液模块台面""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=2, num_items_y=5, @@ -157,4 +174,36 @@ def bioyond_warehouse_liquid_and_lid_handling(name: str) -> WareHouse: item_dz=120.0, category="warehouse", removed_positions=None + ) + +def bioyond_warehouse_3x5x1(name: str) -> WareHouse: + """创建BioYond 3x5x1仓库(手动堆栈)""" + return YB_warehouse_factory( + name=name, + num_items_x=3, + num_items_y=5, + num_items_z=1, + dx=10.0, + dy=10.0, + dz=10.0, + item_dx=137.0, + item_dy=96.0, + item_dz=120.0, + category="warehouse", + ) + +def bioyond_warehouse_20x1x1(name: str) -> WareHouse: + """创建BioYond 20x1x1仓库(粉末加样头堆栈)""" + return YB_warehouse_factory( + name=name, + num_items_x=20, + num_items_y=1, + num_items_z=1, + dx=10.0, + dy=10.0, + dz=10.0, + item_dx=137.0, + item_dy=96.0, + item_dz=120.0, + category="warehouse", ) \ No newline at end of file diff --git a/unilabos/resources/bioyond/bottles.py b/unilabos/resources/bioyond/bottles.py deleted file mode 100644 index 23b9523e..00000000 --- a/unilabos/resources/bioyond/bottles.py +++ /dev/null @@ -1,255 +0,0 @@ -from unilabos.resources.itemized_carrier import Bottle, BottleCarrier -# 工厂函数 - - -def YB_Solid_Stock( - name: str, - diameter: float = 20.0, - height: float = 100.0, - max_volume: float = 30000.0, # 30mL - barcode: str = None, -) -> Bottle: - """创建粉末瓶""" - return Bottle( - name=name, - diameter=diameter,# 未知 - height=height, - max_volume=max_volume, - barcode=barcode, - model="Solid_Stock", - ) - - -def YB_Solid_Vial( - name: str, - diameter: float = 25.0, - height: float = 60.0, - max_volume: float = 30000.0, # 30mL - barcode: str = None, -) -> Bottle: - """创建粉末瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Solid_Vial", - ) - - -def YB_Liquid_Vial( - name: str, - diameter: float = 25.0, - height: float = 60.0, - max_volume: float = 30000.0, # 30mL - barcode: str = None, -) -> Bottle: - """创建滴定液瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Liquid_Vial", - ) - - -def YB_Solution_Beaker( - name: str, - diameter: float = 60.0, - height: float = 70.0, - max_volume: float = 200000.0, # 200mL - barcode: str = None, -) -> Bottle: - """创建溶液烧杯""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Solution_Beaker", - ) - - -def YB_Reagent_Bottle( - name: str, - diameter: float = 70.0, - height: float = 120.0, - max_volume: float = 500000.0, # 500mL - barcode: str = None, -) -> Bottle: - """创建试剂瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Reagent_Bottle", - ) - - -def YB_100ml_Liquid_Bottle( - name: str, - diameter: float = 50.0, - height: float = 80.0, - max_volume: float = 100000.0, # 100mL - barcode: str = None, -) -> Bottle: - """创建100ml液体瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="100ml_Liquid_Bottle", - ) - - -def YB_Liquid_Bottle( - name: str, - diameter: float = 40.0, - height: float = 70.0, - max_volume: float = 50000.0, # 50mL - barcode: str = None, -) -> Bottle: - """创建液体瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Liquid_Bottle", - ) - - -def YB_High_Viscosity_Liquid_Bottle( - name: str, - diameter: float = 45.0, - height: float = 75.0, - max_volume: float = 60000.0, # 60mL - barcode: str = None, -) -> Bottle: - """创建高粘液瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="High_Viscosity_Liquid_Bottle", - ) - - -def YB_Large_Dispense_Head( - name: str, - diameter: float = 35.0, - height: float = 90.0, - max_volume: float = 50000.0, # 50mL - barcode: str = None, -) -> Bottle: - """创建加样头(大)""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Large_Dispense_Head", - ) - - -def YB_5ml_Dispensing_Vial( - name: str, - diameter: float = 15.0, - height: float = 45.0, - max_volume: float = 5000.0, # 5mL - barcode: str = None, -) -> Bottle: - """创建5ml分液瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="5ml_Dispensing_Vial", - ) - - -def YB_20ml_Dispensing_Vial( - name: str, - diameter: float = 20.0, - height: float = 65.0, - max_volume: float = 20000.0, # 20mL - barcode: str = None, -) -> Bottle: - """创建20ml分液瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="20ml_Dispensing_Vial", - ) - - -def YB_Small_Solution_Bottle( - name: str, - diameter: float = 35.0, - height: float = 60.0, - max_volume: float = 40000.0, # 40mL - barcode: str = None, -) -> Bottle: - """创建配液瓶(小)""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Small_Solution_Bottle", - ) - - -def YB_Large_Solution_Bottle( - name: str, - diameter: float = 55.0, - height: float = 90.0, - max_volume: float = 150000.0, # 150mL - barcode: str = None, -) -> Bottle: - """创建配液瓶(大)""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Large_Solution_Bottle", - ) - - -def YB_Pipette_Tip( - name: str, - diameter: float = 10.0, - height: float = 50.0, - max_volume: float = 1000.0, # 1mL - barcode: str = None, -) -> Bottle: - """创建枪头""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Pipette_Tip", - ) - diff --git a/unilabos/resources/bioyond/decks.py b/unilabos/resources/bioyond/decks.py index 7bf1c38c..dc6758a4 100644 --- a/unilabos/resources/bioyond/decks.py +++ b/unilabos/resources/bioyond/decks.py @@ -2,7 +2,7 @@ from os import name from pickle import TRUE from pylabrobot.resources import Deck, Coordinate, Rotation -from unilabos.resources.bioyond.warehouses import bioyond_warehouse_1x4x4, bioyond_warehouse_1x4x2, bioyond_warehouse_liquid_and_lid_handling, bioyond_warehouse_1x2x2, bioyond_warehouse_1x3x3, bioyond_warehouse_10x1x1, bioyond_warehouse_3x3x1, bioyond_warehouse_3x3x1_2, bioyond_warehouse_5x1x1 +from unilabos.resources.bioyond.YB_warehouses import bioyond_warehouse_1x4x4, bioyond_warehouse_1x4x2, bioyond_warehouse_liquid_and_lid_handling, bioyond_warehouse_1x2x2, bioyond_warehouse_1x3x3, bioyond_warehouse_10x1x1, bioyond_warehouse_3x3x1, bioyond_warehouse_3x3x1_2, bioyond_warehouse_5x1x1, bioyond_warehouse_20x1x1, bioyond_warehouse_2x2x1, bioyond_warehouse_3x5x1 class BIOYOND_PolymerReactionStation_Deck(Deck): @@ -86,31 +86,23 @@ class BIOYOND_YB_Deck(Deck): def setup(self) -> None: # 添加仓库 self.warehouses = { - "321窗口": bioyond_warehouse_1x2x2("321窗口"), - "43窗口": bioyond_warehouse_1x2x2("43窗口"), - "手动传递窗左": bioyond_warehouse_1x3x3("手动传递窗左"), - "手动传递窗右": bioyond_warehouse_1x3x3("手动传递窗右"), - "加样头堆栈左": bioyond_warehouse_10x1x1("加样头堆栈左"), - "加样头堆栈右": bioyond_warehouse_10x1x1("加样头堆栈右"), - - "15ml配液堆栈左": bioyond_warehouse_3x3x1("15ml配液堆栈左"), - "母液加样右": bioyond_warehouse_3x3x1_2("母液加样右"), - "大瓶母液堆栈左": bioyond_warehouse_5x1x1("大瓶母液堆栈左"), - "大瓶母液堆栈右": bioyond_warehouse_5x1x1("大瓶母液堆栈右"), + "自动堆栈-左": bioyond_warehouse_2x2x1("自动堆栈-左"), + "自动堆栈-右": bioyond_warehouse_2x2x1("自动堆栈-右"), + "手动堆栈-左": bioyond_warehouse_3x5x1("手动堆栈-左"), + "手动堆栈-右": bioyond_warehouse_3x5x1("手动堆栈-右"), + "粉末加样头堆栈": bioyond_warehouse_20x1x1("粉末加样头堆栈"), + "配液站内试剂仓库": bioyond_warehouse_3x3x1("配液站内试剂仓库"), + "试剂替换仓库": bioyond_warehouse_10x1x1("试剂替换仓库"), } # warehouse 的位置 self.warehouse_locations = { - "321窗口": Coordinate(-150.0, 158.0, 0.0), - "43窗口": Coordinate(4160.0, 158.0, 0.0), - "手动传递窗左": Coordinate(-150.0, 877.0, 0.0), - "手动传递窗右": Coordinate(4160.0, 877.0, 0.0), - "加样头堆栈左": Coordinate(385.0, 1300.0, 0.0), - "加样头堆栈右": Coordinate(2187.0, 1300.0, 0.0), - - "15ml配液堆栈左": Coordinate(749.0, 355.0, 0.0), - "母液加样右": Coordinate(2152.0, 333.0, 0.0), - "大瓶母液堆栈左": Coordinate(1164.0, 676.0, 0.0), - "大瓶母液堆栈右": Coordinate(2717.0, 676.0, 0.0), + "自动堆栈-左": Coordinate(-300.0, 158.0, 0.0), + "自动堆栈-右": Coordinate(4160.0, 158.0, 0.0), + "手动堆栈-左": Coordinate(-400.0, 877.0, 0.0), + "手动堆栈-右": Coordinate(4160.0, 877.0, 0.0), + "粉末加样头堆栈": Coordinate(385.0, 1300.0, 0.0), + "配液站内试剂仓库": Coordinate(1164.0, 676.0, 0.0), + "试剂替换仓库": Coordinate(2717.0, 676.0, 0.0), } for warehouse_name, warehouse in self.warehouses.items(): diff --git a/unilabos/resources/bioyond/warehouses.py b/unilabos/resources/bioyond/warehouses.py deleted file mode 100644 index 6eb4f26e..00000000 --- a/unilabos/resources/bioyond/warehouses.py +++ /dev/null @@ -1,161 +0,0 @@ -from unilabos.resources.warehouse import WareHouse, warehouse_factory - - -def bioyond_warehouse_1x4x4(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=1, - num_items_y=4, - num_items_z=4, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) - - - -def bioyond_warehouse_1x4x2(name: str) -> WareHouse: - """创建BioYond 4x1x2仓库""" - return warehouse_factory( - name=name, - num_items_x=1, - num_items_y=4, - num_items_z=2, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - removed_positions=None - ) - # 定义benyond的堆栈 -def bioyond_warehouse_1x2x2(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=2, - num_items_y=2, - num_items_z=1, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="YB_warehouse", - ) -def bioyond_warehouse_10x1x1(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=10, - num_items_y=1, - num_items_z=1, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) -def bioyond_warehouse_1x3x3(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=1, - num_items_y=3, - num_items_z=3, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) -def bioyond_warehouse_2x1x3(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=2, - num_items_y=1, - num_items_z=3, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) - -def bioyond_warehouse_3x3x1(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=3, - num_items_y=3, - num_items_z=1, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) -def bioyond_warehouse_5x1x1(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=5, - num_items_y=1, - num_items_z=1, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) -def bioyond_warehouse_3x3x1_2(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=3, - num_items_y=3, - num_items_z=1, - dx=12.0, - dy=12.0, - dz=12.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) - -def bioyond_warehouse_liquid_and_lid_handling(name: str) -> WareHouse: - """创建BioYond开关盖加液模块台面""" - return warehouse_factory( - name=name, - num_items_x=2, - num_items_y=5, - num_items_z=1, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - removed_positions=None - ) \ No newline at end of file diff --git a/unilabos/resources/warehouse.py b/unilabos/resources/warehouse.py index c665b7fa..2f613cfa 100644 --- a/unilabos/resources/warehouse.py +++ b/unilabos/resources/warehouse.py @@ -8,7 +8,7 @@ from unilabos.resources.itemized_carrier import ItemizedCarrier, ResourcePLR LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -def warehouse_factory( +def YB_warehouse_factory( name: str, num_items_x: int = 1, num_items_y: int = 4, @@ -44,7 +44,8 @@ def warehouse_factory( name_prefix=name, ) len_x, len_y = (num_items_x, num_items_y) if num_items_z == 1 else (num_items_y, num_items_z) if num_items_x == 1 else (num_items_x, num_items_z) - keys = [f"{LETTERS[j]}{i + 1}" for i in range(len_x) for j in range(len_y)] + + keys = [f"{LETTERS[len_y-1-j]}{str(i+1).zfill(2)}" for j in range(len_y) for i in range(len_x)] sites = {i: site for i, site in zip(keys, _sites.values())} return WareHouse(