{ "cells": [ { "metadata": {}, "cell_type": "markdown", "source": "", "id": "822a7f833a4608e9" }, { "metadata": { "ExecuteTime": { "end_time": "2026-01-20T19:36:34.951110Z", "start_time": "2026-01-20T19:36:34.936801Z" } }, "cell_type": "code", "source": [ "from pathlib import Path\n", "from typing import Tuple\n", "\n", "def find_project_root() -> Path:\n", " \"\"\"Find project root by looking for a marker file.\"\"\"\n", " current = Path().resolve()\n", " for parent in [current] + list(current.parents):\n", " if (parent / \"pyproject.toml\").exists(): # or setup.py, .git, etc.\n", " return parent\n", " raise FileNotFoundError(\"Could not find project root\")\n", "\n", "PROJECT_ROOT = find_project_root()\n", "\n", "DATA_DIR = PROJECT_ROOT / \"data\"\n", "\n", "instances_base = DATA_DIR / \"instances\"\n", "cache_base = DATA_DIR / \"instances\" / \"caches\"" ], "id": "118e09b9de1cc31", "outputs": [], "execution_count": 1 }, { "metadata": {}, "cell_type": "markdown", "source": "# Run 3D4L on a Single Instance", "id": "8b1dde07b0adc6d3" }, { "metadata": {}, "cell_type": "markdown", "source": "This example shows how to define a custom pipeline runner to execute automated pipeline synthesis for a single instance. We utilize the FoodmartLoader class from ware_ops_algos to translate the instance file into a domain object compatible with 3D4L.\n", "id": "9dff115b4925e635" }, { "metadata": { "ExecuteTime": { "end_time": "2026-01-20T19:37:08.989631Z", "start_time": "2026-01-20T19:36:34.951110Z" } }, "cell_type": "code", "source": [ "from ware_ops_algos.domain_models import BaseWarehouseDomain\n", "from ware_ops_algos.data_loaders import FoodmartLoader\n", "from ware_ops_pipes.utils.experiment_utils import PipelineRunner, RankingEvaluatorDistance\n", "\n", "\n", "class SimpleRunner(PipelineRunner):\n", " def __init__(self, instance_set_name: str, \n", " instances_dir: Path, \n", " cache_dir: Path, \n", " project_root: Path):\n", " super().__init__(instance_set_name, \n", " instances_dir, \n", " cache_dir, \n", " project_root)\n", " \n", " self.loader = FoodmartLoader(str(instances_dir), \n", " str(cache_dir))\n", " self.ranker = RankingEvaluatorDistance\n", " \n", " def discover_instances(self) -> list[Tuple[str, list[Path]]]:\n", " pass\n", " \n", " def load_domain(self, instance_name: str, \n", " file_paths: list[Path]) -> BaseWarehouseDomain:\n", " return self.loader.load(file_paths[0].name, use_cache=True)\n", "\n", "runner = SimpleRunner(\"FoodmartData\", instances_base / \"FoodmartData\",\n", " cache_base / \"FoodmartData\", PROJECT_ROOT)\n", "\n", "runner.run_instance(instance_name=\"instances_d5_ord5_MAL.txt\", file_paths=[Path(\"data/instances/FoodmartData/instances_d5_ord5_MAL.txt\")])" ], "id": "19f76b74ee527e7d", "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Loaded 38 model cards\n", "\n", "================================================================================\n", "Processing: instances_d5_ord5_MAL.txt\n", "================================================================================\n", "\n", "Problem type filtering for 'OBRP':\n", " Accepted types: {'order_selection', 'batching', 'routing', 'OBRP', 'item_assignment'}\n", " Result: 32/38 algorithms match\n", "\n", " Checking: ClarkAndWrightNN\n", " ✓ Algorithm is feasible\n", "\n", " Checking: ClarkAndWrightRR\n", " ✗ layout: constraint violated - n_blocks=2 does not satisfy {'equals': 1}\n", "\n", " Checking: ClarkAndWrightSShape\n", " ✓ Algorithm is feasible\n", "\n", " Checking: ClosestDepotMaxSharedArticlesSeedBatching\n", " ✓ Algorithm is feasible\n", "\n", " Checking: ClosestDepotMinDistanceSeedBatching\n", " ✓ Algorithm is feasible\n", "\n", " Checking: CombinedBatchingRoutingAssigning\n", " ✓ Algorithm is feasible\n", "\n", " Checking: DueDate\n", " ✗ orders: constraint violated - due_date=False does not satisfy {'equals': True}\n", "\n", " Checking: FiFo\n", " ✗ orders: constraint violated - order_date=False does not satisfy {'equals': True}\n", "\n", " Checking: GreedyIA\n", " ✓ Algorithm is feasible\n", "\n", " Checking: NNItemAssignment\n", " ✗ storage: type 'dedicated' not in required types ['scattered']\n", "\n", " Checking: LargestGap\n", " ✓ Algorithm is feasible\n", "\n", " Checking: LSBatchingNNDueDate\n", " ✗ orders: constraint violated - due_date=False does not satisfy {'equals': True}\n", "\n", " Checking: LSBatchingNNFiFo\n", " ✗ orders: constraint violated - order_date=False does not satisfy {'equals': True}\n", "\n", " Checking: LSBatchingNNRand\n", " ✓ Algorithm is feasible\n", "\n", " Checking: LSBatchingRR\n", " ✗ layout: constraint violated - n_blocks=2 does not satisfy {'equals': 1}\n", "\n", " Checking: Midpoint\n", " ✓ Algorithm is feasible\n", "\n", " Checking: NearestNeighbourhood\n", " ✓ Algorithm is feasible\n", "\n", " Checking: OrderNrFiFo\n", " ✗ orders: missing required features ['order_number']\n", "\n", " Checking: DummyOS\n", " ✓ Algorithm is feasible\n", "\n", " Checking: GreedyOS\n", " ✗ warehouse_info: type 'offline' not in required types ['online']\n", "\n", " Checking: MinSharedAislesOS\n", " ✗ warehouse_info: type 'offline' not in required types ['online']\n", "\n", " Checking: MinMaxAislesOS\n", " ✗ resources: type 'human' not in required types ['mixed']\n", "\n", " Checking: MinMaxArticlesOS\n", " ✗ resources: type 'human' not in required types ['mixed']\n", "\n", " Checking: PLRouting\n", " ✓ Algorithm is feasible\n", "\n", " Checking: Random\n", " ✓ Algorithm is feasible\n", "\n", " Checking: RandomMinDistanceSeedBatching\n", " ✓ Algorithm is feasible\n", "\n", " Checking: RandomSimArticlesSeedBatching\n", " ✗ orders: missing required features ['id']\n", "\n", " Checking: Return\n", " ✓ Algorithm is feasible\n", "\n", " Checking: RatliffRosenthal\n", " ✗ layout: constraint violated - n_blocks=2 does not satisfy {'equals': 1}\n", "\n", " Checking: SPRPNF\n", " ✗ layout: missing required features ['state_graph']\n", "\n", " Checking: SShape\n", " ✓ Algorithm is feasible\n", "\n", " Checking: ExactSolving\n", " ✓ Algorithm is feasible\n", "\n", "Requirement filtering: 17/32 algorithms feasible\n", "\n", "Final result: 17/38 algorithms are feasible\n", "✓ 17/38 algorithms applicable\n", "✅ ClarkAndWrightNN\n", "✅ ClarkAndWrightSShape\n", "✅ ClosestDepotMaxSharedArticlesSeedBatching\n", "✅ ClosestDepotMinDistanceSeedBatching\n", "⚠ Unknown model: CombinedBatchingRoutingAssigning, skipping...\n", "✅ GreedyIA\n", "✅ LargestGap\n", "✅ LSBatchingNNRand\n", "✅ Midpoint\n", "✅ NearestNeighbourhood\n", "✅ DummyOS\n", "✅ PLRouting\n", "✅ Random\n", "⚠ Unknown model: RandomMinDistanceSeedBatching, skipping...\n", "✅ Return\n", "✅ SShape\n", "⚠ Unknown model: ExactSolving, skipping...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\zm0714\\Documents\\Projekte\\ware_ops_pipes\\.venv\\Lib\\site-packages\\luigi\\parameter.py:296: UserWarning: Parameter \"instance_set_name\" with value \"None\" is not of type string.\n", " warnings.warn('Parameter \"{}\" with value \"{}\" is not of type string.'.format(param_name, param_value))\n", "C:\\Users\\zm0714\\Documents\\Projekte\\ware_ops_pipes\\.venv\\Lib\\site-packages\\luigi\\parameter.py:296: UserWarning: Parameter \"instance_name\" with value \"None\" is not of type string.\n", " warnings.warn('Parameter \"{}\" with value \"{}\" is not of type string.'.format(param_name, param_value))\n", "C:\\Users\\zm0714\\Documents\\Projekte\\ware_ops_pipes\\.venv\\Lib\\site-packages\\luigi\\parameter.py:296: UserWarning: Parameter \"instance_path\" with value \"None\" is not of type string.\n", " warnings.warn('Parameter \"{}\" with value \"{}\" is not of type string.'.format(param_name, param_value))\n", "C:\\Users\\zm0714\\Documents\\Projekte\\ware_ops_pipes\\.venv\\Lib\\site-packages\\luigi\\parameter.py:296: UserWarning: Parameter \"domain_path\" with value \"None\" is not of type string.\n", " warnings.warn('Parameter \"{}\" with value \"{}\" is not of type string.'.format(param_name, param_value))\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Collecting repository...\n", "Build repository...\n", "Building tree grammar and inhabiting pipelines...\n", "Enumerating up to 42 pipelines...\n", "✓ Found 42 valid pipelines\n", "\n", "Pipeline 1:\n", "Task ResultAggregationDistance(config_index=, routing_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.routing.pl\", \"task_class\": \"PLRouting\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"pick_list_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.batching.clark_and_wright_nn\", \"task_class\": \"ClarkAndWrightNN\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"order_selection_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]}}]}}]})\n", "Requires {'routing_plan': PLRouting(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, pick_list_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.batching.clark_and_wright_nn\", \"task_class\": \"ClarkAndWrightNN\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"order_selection_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]}}]})}\n", "Task PLRouting(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, pick_list_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.batching.clark_and_wright_nn\", \"task_class\": \"ClarkAndWrightNN\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"order_selection_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]}}]})\n", "Requires {'instance': InstanceLoader(config_index=), 'pick_list_plan': ClarkAndWrightNN(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, order_selection_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]})}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "Task ClarkAndWrightNN(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, order_selection_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]})\n", "Requires {'instance': InstanceLoader(config_index=), 'order_selection_plan': DummyOS(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, item_assignment_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]})}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "Task DummyOS(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, item_assignment_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]})\n", "Requires {'instance': InstanceLoader(config_index=), 'item_assignment_plan': GreedyIA(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []})}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "Task GreedyIA(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []})\n", "Requires {'instance': InstanceLoader(config_index=)}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "\n", "└─--[ResultAggregationDistance]\n", " └─--[PLRouting]\n", " |---[InstanceLoader]\n", " └─--[ClarkAndWrightNN]\n", " |---[InstanceLoader]\n", " └─--[DummyOS]\n", " |---[InstanceLoader]\n", " └─--[GreedyIA]\n", " └─--[InstanceLoader]\n", "\n", "Pipeline 2:\n", "Task ResultAggregationDistance(config_index=, routing_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.routing.pl\", \"task_class\": \"PLRouting\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"pick_list_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.batching.seed_shared_articles\", \"task_class\": \"ClosestDepotMaxSharedArticlesSeedBatching\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"order_selection_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]}}]}}]})\n", "Requires {'routing_plan': PLRouting(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, pick_list_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.batching.seed_shared_articles\", \"task_class\": \"ClosestDepotMaxSharedArticlesSeedBatching\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"order_selection_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]}}]})}\n", "Task PLRouting(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, pick_list_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.batching.seed_shared_articles\", \"task_class\": \"ClosestDepotMaxSharedArticlesSeedBatching\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"order_selection_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]}}]})\n", "Requires {'instance': InstanceLoader(config_index=), 'pick_list_plan': ClosestDepotMaxSharedArticlesSeedBatching(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, order_selection_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]})}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "Task ClosestDepotMaxSharedArticlesSeedBatching(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, order_selection_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]})\n", "Requires {'instance': InstanceLoader(config_index=), 'order_selection_plan': DummyOS(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, item_assignment_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]})}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "Task DummyOS(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, item_assignment_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]})\n", "Requires {'instance': InstanceLoader(config_index=), 'item_assignment_plan': GreedyIA(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []})}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "Task GreedyIA(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []})\n", "Requires {'instance': InstanceLoader(config_index=)}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "\n", "└─--[ResultAggregationDistance]\n", " └─--[PLRouting]\n", " |---[InstanceLoader]\n", " └─--[ClosestDepotMaxSharedArticlesSeedBatching]\n", " |---[InstanceLoader]\n", " └─--[DummyOS]\n", " |---[InstanceLoader]\n", " └─--[GreedyIA]\n", " └─--[InstanceLoader]\n", "\n", "Pipeline 3:\n", "Task ResultAggregationDistance(config_index=, routing_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.routing.pl\", \"task_class\": \"PLRouting\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"pick_list_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"RawPickListGeneration\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"order_selection_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]}}]}}]})\n", "Requires {'routing_plan': PLRouting(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, pick_list_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"RawPickListGeneration\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"order_selection_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]}}]})}\n", "Task PLRouting(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, pick_list_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"RawPickListGeneration\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"order_selection_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]}}]})\n", "Requires {'instance': InstanceLoader(config_index=), 'pick_list_plan': RawPickListGeneration(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, order_selection_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]})}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "Task RawPickListGeneration(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, order_selection_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.order_selection.dummy_order_selection\", \"task_class\": \"DummyOS\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}, {\"item_assignment_plan\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]}}]})\n", "Requires {'instance': InstanceLoader(config_index=), 'order_selection_plan': DummyOS(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, item_assignment_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]})}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "Task DummyOS(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}, item_assignment_plan={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.components.item_assignment.greedy_item_assignment\", \"task_class\": \"GreedyIA\", \"arguments\": [{\"instance\": {\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []}}]})\n", "Requires {'instance': InstanceLoader(config_index=), 'item_assignment_plan': GreedyIA(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []})}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "Task GreedyIA(config_index=, instance={\"__type__\": \"cls_luigi.inhabitation_task.RepoMeta.WrappedTask\", \"module\": \"ware_ops_pipes.pipelines.templates.template_1\", \"task_class\": \"InstanceLoader\", \"arguments\": []})\n", "Requires {'instance': InstanceLoader(config_index=)}\n", "Task InstanceLoader(config_index=)\n", "Requires []\n", "\n", "└─--[ResultAggregationDistance]\n", " └─--[PLRouting]\n", " |---[InstanceLoader]\n", " └─--[RawPickListGeneration]\n", " |---[InstanceLoader]\n", " └─--[DummyOS]\n", " |---[InstanceLoader]\n", " └─--[GreedyIA]\n", " └─--[InstanceLoader]\n", "\n", "✓ Running 42 pipelines...\n", "\n", "\n", "Top 5 pipelines for instances_d5_ord5_MAL.txt:\n", " rank pipeline_id value gap_pct\n", " 1 GreedyItemAssignment+NearestNeighbourhoodRouting_RandomBatching_LocalSearchBatching+NearestNeighbourhoodRouting 383.09 0.0\n", " 2 GreedyItemAssignment+NearestNeighbourhoodRouting_SavingsBatching+NearestNeighbourhoodRouting 383.09 0.0\n", " 3 GreedyItemAssignment+closest_to_depot_shared_articles_SeedBatching+NearestNeighbourhoodRouting 383.09 0.0\n", " 4 GreedyItemAssignment+SShapeRouting_SavingsBatching+NearestNeighbourhoodRouting 383.09 0.0\n", " 5 GreedyItemAssignment+RandomBatching+NearestNeighbourhoodRouting 383.09 0.0\n", "\n", "Saved: C:\\Users\\zm0714\\Documents\\Projekte\\ware_ops_pipes\\experiments\\output\\FoodmartData\\instances_d5_ord5_MAL.txt\\ranking_tours_summary_total_distance.csv\n", "\n", "Best: GreedyItemAssignment+NearestNeighbourhoodRouting_RandomBatching_LocalSearchBatching+NearestNeighbourhoodRouting = 383.09\n" ] } ], "execution_count": 2 }, { "metadata": {}, "cell_type": "markdown", "source": "As the ranker shows, the best pipeline is the combination of GreedyItemAssignment, Local Search Batching with a RandomBatching component for constructing the initial solution and NearestNeighbourhoodRouting as the routing component", "id": "da8f83e8feab79f3" }, { "metadata": { "ExecuteTime": { "end_time": "2026-01-20T19:37:08.993173Z", "start_time": "2026-01-20T19:37:08.989631Z" } }, "cell_type": "code", "source": "", "id": "e8ebbf444ece966b", "outputs": [], "execution_count": 2 } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 5 }