{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Mathematical Optimization Model for Labor Scheduling\n", "\n", "## Indices and Sets\n", "- $E$: Set of employee types (e.g., permanent, contract, temporary)\n", "- $S$: Set of shift types (e.g., usual_time, evening_shift, overtime)\n", "\n", "*We have a target date. The date is a specific order deadline and on oneday we proceed the whole task of one day, and goes no further than 1 day order amount.\n", "\n", "## Parameters\n", "- $h_s$: Hours per shift type $s$\n", "- $m_e$: Productivity per hour for employee type $e$ \n", " + Some employee type / work type have more/less than 1 hour productivity unit)\n", "- $c_{e,s}$: Cost per hour for employee type $e$ in shift type $s$\n", "- $L$: Total unit productivity required\n", "- $A_e$: Number of available employees of type $e$\n", "\n", "## Decision Variables\n", "- $x_{e,s} \\in \\mathbb{Z}_{\\geq 0}$: Number of employees of type $e$ assigned to shift type $s$\n", " + $e$ : regular, temporary.. etc. \n", " + $s$ : work hour type (evening shift, regular, late hour). \n", " + Based on the employee type and work hour type, the productivity per hour and cost per hour differs\n", "\n", "---\n", "\n", "## Objective Function\n", "\n", "Minimize total labor cost:\n", "\n", "$$\n", "\\min \\sum_{e \\in E} \\sum_{s \\in S} x_{e,s} \\cdot h_s \\cdot c_{e,s}\n", "$$\n", "\n", "---\n", "\n", "## Constraints\n", "\n", "1. **Labor Demand Satisfaction**\n", "\n", "Ensure the total unit productivity covers the required total productivity:\n", "\n", "$$\n", "\\sum_{e \\in E} \\sum_{s \\in S} x_{e,s} \\cdot h_s \\cdot m_e \\geq L\n", "$$\n", "\n", "2. **Employee Availability**\n", "\n", "- Usual and evening shift is a discrete work type\n", " + Those who come in the usual cannot work during the evening shift\n", "\n", "$$\n", "x_{e,\\text{usual}} + x_{e,\\text{evening}} \\leq A_e \\quad \\forall e \\in E\n", "$$\n", "\n", "3. **Overtime Limitation**\n", "\n", "Overtime must not exceed regular shift assignments. \n", "\n", "(Because one who works overtime must work during the regular shift)\n", "\n", "$$\n", "x_{e,\\text{overtime}} \\leq x_{e,\\text{usual}} \\quad \\forall e \\in E\n", "$$\n", "\n", "4. **Non-negativity and Integrality**\n", "\n", "All decision variables must be non-negative integers:\n", "\n", "$$\n", "x_{e,s} \\in \\mathbb{Z}_{\\geq 0} \\quad \\forall e \\in E, s \\in S\n", "$$" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.7" } }, "nbformat": 4, "nbformat_minor": 2 }