help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] "Assertion failed: 1 <= p && p <= T->nslots Error detect


From: Andrew Makhorin
Subject: Re: [Help-glpk] "Assertion failed: 1 <= p && p <= T->nslots Error detected in file ..\src\glpios03.c at line 116"
Date: Fri, 25 Mar 2011 19:41:05 +0300

> I am interfacing GLPK using Fortran 2003 and when solving a MILP
>   problem using the callback function “cb_func” I am getting the
>   following assertion error from is_branch_hopeful().  Assertion
>  failed:  1 <= p && p <= T->nslots
> 
> Error detected in file ..\src\glpios03.c at line 116
> 
> However, when I run with cb_func = NULL as the default GLPK works fine
> but I have no callback to interrupt when integer-feasible solutions
> are found unfortunately.
> 
> When I write out the subproblem index or node number i.e., “p” above
> using glp_ios_curr_node(tree)within my callback routine, it correctly
> writes out “0” and “1” – see below:
> 
> Integer optimization begins...
> 
>            0
> 
> +  3457: mip =     not found yet <=              +inf        (1; 0)
> 
>            1
> 
> Therefore my only conclusion is that the tree’s number of slots i.e.,
> “T->nslots” is 0 (zero) for some reason after the call to
> glp_intopt().
> 
> Any assistance on this would be appreciated.

It is an internal error. It might happen if the tree data structure
(glp_tree) is invalid or damaged.

Please note that the search tree exists only within glp_intopt. It is
destroyed on exit from glp_intopt, so you should not access it when
glp_intopt has returned to your main program, even if you stored the
pointer to it (i.e. T) passed to the callback routine. Currently glpk
api routines do not check if a pointer to glp_prob or glp_tree is valid
(assuming that it is valid), so no reasonable error message is
generated.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]