[gecode-users] Error in GecodeJ

Debdeep Banerjee banerjed at rsise.anu.edu.au
Sun Dec 9 02:26:03 CET 2007


Mikael Zayenz Lagerkvist wrote:
> On 8 dec 2007, at 07.18, Debdeep Banerjee wrote:
>> Hi,
>> I am getting the following error message after some time the DFS 
>> search starts.
>> -------------------------------------------------------------------------------------------------------------------- 
>>
>> terminate called after throwing an instance of 'Gecode::SpaceFailed'
>> what(): Space::clone: Attempt to invoke operation on failed space
>> Aborted (core dumped)
>> ---------------------------------------------------------------------------------------------------------------------- 
>>
>> I have written a custom propagator. For small size problems my 
>> program solves correctly, but when ever i have tried a bigger size 
>> problem or a bit complicated problem where number of backtracks are 
>> significantly large, I am getting the above error.
>>
>> I have attached my propagator code.
>>
>
> Without looking at your code, there are some general reasons why this 
> error may happen: 
> http://www.gecode.org/gecode-users/2007-April/001481.html
>
> Cheers,
> Mikael
Hi,
  I think the "batch recomputation" is the problem for me. so I have 
tried to write my own DFS search, a simple one like the following......
----------------------------------------------------
public class CustomSearch
{
    private Stack<Space> agenda;
    private Space problem;
   
    public CustomSearch (Space home)
    {
        this.problem = home;
        this.agenda = new Stack<Space>();
        agenda.push(home);
    }
   
    public Space next()
    {
        if (agenda.empty() )
            return null;
       
        Space s = agenda.pop();
       
        switch ( s.status() )
        {
            case SS_FAILED: return next();

            case SS_SOLVED: return s;

            case SS_BRANCH:
                Space copy = s.cloneSpace();
                 BranchingDesc  desc = s.description();
                 s.commit( desc, 1); agenda.push( s );
                 copy.commit(desc, 0); agenda.push( copy);
                 return next();
               

            default:  return null;
               
        }
    }
}
----------------------------------------------------------------------------------



But now I am getting the error........
--------------
Internal error in Java propagator. Exit.
---------------
nothing else.......Where is the problem?????

with regards
Debdeep




More information about the gecode-users mailing list