No subject


Tue Mar 6 05:10:12 CET 2012


the first engine to the second, configure the snd engine to not take a clone
of s and then delete s? Is that the case? That could explain the bug: both
the snd engine as well as your code delete s, hence the kaboom!

If that is not the case, maybe just sketch in  more detail what you are
doing.

Cheers
Christian

--
Christian Schulte, www.ict.kth.se/~cschulte/


> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On
> Behalf Of Milton Friedman
> Sent: Friday, April 20, 2012 6:37 AM
> To: users at gecode.org
> Subject: [gecode-users] Multiple separate searches
> 
> I'm working on a problem with many cases, encoded into an IntArray A, of
which
> some branchings are valid according to a set of constraints, and for each
of
> those valid cases, another IntArray B describes a more detailed analysis,
subject
> to other constraints.
> 
> I only need one solution of B for each case.
> 
> So what I think I should do in Gecode, is create a loop down in main that
runs
> DFS on Space/model IntArray A, and for each sequential solution A that
returns,
> call a different instance of DFS on Space/model IntArray B DFS to get just
one
> solution.
> Does that sound like a reasonable approach?
> 
> When I tried to do this, I ran into a problem.
> The MwG document explains how to loop on DFS, using s<-e.next to find the
> next space, etc, and I've done that for another application.
> But when I tried to feed DFS the new s, I got an error in Gecode's DFS
destructor
> on the line where it's trying to delete e (called by the end bracket of my
loop).
> So is it legal to have multiple separate DFS engines?
> Do you need to delete them when you're creating the next one?
> (delete e didn't work in my code any better than in the destructor).
> I don't see any examples of this on the Gecode examples page...
> they all look like single calls to the search engine.
> 
> Any thoughts?  Am I going about this w/the right approach?
> Thanks,
> -Milt
> 
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list