[gecode-users] Creating a function to solve CP sub-problem instances

Nathan Horvath ngh423 at hotmail.com
Tue Sep 9 20:44:51 CEST 2014


Hi,I'm trying to implement a tabu search algorithm that involves solving small constraint programming sub-problems. Firstly, I used the examples found in the Modelling and Programming Guide to develop a script to solve an instance of a sub-problem. Now, I'm looking to expand upon this by creating a function that consumes data to solve a sub-problem, solve it using Gecode, and then return an optimal solution to the sub-problem in a some data structure.I'm having problems trying to turn my script into a callable function. Given from what I've seen in the guide, it seems like it is not possible, or it's taken as something trivial and is not glossed over, as I haven't found any similar examples after searching on-line. What I started to do was play around with the print function (same layout as in the SEND MOST MONEY examples in the guide) and try replacing it with a function that interprets the solution, but I've had no luck.One could classify my experience with Gecode and C++ as very beginner (I picked up C++ so I could use Gecode's capabilities), so I apologize if this question comes off as ignorant or out of scope. Any help would be greatly appreciated.Cheers,Nathan 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20140909/bdd50568/attachment.html>


More information about the users mailing list