この動作中の MiniZinc コードを最適化するのを手伝ってください:
タスク: 6 つのタイムスロットがある会議があります。会議には 3 人の講演者が参加しており、それぞれ特定のスロットに参加できます。各スピーカーは、所定の数のスロットに参加します。
目的:スピーカーの終了が最も早いスケジュールを作成します。
例:スピーカー A、B & C. 通話時間 = [1, 2, 1]
スピーカーの可用性:
+---+------+------+------+
| | Sp.A | Sp.B | Sp.C |
+---+------+------+------+
| 1 | | Busy | |
| 2 | Busy | Busy | Busy |
| 3 | Busy | Busy | |
| 4 | | | |
| 5 | | | Busy |
| 6 | Busy | Busy | |
+---+------+------+------+
作業中の MiniZinc コードへのリンク: http://pastebin.com/raw.php?i=jUTaEDv0
私が最適化したいもの:
% ensure allocated slots don't overlap and the allocated slot is free for the speaker
constraint
forall(i in 1..num_speakers) (
ending_slot[i] = starting_slot[i] + app_durations[i] - 1
) /\
forall(i,j in 1..num_speakers where i < j) (
no_overlap(starting_slot[i], app_durations[i], starting_slot[j], app_durations[j])
) /\
forall(i in 1..num_speakers) (
forall(j in 1..app_durations[i]) (
starting_slot[i]+j-1 in speaker_availability[i]
)
)
;
予想される解決策:
+---+----------+----------+----------+
| | Sp.A | Sp.B | Sp.C |
+---+----------+----------+----------+
| 1 | SELECTED | Busy | |
| 2 | Busy | Busy | Busy |
| 3 | Busy | Busy | SELECTED |
| 4 | | SELECTED | |
| 5 | | SELECTED | Busy |
| 6 | Busy | Busy | |
+---+----------+----------+----------+