Arne Ruban wrote: > > Ladies and Gentlemen, > > as part of my dissertation thesis, I am currently working on a job > scheduling problem where I am at least exclusively using lists and labeling > in a minimization [minimize()] with the fd-library. > > The minimization gives in the first step(s) a solution (evtl. after several > search steps) wich is often not the best. The solver asks, if more > solutions are required (more;). When I am calling my solve-clause with > fail, I can clearly see, that the solver finds the best solution. But what > do I have to do, that the solve leads directly to the minimal soloution > without bein interupted (;) in a lokal optimum? Apparently your code is making choices outside the minimize-goal. Remember the standard structure of a constraint optimization program: main :- setup_constraints(Variables, Cost), minimize(search(Variables), Cost). The setup_constraints-part should not make any nondeterministic choices. When you run it on its own, e.g. ?- setup_constraints(Variables, Cost). it should succeed without asking for 'more'. It will usually create lots of delayed goals. When you then run ?- setup_constraints(Variables, Cost), search(Variables). this should compute one solution at a time, and ask for 'more', until all solutions have been found. To find the best solution, you wrap the nondeterministic part (the search) into a minimize: ?- setup_constraints(Variables, Cost), minimize(search(Variables), Cost). This will succeed with the best solution and not ask for 'more'. -- Joachim Schimpf / phone: +44 20 7594 8187 IC-Parc / mailto:J.Schimpf@imperial.ac.uk Imperial College London / http://www.icparc.ic.ac.uk/eclipseReceived on Fri Jul 11 12:52:31 2003
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:23 PM GMT GMT