Hi Christian,
I should clarify, when I mention script in my original email, I mean an 
individual file that solves an instance of my sub-problem given particular 
data. I want to integrate this with other code of mine so that when the optimal 
solution is found, it is not just printed to the screen, but ideally stored in 
a structure of my own creation. What I want to know is where I should be 
looking to implement this: is this done in my file where I defined my 
constraint problem?, or do I need to make changes elsewhere in the source code? 
From the examples I've seen, every single one has simply printed an optimal 
solution without doing anything more, while I want to store it for later 
purposes and solve another CP of the same structure with different data.
Thanks,Nathan

From: [email protected]
To: [email protected]; [email protected]
Subject: RE: [gecode-users] Creating a function to solve CP sub-problem 
instances
Date: Mon, 15 Sep 2014 11:49:07 +0200

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.  CheersChristian --Christian Schulte, Professor of Computer Science, 
KTH, www.gecode.org/~schulte/ From: [email protected] 
[mailto:[email protected]] On Behalf Of Nathan Horvath
Sent: Tuesday, September 09, 2014 8:45 PM
To: [email protected]
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
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to