I have a scheduling scenario in which every time period has a cost. I need to select the time periods which will give me the least cost over a period of 24 hours. See below for an example of the dataset.
Start time | End time | Cost
- 00:00 | 01:00 | $30
- 01:00 | 05:00 | $50
- 02:00 | 08:00 | $70
- 04:00 | 12:00 | $100
- 08:00 | 11:00 | $60
- 10:00 | 14:00 | $50
- 13:00 | 17:00 | $90
- 13:00 | 20:00 | $120
- 16:00 | 23:00 | $80
- 18:00 | 22:00 | $60
- 19:00 | 20:00 | $50
- 21:00 | 23:00 | $20
Is there any Python software or library which I can use to derive the set of time periods which gives the least cost, each time period must not overlap and they must all add up to 24 hours?