Basic Trailer Loading Optimizer (DEMO Project for the company i work for) see. ENHANCEMENT_PLAN.md for future work.
Application for optimizing pallet placement in trailers, leveraging advanced algorithms and 3D visualization to maximize space utilization.
- Project Overview
- Key Features
- Getting Started
- Usage Guide
- Project Structure
- Configuration
- Internationalization
- Troubleshooting & FAQ
- Contributing
- License
- Contact
The Trailer Loading Optimizer is a powerful tool designed for logistics managers, warehouse operators, and transport companies to efficiently plan the loading of pallets onto trailers. By providing trailer dimensions and pallet counts, the application calculates the optimal arrangement of pallets to maximize space utilization, reduce costs, and minimize manual planning errors. The intuitive 3D visualization provides a clear and interactive representation of the loading plan, ensuring accuracy and ease of use.
- Advanced Optimization Algorithms: Utilizes sophisticated algorithms in
core/pallet_strategies.pyandcore/ladowanie.pyto determine the most efficient placement of pallets. - Dynamic 3D Visualization: Interactive 3D models of the loaded trailer are rendered using
PyQt6andPlotly, providing a clear and detailed view of the loading plan. - Support for Multiple Pallet Types: Handles both standard Euro pallets and custom-sized pallets, with types defined in
core/pallet_types.py. - Flexible Input Parameters: The GUI allows for easy input of trailer dimensions, pallet sizes, and the number of pallets to be loaded.
- Incremental Visualization: The 3D view updates in real-time during the optimization process, as seen in
gui/right_panel.py. - Configurable Settings: Application settings can be customized through the
config/config.jsonfile. - Internationalization: Supports multiple languages, with translations managed in
language/translations.json. - Reporting & Export: Loading plans can be saved as PNG images or interactive HTML files for easy sharing and documentation.
- Python 3.x
- The application is cross-platform and has been tested on Windows, macOS, and Linux.
- Project dependencies:
numpyPyQt6plotlyPyQt6-WebEnginekaleido
- Clone the repository:
git clone https://github.com/qrak/trailer-loading-optimizer.git cd trailer-loading-optimizer - Create and activate a virtual environment:
python -m venv venv # On Windows .\venv\Scripts\activate # On macOS/Linux source venv/bin/activate
- Install the required packages:
pip install -r requirements.txt
With the virtual environment activated, run the following command to start the application:
python start.py- Trailer Dimensions: Enter the length, width, and height of your trailer in the "Trailer Dimensions" section.
- Pallet Dimensions: Define the dimensions for both Euro and custom pallets.
- Pallet Counts: Specify the number of Euro and custom pallets you need to load.
- Once the optimization is complete, a 3D model of the loading plan will be displayed.
- Rotate: Click and drag the left mouse button.
- Pan: Click and drag the right mouse button.
- Zoom: Use the mouse wheel.
- Use the toolbar buttons to reset the view or switch to top-down or side perspectives.
- Click the "Save Plan to File" button to save the current loading plan.
- You can choose to save the plan as a PNG image or an interactive HTML file.
- Saved plans are stored in the
plany/directory by default.
.
├── core/ # Core optimization and visualization logic
├── gui/ # PyQt6 GUI components
├── config/ # Configuration files
├── language/ # Internationalization and translation files
├── img/ # Icons and images
├── plany/ # Default directory for saved plans
├── requirements.txt # Project dependencies
├── start.py # Main application entry point
└── LICENSE # Project license
The application's settings are stored in config/config.json. This file includes default dimensions for the trailer and pallets, and is automatically updated when you make changes in the GUI.
The application supports multiple languages, with English and Polish currently available. All UI text is stored in language/translations.json and loaded by language/translations.py.
- GUI fails to start: Ensure you have installed all dependencies from
requirements.txtin an active virtual environment. - "No plot to save!" error: You must run the optimization at least once before you can save a plan.
- Slow performance: For a large number of pallets, the optimization process can be resource-intensive.
Contributions are welcome! Please feel free to fork the repository, make your changes, and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.
- Author: Piotr Kurnicki
- GitHub: https://github.com/qrak