英文:
How to calculate breaks and stops in Chained through time pattern
问题
在TimeFold文档中,我看到了连续规划的设计模式。我看到了一个时间表的示例,并想知道在解决方案中如何考虑睡眠时间或额外工作时间。timefold示例
是否有实现这个模式的代码示例?
休息时间是在更新时间以到达阴影变量的监听器时计算的吗?
英文:
I saw in the TimeFold documentation the design pattern to do continuous planning. I have seen an example of a schedule and would like to know how sleeping time or extra working time is taken into account in the resolution. timefold example
There is an example of code that implements this pattern ?
Are the breaks calculated at the time of the update of the time to arrive in the listener of the shadow variable ?
答案1
得分: 0
这是在到达时间和/或出发时间计算的VariableListener中完成的。
基本上:
- 如果服务持续时间超过17:00,它将从第二天的9:00继续(有时会再次添加从车辆回家的行程时间)。
- 如果旅行持续时间超过17:00,他们会回家,然后第二天从家出发前往新的访问地点。
英文:
It's done in the VariableListener of the arrival time and/or departure time calculcation.
Basically:
- If the service duration passes 17:00, it continues from 9:00 the next day (sometimes adding the travel time from vehicle home again).
- If the travel duration passes 17:00, they drive home instead and start the next day from home to the new visit.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论