Hi,
Sorry for the delay – summer holidays… I think you will have to implement a brancher yourself, as described in Part B of MPG. However, if you already know the order in which you want to branch (your example suggests that)( you can do the following which is not super-efficient but should work: for (int i=0; i≤ maxtasks; i++) { branch(*this, QuantityTask[i], INT_VAL_MIN()); assign(*this, WorkTimeTask[i], SET_ASSIGN_MIN_INC()); } This creates a whole bunch of branchers run in order of creation, please read Section 8.1. Cheers Christian -- Christian Schulte, www.gecode.org/~schulte Professor of Computer Science, KTH, <mailto:cschu...@kth.se> cschu...@kth.se Expert Researcher, SICS, <mailto:cschu...@sics.se> cschu...@sics.se From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of Wu Shaowei Sent: Friday, July 29, 2016 12:18 To: users@gecode.org Subject: [gecode-users] scheduling problem, tow branchers, order of branching Hi to everyone on the ML, I am working on a scheduling problem,I have two variable array: IntVarArray QuantityTask; SetVarArray WorkTimeTask; ant two branchers: branch(*this,QuantityTask,INT_VAR_NONE(),INT_VAL_MIN()); assign(*this,WorkTimeTask,SET_ASSIGN_MIN_INC()); Asume I have 2 tasks, Gecode's default enumration order is: (branch)QuantityTask[0]-->(branch)QuantityTask[1]-->(assign)WorkTimeTak[0]-->(assign)WorkTimeTask[1], how can I achieve this: (branch)QuantityTask[0]-->(assign)WorkTimeTak[0]-->(branch)QuantityTask[1]-->(assign)WorkTimeTask[1] I have read MPG 8.14 Executing code between branchers, and http://www.gecode.org/pipermail/users/2015-April/004669.html, but has not a clue. Thank you! Best, Wu Shaowei
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users