0% found this document useful (0 votes)
20 views12 pages

Restricted Optimization - 05.05.25

The document outlines a restricted optimization model for managing branches, cars, employees, and villas, detailing sets, parameters, decision variables, objective functions, and constraints. It aims to optimize employee assignments, minimize car usage, and reduce operational costs while adhering to staffing and scheduling regulations. Key constraints include limits on understaffing, employee work hours, and vehicle assignments for deliveries versus employee transport.

Uploaded by

Chandan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views12 pages

Restricted Optimization - 05.05.25

The document outlines a restricted optimization model for managing branches, cars, employees, and villas, detailing sets, parameters, decision variables, objective functions, and constraints. It aims to optimize employee assignments, minimize car usage, and reduce operational costs while adhering to staffing and scheduling regulations. Key constraints include limits on understaffing, employee work hours, and vehicle assignments for deliveries versus employee transport.

Uploaded by

Chandan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Restricted Optimization

Sets

𝐵: Set of branches

B′: Set of branches excluding the current branch

𝑐 ∈ 𝐶: Represent a specific car

𝐶: Set of cars

D: Set of days in a week

𝐸: Set of employees

H: Set of discrete time slots (hours a day), indexed by h

𝑛 ∈ 𝐸: Represent an individual employee

𝑡∈𝑇: Set of time slots (e.g., hours, days)

T: Time slots

V: Set of Villas

Sub- notations for sets

b: Specific branch

b’: Other branches

c: Capacity

d: Specific day

e: Any employee

h: Specific time slot

i: Initial location

j: Final location
n: Number

o: Other national employee

p: Cost

s: Saudi national employee

v: Specific villa

Parameters

𝐶𝑏 ′ 5 : Number of cars available at branch b’ of capacity 5

𝐶𝑏 ′ 7 : Number of cars available at branch b’ of capacity 7

𝐶𝑏5: Number of cars available at branch b of capacity 5

𝐶𝑏7: Number of cars available at branch b of capacity 7

Cc : The capacity of the car 𝑐

𝐶𝑣5 : Number of cars available at Villa v of capacity 5

𝐶𝑣7 : Number of cars available at Villa v of capacity 7

𝐷𝑏′𝑏 : Distance (in km) from branch b’ to branch b

[𝐷𝑏ℎ ]: Delivery cars matrix

𝐷𝑐 : 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

𝐷𝑣𝑏 : Distance (in km) from villa v to branch b

𝐹𝑝 : The Fixed cost of car 𝑐 per hour/km

𝐻𝑒𝑛𝑑 : Last hour of the workday

𝐻𝑝 : Hiring cost for employee

𝐿𝑛 : 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 𝑡

𝑁𝐵 : Total number of branches

𝑁𝐶5 : Total number of cars with capacity 5

𝑁𝐶7 : Total number of cars with capacity 7

𝑁𝐸 : Total number of employees

𝑁𝑉 : Total number of villas

𝑂𝑀𝑎𝑥 : Maximum overtime per employee

𝑂𝑛 : The cost of overtime per hour for employee 𝑛

𝑃𝑣 : Number of employees residing in villa v

𝑅𝑏𝑡 : Required number of staff at branch 𝑏 during time 𝑡

𝑅𝑀𝑖𝑛 : Minimum rest time required between shifts

𝑅𝑜𝑏𝑑ℎ : Minimum other national employees required at branch b on day d at hour h

𝑅𝑝 : Cost of renting a new car

𝑅𝑠𝑏𝑑ℎ : Minimum Saudi national employees required at branch b on day d at hour h

𝑆𝑏ℎ : Number of employees required at branch b at hour h

𝑆jh : Start of shift at destination j, when employees must be present

𝑆𝑛 : The cost of employing employee 𝑛 per hour

𝑇𝑏′𝑏 : Travel time (in minutes) from branch b’ to branch b

[𝑇𝑖𝑗 ] : Travel time matrix

𝑇𝑣𝑏 : Travel time (in minutes) from villa v to branch b

𝑈𝑀𝑎𝑥 : Maximum allowable understaffing duration

𝑊𝑀𝑎𝑥 : Maximum work hours per employee per day

