Hi,
The setup is that a script must be a sub-class of Gecode::Space. However, you can pass these objects around, so I do not really see where the problem is, sorry. Cheers Christian -- Christian Schulte, Professor of Computer Science, KTH, www.gecode.org/~schulte/ From: users-boun...@gecode.org [mailto:users-boun...@gecode.org] On Behalf Of Nathan Horvath Sent: Tuesday, September 09, 2014 8:45 PM To: users@gecode.org Subject: [gecode-users] Creating a function to solve CP sub-problem instances 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
_______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users