与optaplanner的连续时期 [英] Consecutives periods with optaplanner

查看:68
本文介绍了与optaplanner的连续时期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经针对我的计划问题调整了课程时间安排示例...但是我不知道如何确保连续或相邻时段.我的日程计划包含一些活动,每个活动的持续时间都已转换为期间.例如...一个活动大约是120分钟,而时间段大约是30分钟,所以我创建了4个SlotActivities.这种方法似乎很容易使活动适应不同的时期....但是我找不到一种简单的方法来确保所有这些slotActivity必须是连续的.关于如何实现这一点的任何想法?

I've adapted the course time scheduling sample for my planning issue...but I don't know how to assure consecutives or adjacents periods. My schedule plan has activities, each of them with a duration that I have translated to periods. For instance....one activity that is about 120 minutes, and the timeslot is about 30minutes, so I create 4 SlotActivities. This way seems easy to adapt an activity to the different periods....but I don't find an easy way to assure that all these slotactivities must be consecutives. Any idea about how to achieve this?

提前谢谢!!

推荐答案

如果是一个严格的约束条件,我不会在30分钟的4个时段内将其拆分,而是使用1个Activity和一个startingSlot(=计划变量)),持续4个周期.

If it's a hard constraint, I wouldn't split it up in 4 periods of 30 minutes, but instead would have 1 Activity with a startingSlot (= planning variable) and a duration of 4 periods.

如果这是一个软约束,我会像课程表调度示例(IIRC)中的类似约束那样做.

If it's a soft constraint, I 'd do it like the similar constraint in the curriculum course scheduling example (IIRC).

这篇关于与optaplanner的连续时期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