[gecode-users] Stability of a solution

Philippe aqwzsxaqwzsx at orange.fr
Wed Oct 16 11:04:20 CEST 2013


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
                              




More information about the users mailing list