[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-glpk] Error detected in file ..\src\glpios03.c at line 758
From: |
Andrew Makhorin |
Subject: |
[Bug-glpk] Error detected in file ..\src\glpios03.c at line 758 |
Date: |
Sat, 29 Nov 2008 07:04:42 +0300 |
> The real test is can we now compile examples\t1.cs
> C:\Users\Nigel\glpk-4.33>csc /unsafe t1.cs
> Microsoft (R) Visual C# 2008 Compiler version 3.5.21022.8
> for Microsoft (R) .NET Framework version 3.5
> Copyright (C) Microsoft Corporation. All rights reserved.
> We can. What follows is probably not the Makefiles fault.
> C:\Users\Nigel\glpk-4.33>t1 2424 772
> a = 2424, b = 772
> Hello Nigel
> Trying 772
> 0: obj = 0.000000000e+000 infeas = 1.000e+000 (0)
> * 1: obj = 0.000000000e+000 infeas = 0.000e+000 (0)
> OPTIMAL SOLUTION FOUND
> Integer optimization begins...
> + 1: mip = not found yet >= -inf (1; 0)
> Assertion failed: type != type
> Error detected in file ..\src\glpios03.c at line 758
> Assertion failed: lp->tree == NULL
> Error detected in file ..\src\glpapi01.c at line 1365
> The offending code is:
> /* determine new bounds of x[j] for down- and up-branches */
> new_ub = floor(beta);
> new_lb = ceil(beta);
> switch (type)
> { case GLP_LO:
> xassert(lb <= new_ub);
> dn_type = (lb == new_ub ? GLP_FX : GLP_DB);
> xassert(lb + 1.0 <= new_lb);
> up_type = GLP_LO;
> break;
> case GLP_DB:
> xassert(lb <= new_ub && new_ub <= ub - 1.0);
> dn_type = (lb == new_ub ? GLP_FX : GLP_DB);
> xassert(lb + 1.0 <= new_lb && new_lb <= ub);
> up_type = (new_lb == ub ? GLP_FX : GLP_DB);
> break;
> default:
> /* other cases are not tested yet */
> xassert(type != type);
> }
> This code was not exercised in 4.32 (compiled without db support).
Thank you for the bug report.
The corresponding routine, branch_on, used internally in the mip
solver was improved in glpk 4.33. Unfortunately I had no suitable
tests having integer variables of type GLP_FR and GLP_UP, so these
cases were not implemented.
The bug will be fixed in the next release of the package.
To fix the bug right now please replace the fragment shown above
(file src/glpios03.c, lines 740-759) by the following fragment:
/* determine new bounds of x[j] for down- and up-branches */
new_ub = floor(beta);
new_lb = ceil(beta);
switch (type)
{ case GLP_FR:
dn_type = GLP_UP;
up_type = GLP_LO;
break;
case GLP_LO:
xassert(lb <= new_ub);
dn_type = (lb == new_ub ? GLP_FX : GLP_DB);
xassert(lb + 1.0 <= new_lb);
up_type = GLP_LO;
break;
case GLP_UP:
xassert(new_ub <= ub - 1.0);
dn_type = GLP_UP;
xassert(new_lb <= ub);
up_type = (new_lb == ub ? GLP_FX : GLP_DB);
break;
case GLP_DB:
xassert(lb <= new_ub && new_ub <= ub - 1.0);
dn_type = (lb == new_ub ? GLP_FX : GLP_DB);
xassert(lb + 1.0 <= new_lb && new_lb <= ub);
up_type = (new_lb == ub ? GLP_FX : GLP_DB);
break;
default:
xassert(type != type);
}
Andrew Makhorin
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-glpk] Error detected in file ..\src\glpios03.c at line 758,
Andrew Makhorin <=