Constraint Programming: Scheduling speakers in shortest time

后端 未结 2 1111
情深已故
情深已故 2021-01-16 07:34

I\'m trying to adapt an already solved constraint programming problem by Hakan Kjellerstrand (@hakankless) and could do with some help please.

Original s

2条回答
  •  误落风尘
    2021-01-16 07:52

    This is turning your satisfaction problem into an optimisation problem. That is, it is not enough to find a solution anymore, you want the optimal one. So for the MiniZinc model, you would need to change

    solve :: int_search(x, first_fail, indomain_min, complete) satisfy;
    

    to something like

    solve :: int_search(x, first_fail, indomain_min, complete) minimize max(x);
    

    to minimize the largest allocated time.

提交回复
热议问题