# Settings for Example Lab
#
# This file contains default configuration values and is safe to commit to git.
# Override any value with environment variables (prefixed, e.g. EVENT_SERVER_URL)
# or a .env file (gitignored) for secrets and environment-specific overrides.
# See Configuration.md for all available settings.

# Lab Manager
lab_server_url: http://localhost:8000/
lab_manager_name: "Example Lab"
lab_manager_description: "An example MADSci lab for development and testing"

# Event Manager
event_server_url: http://localhost:8001/
event_manager_name: "Example Event Manager"
event_manager_description: "Event manager for the example lab"
event_database_name: madsci_events
event_mongo_db_url: mongodb://localhost:27017/

# Experiment Manager
experiment_server_url: http://localhost:8002/
experiment_manager_name: "Example Experiment Manager"
experiment_manager_description: "Experiment manager for the example lab"
experiment_database_name: madsci_experiments
experiment_mongo_db_url: mongodb://localhost:27017/

# Resource Manager
resource_server_url: http://localhost:8003/
resource_manager_name: "Example Resource Manager"
resource_manager_description: "Resource manager for the example lab"
# Note: resource_db_url contains credentials and is in .env instead.
# Default resource templates (plate_nest, storage_stack) used by the location manager.
resource_default_templates:
  - template_name: plate_nest
    description: Standard plate nest for holding individual plates on instrument decks
    base_resource:
      resource_name: plate_nest_template
      resource_name_prefix: null
      resource_class: deck_slot
      base_type: slot
      resource_description: Plate nest for holding labware on instrument decks
      owner: {}
      custom_attributes: null
      capacity: 1
      default_children: null
      default_child_template: null
      default_child_quantity: null
    required_overrides:
      - resource_name
      - resource_class
    tags:
      - plate
      - nest
      - deck
      - slot
    version: 1.0.0
  - template_name: storage_stack
    description: High-capacity storage stack for materials
    base_resource:
      resource_name: storage_stack_template
      resource_name_prefix: null
      resource_class: storage
      base_type: stack
      resource_description: High-capacity storage for materials
      owner: {}
      custom_attributes: null
      capacity: 16
      default_children: null
      default_child_template: null
      default_child_quantity: null
    required_overrides:
      - resource_name
      - resource_class
    tags:
      - storage
      - stack
      - materials
    version: 1.0.0

# Data Manager
data_server_url: http://localhost:8004/
data_manager_name: "Example Data Manager"
data_manager_description: "Data manager for the example lab"
data_database_name: madsci_data
data_mongo_db_url: mongodb://localhost:27017/

# Workcell Manager
workcell_server_url: http://localhost:8005/
workcell_manager_name: "Example Workcell"
workcell_manager_description: "An example workcell with liquid handlers, plate reader, and robot arm"
workcell_database_name: madsci_workcells
workcell_mongo_db_url: mongodb://localhost:27017/
# Workcell node URLs (which nodes belong to this workcell and how to reach them).
workcell_nodes:
  liquidhandler_1: http://localhost:2000/
  liquidhandler_2: http://localhost:2001/
  robotarm_1: http://localhost:2002/
  platereader_1: http://localhost:2003/
  advanced_example_node: http://localhost:2004/

