Restricted Optimization - 05.05.25
Restricted Optimization - 05.05.25
Sets
𝐵: Set of branches
𝐶: Set of cars
𝐸: Set of employees
T: Time slots
V: Set of Villas
b: Specific branch
c: Capacity
d: Specific day
e: Any employee
i: Initial location
j: Final location
n: Number
p: Cost
v: Specific villa
Parameters
𝐷𝑐 : The total distance kilometres travelled by each car (in terms of time)
𝐷cijh : Time at which car c leaves branch i, for branch j, for shift h
𝐿𝑛 : Maximum allowed deviation for trip times from the direct route for an employee 𝑛
𝑀𝑏𝑡 : Maximum number of employees that can be assigned to branch 𝑏 at time 𝑡
𝑌𝑐𝑣𝑏 𝑏′𝑣 : Complete trip of car moving from villa v to branch b to branch b’ to villa v again
Equation 1: The goal is to ensure the optimum number of employees is assigned at each branch
∑ 𝑋𝑏𝑛𝑡 = 𝑀𝑎𝑥(1, 𝑀𝑖𝑛(𝑅𝑜𝑏𝑑ℎ + 𝑅𝑠𝑏𝑑ℎ , 𝑃𝑣𝑡 + ∑ 𝐹𝑒𝑏′ 𝑡 , 5𝐶𝑣5 + 7𝐶𝑣7 , 𝑊𝑚𝑎𝑥 − ∑ 𝑋𝑏𝑛(𝑡−1) , 𝑊𝑀𝑖𝑛
𝑏,𝑡 𝑏 ′ ≠𝑏 𝑏,𝑡
+ 𝑈𝑚𝑎𝑥 ))
• This objective function ensures that at least one employee is always assigned at any specific branch
during working hours
• It also ensures that employees are available in the villas after a previous shift
• It ensures that employees’ work hours do not exceed, considering (maximum work hours +
reasonable understaffing).
• Only available employees (villas + branches) should be considered for the next assessment
∑ 𝑋𝑏𝑛𝑡𝐹 = 𝑀𝑎𝑥(1, 𝑀𝑖𝑛(𝑅𝑜𝑏𝑑ℎ , 𝑃𝑣𝑡 + ∑ 𝐹𝑒𝑏′ 𝑡 , 5𝐶𝑣5 + 7𝐶𝑣7 , 𝑊𝑚𝑎𝑥 − ∑ 𝑋𝑏𝑛(𝑡−1) , 𝑊𝑀𝑖𝑛 + 𝑈𝑚𝑎𝑥 ))
𝑏,𝑡 𝑏 ′ ≠𝑏 𝑏,𝑡
Equation 2: The goal is to minimise the number of cars used over time
𝑈𝑏𝑡 1
𝑈𝑏𝑡 + 𝑈𝑏(𝑡+1) 1
3. A car assigned for delivery cannot be used for employee transport at the same time
𝐷𝑐𝑏𝑡 + 𝑌𝑐𝑏𝑡 1
4. Ensure the required number of cars are assigned for delivery at each branch that requires it
∑ 𝐷𝑐𝑏𝑡 = [𝐷 𝑏,ℎ ]
n∈E
5. A car assigned for delivery must be present at the branch before the delivery time starts:
∑ 𝑃𝑐𝑏(𝑡−1) = 1 ,
n∈E
For, 𝐷𝑐𝑏𝑡 = 1
∑ 𝑋𝑛𝑏𝑡 ≥ 1
n∈E
7. Employees must work between 9 to 13 hours per day
9 ∑ 𝑥𝑜𝑏𝑛𝑡 13
b,t
∑ 𝑥𝑠𝑏𝑛𝑡 = 9
b,t
8. Only other employees will be assigned on Friday. i.e. Saudi employees will have extra leave on Friday.
i.e.
∑ 𝑋𝑏𝑛𝑡𝐹 = 𝑀𝑎𝑥(1, 𝑀𝑖𝑛(𝑅𝑜𝑏𝑑ℎ , 𝑃𝑣𝑡 + ∑ 𝐹𝑒𝑏′ 𝑡 , 5𝐶𝑣5 + 7𝐶𝑣7 , 𝑊𝑚𝑎𝑥 − ∑ 𝑋𝑏𝑛(𝑡−1) , 𝑊𝑀𝑖𝑛 + 𝑈𝑚𝑎𝑥 ))
𝑏,𝑡 𝑏 ′ ≠𝑏 𝑏,𝑡
9. Employees must rest at least 9 hours between shifts (to maximise employee wellbeing)
𝑋𝑏𝑛𝑡 + 𝑋𝑏𝑛𝑡+𝑅𝑀𝑖𝑛 9
11. The number of employees travelling cannot exceed the villa capacity
∑ 𝑌𝑏𝑣𝑡 𝑃𝑣
v,t
14. Ensures the number of employees assigned at a branch is within the required range
𝑅𝑏𝑡 ∑ 𝑥𝑏𝑛𝑡
n∈E
15. Ensures employees have a minimum rest period between consecutive shifts
𝑝𝑐𝑡 − 𝑑𝑐(𝑡−1) ≥ 𝑅𝑛
𝑤𝑛𝑡 𝑂𝑚𝑎𝑥
17. Ensures no more employees are assigned to a car, more than its seating capacity
18. Computes the total travel distance for each car, contributing to transportation costs
𝐷𝑐 = ∑ 𝑃𝑘𝑚 . 𝑑𝑐𝑡
b,t
19. Each car must start at a villa at the beginning of the day
𝐿𝑐𝑣0 = 1
𝐿𝑐𝑣ℎ = (1,0)
23. A car can only move to another branch if it has stopped at the current branch
∑ 𝑌𝑒𝑣𝑏ℎ ∑ 𝐶𝐶 𝐴𝑐𝑣𝑏ℎ
e∈𝐸 c∈𝐶
∑ 𝑍𝑒𝑣𝑏ℎ ∑ 𝐶𝐶 𝐵𝑐𝑏𝑣ℎ
e∈𝐸 c∈𝐶
26. Ensures every car returns to a villa at the end of the day
∑ 𝐵𝑐𝑏𝑣𝐻 = 1
b∈𝐵
29. Departure time at branch I of car c for branch j at hour h will be less than OR equal Travel time between
i & j at hour h less than to the start of shift at j at hour h’.
31. Ensures that employee n is assigned at branch b’ (who was working at branch b before), only if travel
time permits.
If 𝑋𝑏𝑛𝑡 = 1, then 𝑋𝑏′ 𝑛𝑡′=1 only if 𝑇bb′ (𝑡 ′ − t)
32. Ensuring broken shift has at least 2 hours of rest time at the villa
If,
∑ 𝑥𝑜𝑏𝑛𝑡 13
n∈E
∑ 𝑥𝑠𝑏𝑛𝑡 9
n∈E
Then,