buffer_reshuffling_and_retrieval_ip
https://github.com/mdisse/buffer_reshuffling_and_retrieval_ip
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.5%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: mdisse
- License: mit
- Language: Python
- Default Branch: main
- Size: 86.9 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Buffer Reshuffling and Retrieval (BRR)
This repository contains the implementation for solving the Buffer Reshuffling and Retrieval (BRR) problem, focusing on integer programming models for efficient warehouse operations. It includes functionalities for instance generation, solving with Gurobi, checking results, and visualizing the buffer state over time.
Table of Contents
Introduction
The Buffer Reshuffling and Retrieval (BRR) problem addresses the optimization of unit load movements within a warehouse buffer, involving tasks such as retrieval, storage, and internal reshuffling. This project provides integer programming models to tackle this complex logistics challenge, aiming to minimize travel distances.
Features
- Instance Generation: Dynamically create various warehouse instances with configurable parameters like layout, fill level, access directions, and unit load characteristics.
- Integer Programming Models: Includes both static and dynamic multiple-vehicle models for solving the BRR problem using Gurobi.
- Solution Validation: A dedicated script to check the feasibility and validity of generated solutions.
- Visualization: Generate visual representations of warehouse states and AMR movements over time, including GIF animations and combined subplot figures.
Installation
To set up the project, follow these steps:
- Clone the repository (if applicable):
bash git clone <repository_url> cd buffer_reshuffling_and_retrieval_ip - Install Gurobi: This project uses Gurobi as the optimization solver. Ensure you have Gurobi installed and a valid license configured on your system. Refer to the Gurobi Documentation for installation instructions.
- Install Python Dependencies:
It is recommended to use a virtual environment.
bash python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` pip install -r requirements.txtThe required packages are:gurobipy==12.0.2imageio==2.36.1matplotlib==3.10.3networkx==3.4.2numpy==2.2.6ortools==9.12.4544pandas==2.2.3tupledict==1.1
Usage
Running Experiments
Experiments can be run using run_BRR_experiment.py. This script can either generate new instances or process existing ones.
Generate and Solve New Instances: The
generate_instances()function inrun_BRR_experiment.pydefines the parameters for new instances (e.g.,Size_3x3_Layout_1x1_sink_source,fill_levels=[0.1],time_window_lengths=[30],fleet_sizes=[1], etc.).bash python run_BRR_experiment.py --verboseThe--verboseflag provides more detailed output during the solving process.Process Existing Instances: To re-process instances already present in
experiments/inputsBRR/:bash python run_BRR_experiment.py --check-existing --verboseSolve a Specific Instance: You can specify a path to an existing JSON instance file:
bash python run_BRR_experiment.py --instance experiments/inputsBRR/Size_3x3_Layout_1x1_sink_source/handling_time_1/unit_loads_1/access_directions_1111/rs_max_100/as_max_50/tw_length_30/speed_1/fleet_size_1/1.json --verboseThis will solve the particular instance located at the given path.
Solutions and feasibility statuses are saved in experiments/resultsBRR/ and experiments/feasibleBRR/ respectively, following a structured path based on instance parameters.
Checking Results
The result_checker_BRR.py script allows you to load a solution and interactively modify or inspect the decisions.
bash
python result_checker_BRR.py --solution_path <path_to_solution_json_file>
After loading, you can used commands like add <new_decision>, change <index> <new_decision>, delete <index>, help and done to interact with the decisions.
Visualizing Steps
The visualize_BRR_steps.py script generates visualizations of the warehouse state over time based on a solved instance's JSON output.
- Visualize a single experiment and create a GIF:
bash python visualize_BRR_steps.py --allThis processes all solution files listed inexperiments/hashesBRR/results.txt. - Generate a subplot image for specific timesteps:
You can specify a comma-seperated list of timestamps to include in a single combined image:
bash python visualize_BRR_steps.py --file <path_to_solution_json_file> --subplot-timesteps "0, 5, 10, 15"This will create asubplots_<timesteps>.pngfile containing the specified states. - Additional Visualization Flags:
--no-source: Excludes source points from the visualization.--color-vls: Colors virtual lanes in the visualization.--debug: Enables debug information in the visualization
Models
The core of the solution lies in the integer programming models implemented using Gurobi.
- Static Model (
static_model.py): This model likely represents a simplified version or a baseline for the problem, possibly assuming a fixed state or less dynamic behavior. - Dynamic Multiple Model (
dynamic_multiple_model.py): This model addresses the dynamic nature of the problem with multiple autonomous mobile robots (AMRs), considering their movements and interactions over time. It includes parameters for time limit, thread usage, MIP gap, and numerical accuracy.
Both models define various binary variables (e.g., b_vars for unit load presence, x_vars for relocations, y_vars for retrievals, e_vars for empty repositioning, c_vars for vehicle location, g_vars for retrieved unit loads, z_vars for stored unit loads, s_vars for stored unit loads) and a comprehensive set of constraints to ensure feasible and optimal solutions. The objective functions aim to minimize travel distances.
Owner
- Login: mdisse
- Kind: user
- Repositories: 1
- Profile: https://github.com/mdisse
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Buffer Reshuffling and Retrieval IP Models
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Max
family-names: Disselnmeyer
email: max.disselnmeyer@kit.edu
name-particle: Max
affiliation: Karlsruhe Institute of Technology
orcid: 'https://orcid.org/0009-0008-5689-2235'
- name: Institute for Information Management in Engineering
address: 'Zirkel, 2'
city: Karlsruhe
post-code: '76131'
email: max.disselnmeyer@kit.edu
country: DE
location: Zirkel 2
region: Baden-Württemberg
website: 'https://www.imi.kit.edu/english/index.php'
repository-code: >-
https://github.com/mdisse/buffer_reshuffling_and_retrieval_IP
license: MIT
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Dependencies
- gurobipy ==12.0.2
- imageio ==2.36.1
- matplotlib ==3.10.3
- networkx ==3.4.2
- numpy ==2.2.6
- ortools ==9.12.4544
- pandas ==2.2.3
- tupledict ==1.1