0

I have a linear model that works fine but has a huge amount of time of resolution that I want to reduce. One approach is that I convert it to constraint programming. Supposing that I have a specific task that requires 5 hours of working. For instance there are a lot of possibility to allocate energy: I can perform 5 hours and I finish the task in one day or perform 2.5 hours a day and finish in 2 days. Suppose we admit at max this task can be interrupted once such that either we allocate hours until final day or allocate 1 hours for example and then come back after 3 days of break (no allocated energy there) to allocate the rest of required energy on all the consecutive coming days after the break

Can anyone suggest me some logic how to do it in the compact form using constraint programming? I don't mind if the solution is cplex of minizinc

Ali Fradi
  • 110
  • 1
  • 10
  • 1
    Have a good look at the CP stuff in CPLEX (aka CPO). There is a **lot** of stuff built-in already for handling tasks or activities that cover a span of time and consume or produce resources. These 'interval variables' allow for periods of inactivity too. Or you can split them into multiple non-overlapping intervals that sum to the desired total duration or whatever. See https://www.ibm.com/docs/en/icos/22.1.1?topic=optimizer-cp-users-manual especially the stuff on scheduling. – TimChippingtonDerrick Mar 05 '23 at 18:25
  • This question https://stackoverflow.com/questions/69890220/could-this-cp-sat-model-be-faster was about a scheduling problem where the activities could be split into multiple sessions or not, maybe you can get some tips from it. – Christopher Hamkins Mar 07 '23 at 09:24

0 Answers0