Thank you very much. Now when I use the clone function I get another exception: "Space::clone: Attempt to invoke operation on not stable space" I've read in MPG that this is because the space is failed or not stable, but I don't know what this realy means. Why can my space be unstable? I can post constraints and I can get the solutions, so everything seems to be fine.
Thanks in advance, Steve 2013/9/29 Guido Tack <t...@gecode.org> > Hi, > > you cannot call the copy constructor directly. Just change the line where > you're trying to make the copy into > > SendMoreMoney* m2 = static_cast<SendMoreMoney*>(m->clone(true)); > > and it will work. (It's a little unfortunate that there is no better > error message, but if you call "internal" functionality in Gecode things > like this can happen.) > > Cheers, > Guido > > -- > Guido Tack > http://www.csse.monash.edu/~guidot/ > > > > On 29/09/2013, at 5:37 PM, kTorpi <kto...@gmail.com> wrote: > > Hello, > > In my application i'm building a model through a long process, and in the > middle of the process I'd like to make a copy of the actual model, post > some constraints to the copied and get the solution. > But when I make a copy of the model with is copy constructor and than I > create the DFS object I get a Gecode::MemoryExhausted exception. > Please, help me. I attached a small example that reproduces the error. > > Thanks you, > Steve > <send-more-money-de-mystified.cpp> > _______________________________________________ > Gecode users mailing list > users@gecode.org > https://www.gecode.org/mailman/listinfo/gecode-users > > >
_______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users