# Location Manager
location_server_url: http://localhost:8006/
location_manager_name: "Example Location Manager"
location_manager_description: "Location manager for the example lab"
# Location definitions (deck positions, storage, etc.)
location_locations:
  - location_name: liquidhandler_1.deck_1
    location_id: 01K5HDZZCF27YHD2WDGSXFPPKF
    description: Deck 1 on liquidhandler_1 - accessible by robotarm_1
    representations:
      liquidhandler_1:
        deck_position: 1
        deck_type: standard
        max_plates: 1
      robotarm_1:
        gripper_config: standard
        max_payload: 2.0
        position: [10, 15, 5]
    resource_template_name: plate_nest
    resource_template_overrides:
      resource_class: deck_slot
      resource_description: Deck position accessible by liquid handler and robot arm
    allow_transfers: true
  - location_name: liquidhandler_1.deck_2
    location_id: 01K5HDZZCF27YHD2WDGSXFPPKG
    description: Deck 2 on liquidhandler_1 - liquid handler only
    representations:
      liquidhandler_1:
        deck_position: 2
        deck_type: standard
        max_plates: 1
    resource_template_name: plate_nest
    resource_template_overrides:
      resource_class: deck_slot
      resource_description: Deck position accessible by liquid handler only
    allow_transfers: true
  - location_name: liquidhandler_1.deck_3
    location_id: 01K5HDZZCF27YHD2WDGSXFPPKH
    description: Deck 3 on liquidhandler_1 - liquid handler only
    representations:
      liquidhandler_1:
        deck_position: 3
        deck_type: standard
        max_plates: 1
      robotarm_1:
        gripper_config: standard
        max_payload: 2.0
        position: [20, 15, 5]
    resource_template_name: plate_nest
    resource_template_overrides:
      resource_class: deck_slot
      resource_description: Deck position accessible by liquid handler and robot arm
    allow_transfers: true
  - location_name: liquidhandler_1.deck_4
    location_id: 01K5HDZZCF27YHD2WDGSXFPPKJ
    description: Deck 4 on liquidhandler_1 - liquid handler only
    representations:
      liquidhandler_1:
        deck_position: 4
        deck_type: standard
        max_plates: 1
    resource_template_name: plate_nest
    resource_template_overrides:
      resource_class: deck_slot
      resource_description: Deck position accessible by liquid handler only
    allow_transfers: true
  - location_name: liquidhandler_2.deck_1
    location_id: 01K5HDZZCF27YHD2WDGSXFPPKK
    description: Deck 1 on liquidhandler_2 - accessible by robotarm_1
    representations:
      liquidhandler_2:
        deck_position: 1
        deck_type: standard
        max_plates: 1
      robotarm_1:
        gripper_config: standard
        max_payload: 2.0
        position: [5, 15, 5]
    resource_template_name: plate_nest
    resource_template_overrides:
      resource_class: deck_slot
      resource_description: Deck position accessible by liquid handler and robot arm
    allow_transfers: true
  - location_name: liquidhandler_2.deck_2
    location_id: 01K5HDZZCF27YHD2WDGSXFPPKM
    description: Deck 2 on liquidhandler_2 - liquid handler only
    representations:
      liquidhandler_2:
        deck_position: 2
        deck_type: standard
        max_plates: 1
    resource_template_name: plate_nest
    resource_template_overrides:
      resource_class: deck_slot
      resource_description: Deck position accessible by liquid handler only
    allow_transfers: true
  - location_name: liquidhandler_2.deck_3
    location_id: 01K5HDZZCF27YHD2WDGSXFPPKN
    description: Deck 3 on liquidhandler_2 - accessible by robotarm_1
    representations:
      liquidhandler_2:
        deck_position: 3
        deck_type: standard
        max_plates: 1
      robotarm_1:
        gripper_config: standard
        max_payload: 2.0
        position: [25, 15, 5]
    resource_template_name: plate_nest
    resource_template_overrides:
      resource_class: deck_slot
      resource_description: Deck position accessible by liquid handler and robot arm
    allow_transfers: true
  - location_name: liquidhandler_2.deck_4
    location_id: 01K5HDZZCF27YHD2WDGSXFPPKP
    description: Deck 4 on liquidhandler_2 - liquid handler only
    representations:
      liquidhandler_2:
        deck_position: 4
        deck_type: standard
        max_plates: 1
    resource_template_name: plate_nest
    resource_template_overrides:
      resource_class: deck_slot
      resource_description: Deck position accessible by liquid handler only
    allow_transfers: true
  - location_name: platereader_1.plate_carriage
    location_id: 01K5HDZZCF27YHD2WDGSXFPPKQ
    description: Plate carriage - accessible by robotarm_1 for plate transport
    representations:
      robotarm_1:
        gripper_config: wide
        max_payload: 3.0
        position: [15, 10, 8]
    resource_template_name: plate_nest
    resource_template_overrides:
      resource_class: plate_carriage
      resource_description: Plate carriage for platereader_1
    allow_transfers: true
  - location_name: storage_rack
    location_id: 01K5HDZZCF27YHD2WDGSXFPPKR
    description: Storage Rack - High-capacity storage accessible only by robot arm
    representations:
      robotarm_1:
        gripper_config: wide
        max_payload: 10.0
        position: [30, 25, 10]
    resource_template_name: storage_stack
    resource_template_overrides:
      resource_class: storage
      resource_description: High-capacity storage stack for materials
      capacity: 16
    allow_transfers: true
# Transfer capabilities (robot arm routes, etc.)
location_transfer_capabilities:
  transfer_templates:
    - node_name: robotarm_1
      action: transfer
      source_argument_name: source
      target_argument_name: target
      cost_weight: 1.0
      additional_args: {}
      additional_location_args: {}
    - node_name: liquidhandler_1
      action: deck_transfer
      source_argument_name: source_location
      target_argument_name: target_location
      cost_weight: 2.0
      additional_args: {}
      additional_location_args: {}
    - node_name: liquidhandler_2
      action: deck_transfer
      source_argument_name: source_location
      target_argument_name: target_location
      cost_weight: 2.0
      additional_args: {}
      additional_location_args: {}
  override_transfer_templates:
    source_overrides:
      storage_rack:
        - node_name: robotarm_1
          action: transfer
          source_argument_name: source
          target_argument_name: target
          cost_weight: 0.8
          additional_args: {}
          additional_location_args: {}
    target_overrides:
      platereader_1.plate_carriage:
        - node_name: robotarm_1
          action: transfer
          source_argument_name: source
          target_argument_name: target
          cost_weight: 1.2
          additional_args: {}
          additional_location_args: {}
    pair_overrides: {}
  capacity_cost_config:
    enabled: true
    high_capacity_threshold: 0.75
    full_capacity_threshold: 0.95
    high_capacity_multiplier: 2.0
    full_capacity_multiplier: 8.0
