Daniel, Tentative values in the repair library should be able to handle your problem. Alternatively, you can do the search not on a list of variables, but on a list of terms(Id,Var) where Id is an id (say a number), identifying the problem variable, and Var is the variable itself. You can then lookup the old value under the id. This will handle dynamic variable selection as well. Cheers Helmut 4C, University College Cork, Ireland -----Original Message----- From: eclipse-users-bounces+h.simonis=4c.ucc.ie_at_...2... [mailto:eclipse-users-bounces+h.simonis=4c.ucc.ie_at_...2...] On Behalf Of Daniel Lucraft Sent: 21 February 2008 10:07 To: eclipse-users_at_...2... Subject: [eclipse-users] How to remember last variable value and then choose in search Hi If anyone could help me it would be much appreciated. I'm solving a problem repeatedly using Ic. I'd like to remember the previous solution, and then write a 'choice' predicate I can pass to search that begins by choosing the value from the previous solution. Hopefully that will speed things up. Not sure how to do this. After the search has completed, the program backtracks, uninstantiating the solution variables, before applying a new constraint and re-solving. So I suppose I need to save the result in nonlogical storage, but how to look up the value when all the choice predicate gets given is the variable? thanks, Dan ____________________________ Daniel Lucraft Imperial College London _______________________________________________ ECLiPSe-Users mailing list ECLiPSe-Users_at_...2... http://www.crosscoreop.com/mailman/options/eclipse-usersReceived on Thu Feb 21 2008 - 10:44:58 CET
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST