Hi, Not really knowing the details, I think this looks like a feasible plan even though it all depends on whether the second point in your list is sufficiently easy to do.
Cheers Christian -- Christian Schulte, Professor of Computer Science, KTH, www.ict.kth.se/~cschulte/ -----Original Message----- From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of Philippe Sent: Wednesday, October 16, 2013 11:04 AM To: users@gecode.org Subject: Re: [gecode-users] Stability of a solution Hi Christian, Thank you very much for your help. Even if your solution is the one I had in mind, I'm not sure that we have the same assumptions : The constraints remains the same (for instance "allocate some task to device", "A task cannot be allocated more than once", ...) but the domain of the variables change (for instance, the priority of a task, the duration of a task) that's what I call "minor changes of the problem". but I can also have new tasks, removed tasks. In that case, the changes are not so minor. However, I was thinking about a solution similar to yours : - find the best task's affectations of the new problem - Once done, do the same but add the constraint that "the task's affectation to optimize must be the same than the one found in the old problem" - check if the space fails. If not, retrieve the cost. So, here is the pseudo code : ----------------------------- // First, find the new task affectation TaskAff * taskAff = new TaskAff(tasks, priorities, durations); BAB<TaskAff> search_engine(taskAff, opt); delete taskAff; while(TaskAff *taskAff = search_engine.next()) { taskAff->get_solution(affectations); delete taskAff; } // second, do the same but with a new constraint "affectations = previous_aff" // TaskAff * taskAff = new TaskAff(tasks, priorities, durations, previous_aff); If (! taskAff->failed()) { taskAff->get_cost(); delete taskAff; } Are we ok ? Cheers, Philippe _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users