Workcell

The workcell module contains all classes used to create a workcell. Every workflow needs a workcell, and one workcell can be reused for many workflows.

Simple workcell example

sample_instrument = Instrument(
    id="sample",
    name="Sample Instrument",
    type="hotel_lpx110",
    bench="A",
    driver="liconic_lpx110",
    capacity=110,
    mappings=["A"],
    config={},
)

workcell = Workcell(
    instruments=[sample_instrument],
    transport_matrix=TransportMatrix(
        default_transport_time=5,
        paths=[
            TransportPath(source="A", destination="A", time=15),
        ],
    ),
)

Workcell classes

class linq.workcell.Instrument(*, id: str, name: str, type: str, bench: str, driver: str, capacity: int = 1, is_slotless_container: bool = False, config: dict[str, JsonSerializable] = ..., mappings: list[str] = ...)

Describes an instrument in a workcell.

id: str

Instrument ID (must be unique for the entire workflow).

name: str

Instrument name.

type: str

Instrument type. Currently arbitrary.

bench: str

Id of the instrument’s bench.

driver: str

Name of the instrument driver.

capacity: int

Instrument labware capacity.

is_slotless_container: bool

Set to true for instruments like bins, which have capacity for many pieces of labware not distinct slots.

config: dict[str, JsonSerializable]

Configuration options for the instrument driver. Use the driver CLI to get valid values for each driver.

mappings: list[str]

Mappings this instrument is assigned to, used when a task can pick from several instruments.

class linq.workcell.TransportPath(*, source: str, destination: str, time: int)

Describes the estimated time to transport labware from an instrument on one bench to another.

Note: For benches with multiple instruments, this assumes it takes roughly the same amount of time to transfer labware from any instrument on the bench to the transport layer and vice versa.

source: str

The source bench.

destination: str

The destination bench.

time: int

Estimated transport time from source to destination.

class linq.workcell.TransportMatrix(*, default_transport_time: int, paths: list[TransportPath])

The transport matrix contains all estimates for transport times between benches.

default_transport_time: int

Default transport time if no specific estimate for a path is given.

paths: list[TransportPath]

List of paths describing the time to transport labware from one bench to another.

class linq.workcell.Workcell(*, workcell_id: str | None = None, instruments: list[Instrument], transport_matrix: TransportMatrix)

Represents a workcell.

workcell_id: str | None

The identifier of the workcell.

instruments: list[Instrument]

The list of instruments present in the workcell.

transport_matrix: TransportMatrix

Describes transport times between benches in the workcell.

get_instrument(instrument_id: str) Instrument

Fetches the instrument with the given instrument_id from the list of instruments.

Parameters:

instrument_id (str) – The unique identifier of the instrument.

Raises:

KeyError – If no instrument with the specified ID is found in the workcell.

Returns:

The instrument with the matching ID.

Return type:

Instrument