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_crosscoreop.com [mailto:eclipse-users-bounces+h.simonis=4c.ucc.ie_at_crosscoreop.com] On Behalf Of Daniel Lucraft Sent: 21 February 2008 10:07 To: eclipse-users_at_crosscoreop.com 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_crosscoreop.com http://www.crosscoreop.com/mailman/options/eclipse-usersReceived on Thu Feb 21 2008 - 10:44:58 CET
This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET