📆 Schedule Optimization Project is a tool designed to generate optimized work schedules for a team of agents. It considers various constraints like availability, training days, preferences, and more to create balanced schedules. The project aims to minimize scheduling conflicts while maximizing fairness and efficiency.
📌 It is the user's responsibility to ensure that the rules specific to their organization or sector are also respected. This project may require 🛠️ adjustments for other domains or legislative frameworks.
- 🔄 Generate tailored schedules accommodating agent availability, vacations, and preferences.
- ⚒️ Optimize workloads while adhering to strict and flexible constraints.
- ❌ Hard Constraints: Rules strictly enforced (e.g., no overlapping shifts).
- 💖 Soft Constraints: Preferences considered for optimization (e.g., preferred shifts).
- 🔨 Flexible parameters defined through the
config.json
file. - ✉️ Support for agent preferences, exclusions, and training days.
- 🔍 Vue.js-powered frontend for seamless schedule visualization and interaction.
Ensure the following tools are installed:
- 💻 Python 3.10+
- 📦 Node.js and npm
- 🔐 Git
-
🔧 Clone the repository:
git clone https://github.com/your-username/schedule-optimization.git cd schedule-optimization
-
✏️ Configure the application:
- Edit the
config.json
file in thebackend
directory to define agents, shifts, and constraints. Detailed instructions for configuringconfig.json
are provided in the Configuration File section below.
- Edit the
-
🔧 Start the backend server:
cd backend flask run
-
🎩 Launch the frontend server:
Note: The
npm install
step is mandatory only during the initial setup or when new dependencies are added. You can skip this step during subsequent launches if no changes have been made to the dependencies.cd frontend npm install npm run serve
-
🔍 Access the application at
http://localhost:8080
and start scheduling!
Dates in the config.json
file should be formatted as dd-mm-YY
for full dates or dd-mm
for recurring holidays and events.
The config.json
file serves as the core customization hub:
{
"agents": [
{
"name": "Agent1",
"preferences": {
"preferred": ["Jour", "CDP"],
"avoid": ["Nuit"]
},
"unavailable": ["17-11-2024", "07-12-2024"],
"training": ["19-11-2024"],
"exclusion": ["25-12-2024"],
"vacation": {
"start": "28-10-2024",
"end": "04-11-2024"
}
}
],
"vacations": ["Jour", "Nuit", "CDP"],
"vacation_durations": {
"Jour": 12,
"Nuit": 12,
"CDP": 5.5,
"Conge": 7
},
"holidays": ["01-01", "25-12"]
}
- 👥 Agents:
- Define preferences, availability, training days, and vacation periods.
- ⏳ Vacations:
- Specify shift types and their durations.
- 🎁 Holidays:
- Add public holidays to consider in scheduling.
- Powered by Flask and Google OR-Tools.
- Modular structure for adding constraints via the
generate_planning
function.
- Built with Vue.js for a dynamic user experience.
- Includes filters, customization options, and hot reloading for rapid development.
- ✏️ Modify the
generate_planning
function inapp.py
. - 🔧 Check that your constraint is well integrated and produces the desired effects.
- ✉️ Update documentation and configuration as needed.
📔 As this is a personal project tailored to meet my current needs, no formal roadmap is planned. However, one potential improvement could be the standardization of language throughout the code and comments.
Contributions are welcome! This project thrives on feedback and community input. Here’s how you can contribute:
-
Fork the Repository: Create a copy of the project under your GitHub account.
-
Make Your Changes: Work on the improvements you’d like to add. Be sure to follow the project’s coding style and guidelines.
-
Submit a Pull Request: Propose your changes by creating a pull request. Provide a clear description of your updates and the problem they solve.
- Bug Fixes: Identify and resolve issues in the existing code.
- Feature Enhancements: Add new functionalities or optimize existing ones.
- Documentation Improvements: Enhance clarity, fix errors, or update outdated content.
- Code Standardization: Help in uniformizing the language and comments in the codebase.
Contributions of all kinds are appreciated, and we’re here to support you throughout the process!
This project is licensed under the MIT License. See the LICENSE file for details.
Special thanks to the following:
The open-source community for inspiration and examples:
And you, for exploring or/and contributing to this project!
Enjoy scheduling smarter with the Schedule Optimization Project! ✨