I am a working student in a logistics company. I hope that I can find solutions to the following problem in this forum. I have been provided with a table of transportation processes. The transportation processes take between 24 hours and 120 hours. The data set provided only contains gross times (process times including non-working time and weekends), which leads to a certain degree of imprecision. I would like to calculate the net times in my Python script. I know that the Pytorch module can be used to display working times on a daily basis. Is it possible to store a calendar over several weeks, which shows working days and working times (e.g. Monday-Friday 07:00am-10:00pm) as well as weekends?
My raw data includes the start and end time of the transportation process (dd/mm/yyyy/hh/mm/ss) and the duration in hours (hh/mm/ss).
I would be pleased if you could help with possible solutions.
Greetings, Robin
Please finf attached the rawdata und the calender to be used to calculate the processtime excl. weekend and offtime.
Rawdata (transpor times)
start time | end time | duration | vehicle |
---|---|---|---|
23/05/2024 22:31:00 | 27/05/2024 22:00:00 | 95.48h | Vehicle#1 |
28/05/2024 13:24:00 | 29/05/2024 21:19:00 | 31.92h | Vehicle#1 |
Calendar
working time | end time |
---|---|
20/05/2024 07:00:00 | 20/05/2024 22:00:00 |
21/05/2024 07:00:00 | 20/05/2024 22:00:00 |
22/05/2024 07:00:00 | 20/05/2024 22:00:00 |
23/05/2024 07:00:00 | 20/05/2024 22:00:00 |
24/05/2024 07:00:00 | 20/05/2024 22:00:00 |
27/05/2024 07:00:00 | 20/05/2024 22:00:00 |
28/05/2024 07:00:00 | 20/05/2024 22:00:00 |
29/05/2024 07:00:00 | 20/05/2024 22:00:00 |
A solution to solve the above mentioned challenge.
user26344691 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.