𝑊𝑀𝑖𝑛 : Minimum work hours per employee per day


Decision Variables

𝐴𝑐𝑣𝑏ℎ ∈ { 0 , 1 }: 1 if car c moves from villa v to branch b at hour h, 0 otherwise

𝐵𝑐𝑏𝑣ℎ ∈ { 0 , 1 }: 1 if car c moves from branch b to villa v at hour h, 0 otherwise

𝐷𝑐𝑏𝑏′ℎ ∈ { 0 , 1 }: 1 if car c moves from branch b to branch b′ at hour h, 0 otherwise

𝐷𝑐𝑏𝑡 ∈ { 0 , 1 }: 1 if car c is assigned at delivery at branch 𝑏 at time 𝑡, otherwise 0

𝑑𝑐𝑡 ∈ 𝑅 + : Drop-off time for car 𝑐 at time 𝑡

𝑒𝑛 ∈ { 0 , 1 }: 1 if employee 𝑛 is hired, otherwise 0

𝐹𝑒𝑏′ 𝑡 ≥ 0 : Number of employees free at branch b′ at time t

𝐿𝑐𝑏ℎ ∈ { 0 , 1 }: 1 if car c is at branch b at hour h, 0 otherwise

𝐿𝑐𝑣ℎ ∈ { 0 , 1 }: 1 if car c is at villa v at hour h, 0 otherwise

𝑝𝑐𝑡 ∈ 𝑅 + : Pickup time for car 𝑐 at time 𝑡

𝑆𝑐𝑏ℎ ∈ { 0 , 1 }: 1 if car c stops at branch b at hour h, 0 otherwise

𝑡𝑐𝑡 ∈ 𝑅 + : Travel time per employee per trip.

𝑈𝑏𝑑ℎ ≥ 0 : Understaffing at branch b on day d at hour h

𝑈𝑐ℎ ∈ { 0 , 1 }: 1 if car c is used at hour h, 0 otherwise

𝑣𝑛 ∈ { 0 , 1 }: 1 if car 𝑛 is rented; otherwise, 0

𝑊𝑒𝑏𝑏′ℎ ∈ { 0 , 1 }: 1 if employee e travels from branch b to branch b′ at hour h, 0 otherwise

𝑤𝑛𝑡 ≥ 0 : Number of overtime hours for employee 𝑛 during time 𝑡

𝑥𝑏𝑛𝑡 : total employees assigned at branch b at the time t

𝑥𝑏𝑛𝑡𝐹 ∈ { 0 , 1 }: 1 if employee 𝑛 is other national employee, on Friday

𝑥𝑜𝑏𝑛𝑡 ∈ { 0 , 1 }: 1 if employee 𝑛 is other national employee

𝑥𝑠𝑏𝑛𝑡 ∈ { 0 , 1 }: 1 if employee 𝑛 is a Saudi national employee


𝑌𝑏𝑏′𝑡 ≥ 0 : Number of employees travelling from branch b to branch b′ at time t

𝑦𝑏𝑛𝑡 ∈ { 0 , 1 }: 1 if car 𝑐 is assigned to employee 𝑛 at time 𝑡, otherwise 0

𝑌𝑏𝑣𝑡 ≥ 0 : Number of employees travelling from branch b to villa v at time t

𝑌𝑐𝑏𝑡 ∈ { 0 , 1 }: 1 If car c is assigned for employee transport at time h.

𝑌𝑐𝑣𝑏 𝑏′𝑣 : Complete trip of car moving from villa v to branch b to branch b’ to villa v again

𝑌𝑒𝑣𝑏ℎ ∈ { 0 , 1 }: 1 if employee e travels from villa v to branch b at hour h, 0 otherwise

𝑌𝑣𝑏𝑡 ≥ 0 : Number of employees travelling from villa v to branch b at time t

𝑍𝑒𝑣𝑏ℎ ∈ { 0 , 1 }: 1 if employee e travels from branch b to villa v at hour h, 0 otherwise


Objective Functions:

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

∑ 𝑌𝑐𝑣𝑏𝑏′𝑣 = 𝑀𝑖𝑛 ( ∑ ∑ ( 𝑈𝑐ℎ + ∑ 𝐴𝑐𝑣𝑏ℎ + ∑ 𝐷𝑐𝑏𝑏′ ℎ + ∑ 𝐵𝑐𝑏𝑣ℎ ))


𝑣∈𝑉 ℎ∈𝐻𝑐∈𝐶 𝑣∈𝑉 𝑏 ′ ∈𝐵 𝑏 ′ ∈𝐵

• This objective function is tied to reducing unnecessary villa-to-branch trips


• It discourages excessive inter-branch transfers
• Also, ensures that trips back to the villas are controlled and optimised

Equation 3: The goal is to minimise the overall Operations cost

𝑇𝑜𝑡𝑎𝑙 𝑐𝑜𝑠𝑡 = 𝑀𝑖𝑛 ( ∑ ∑ (𝑆𝑛 × ∑ 𝑥𝑏𝑛𝑡 ) + (𝑂𝑛 × 𝑤𝑛𝑡 ) + ∑ 𝐹𝑐 × 𝑦𝑏𝑛𝑡 +( 𝐷𝑐 × 𝐶𝑘𝑚𝑐 ) )


𝑛∈𝐸𝑡∈𝑇 𝑏∈𝐵 𝑐∈𝐶

Where, 𝑇𝑜𝑡𝑎𝑙 𝑐𝑜𝑠𝑡 = 𝑀𝑖𝑛 (𝑆𝑡𝑎𝑓𝑓 𝑐𝑜𝑠𝑡 + 𝑇𝑟𝑎𝑛𝑠𝑝𝑜𝑟𝑡𝑎𝑡𝑖𝑜𝑛 𝑐𝑜𝑠𝑡)


Constraints

1. Ensures understaffing of only 1 employee is allowed for 1 hour maximum

𝑈𝑏𝑡  1

2. No consecutive hour understaffing is allowed

𝑈𝑏𝑡 + 𝑈𝑏(𝑡+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

6. At least 1 employee must be assigned per hour per branch

∑ 𝑋𝑛𝑏𝑡 ≥ 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

10. Maximum overtime per employee

∑ 𝑥𝑏𝑛𝑡 − 𝑊𝑚𝑖𝑛  𝑂𝑀𝑎𝑥


b,t

11. The number of employees travelling cannot exceed the villa capacity

∑ 𝑌𝑏𝑣𝑡  𝑃𝑣
v,t

12. Each car can transport 5 or 7 employees

∑ 𝑌𝑣𝑏𝑡 = 5𝐶𝑣5 + 7𝐶𝑣7


v,b,t

∑ 𝑌𝑏𝑏′ 𝑡 = 5𝐶𝑏5 + 7𝐶𝑏7


v,b,t

∑ 𝑌𝑏𝑣𝑡 = 5𝐶𝑏5 + 7𝐶𝑏7


v,b,t
13. Employees will only be reassigned if they can reach the new branch within a reasonable time frame

𝐹𝑒b′ (t−1) = 𝑋𝑒b′ (t−1)


If, 𝑇b′ b  𝐴𝑣𝑎𝑖𝑙𝑎𝑏𝑙𝑒 𝑇𝑖𝑚𝑒

14. Ensures the number of employees assigned at a branch is within the required range

𝑅𝑏𝑡  ∑ 𝑥𝑏𝑛𝑡
n∈E

Where, 𝑀𝑏𝑡 , should be minimised i.e. 𝑀𝑖𝑛(𝑀𝑏𝑡 )

15. Ensures employees have a minimum rest period between consecutive shifts

𝑝𝑐𝑡 − 𝑑𝑐(𝑡−1) ≥ 𝑅𝑛

16. Restricts overtime within permissible limits

𝑤𝑛𝑡  𝑂𝑚𝑎𝑥

17. Ensures no more employees are assigned to a car, more than its seating capacity

∑ 𝑦𝑏𝑛𝑡  5𝑁𝐶5 + 7𝑁𝐶7


n∈E

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

20. Enforcing car location continuity

𝐿𝑐𝑣ℎ = (1,0)

21. Ensures correct tracking of car locations

𝐿𝑐𝑏ℎ = 𝐿𝑐𝑏(ℎ−1) + ∑ 𝐴𝑐𝑣𝑏(ℎ−1) + ∑ 𝐷𝑐𝑏′ 𝑏(ℎ−1) − ∑ 𝐷𝑐b𝑏′ (ℎ−1) − 𝐵𝑐𝑏𝑣(ℎ−1)


v∈𝑉 𝑏 ′ ∈𝐵 𝑏 ′ ∈𝐵

𝐿𝑐𝑣ℎ = 𝐿𝑐𝑣(ℎ−1) + ∑ 𝐵𝑐𝑏𝑣(ℎ−1) − ∑ 𝐴𝑐𝑣𝑏(ℎ−1)


b∈𝐵 b∈𝐵

22. Ensures correct tracking of employee locations

𝑋𝑐𝑏ℎ = 𝑋𝑐𝑏(ℎ−1) + ∑ 𝐴𝑐𝑣𝑏(ℎ−1) + ∑ 𝐷𝑐𝑏′ 𝑏(ℎ−1) − ∑ 𝐷𝑐b𝑏′(ℎ−1) − 𝐵𝑐𝑏𝑣(ℎ−1)


v∈𝑉 𝑏 ′ ∈𝐵 𝑏 ′ ∈𝐵

𝑋𝑐𝑣ℎ = 𝑋𝑐𝑣(ℎ−1) + ∑ 𝐵𝑐𝑏𝑣(ℎ−1) − ∑ 𝐴𝑐𝑣𝑏(ℎ−1)


b∈𝐵 b∈𝐵

23. A car can only move to another branch if it has stopped at the current branch

∑ 𝐷𝑐𝑏𝑏′ (ℎ−1)  𝑆𝑐𝑏ℎ


𝑏 ′ ∈𝐵
24. A car is used only if it moves

𝐴𝑐𝑣𝑏ℎ + 𝐵𝑐𝑏𝑣ℎ + 𝐷𝑐𝑏𝑏′ ℎ  𝑈𝑐ℎ

∑ 𝑌𝑒𝑣𝑏ℎ  ∑ 𝐶𝐶 𝐴𝑐𝑣𝑏ℎ
e∈𝐸 c∈𝐶

∑ 𝑍𝑒𝑣𝑏ℎ  ∑ 𝐶𝐶 𝐵𝑐𝑏𝑣ℎ
e∈𝐸 c∈𝐶

25. Ensures cars are only used if needed to transport employees

∑ 𝑊𝑒𝑏𝑏′ℎ + ∑ 𝑍𝑒𝑣𝑏ℎ + ∑ 𝑌𝑒𝑣𝑏ℎ  𝐶𝐶 (∑ 𝐴𝑐𝑣𝑏ℎ + ∑ 𝐵𝑐𝑏vℎ + ∑ 𝐷𝑐𝑏𝑏′ ℎ )


e∈𝐸 e∈𝐸 e∈𝐸 c∈𝐶 c∈𝐶 c∈𝐶

26. Ensures every car returns to a villa at the end of the day

∑ 𝐵𝑐𝑏𝑣𝐻 = 1
b∈𝐵

27. Car flow conservation

∑ 𝐴𝑐𝑣𝑏ℎ + ∑ 𝐷𝑐𝑏𝑏′ ℎ + 𝐵𝑐𝑏𝑣ℎ  1


v∈𝑉 𝑏 ′ ∈𝐵

28. Trip optimisation (to minimise employee time-on-road)

∑ 𝐴𝑐𝑣𝑏ℎ + 𝐵𝑐𝑏𝑣ℎ + 𝐷𝑐𝑏𝑏′ ℎ  minimum required trips


h∈𝐻

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’.

𝐷cijh + 𝑇𝑐𝑖𝑗ℎ  𝑆jh′


30. Travel time between i & j can be obtained from time matrix
𝑇𝑐𝑖𝑗ℎ  [𝑇i,j ]

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,

(𝑝ct ) − (𝑑c′t′ ) ≥ 2 + 𝑇𝑣𝑏′ + 𝑇𝑏𝑣

You might also like