[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] GLPK 4_23 internal error in call back
From: |
ms |
Subject: |
[Help-glpk] GLPK 4_23 internal error in call back |
Date: |
Sun, 11 Nov 2007 20:21:46 +0300 |
Hi,
I am using GLPK 4.23 for solving a MIP problem and using call back suggested
by Andrew Makhorin to exit when the MIP gap is <= 5%
---------------------------------------------------
void cb_func(glp_tree *tree, void *info)
{ if (glp_ios_reason(tree) == GLP_IBINGO)
{ if (glp_ios_mip_gap(tree) < 0.10)
glp_ios_terminate(tree);
}
. . .
}
int main(void)
{ glp_prob *mip;
glp_iocp parm;
. . .
glp_init_iocp(&parm);
parm.cb_func = cb_func;
glp_intopt(mip, &parm);
. . .
}
-------------------------------------------------------------------------------------
The call back works fine upto certain point when I get the following error:
GLPK internal error: lp->tree == NULL; file ..\src\glpapi01.c, line 1147
I compiled the source using VS2005 and calling the API's in C#. If I don't
use use call backs the program works fine. But I don't have control over the
mip gap. Any suggestion will be appreciated.
Sam
-------------output-----------------------------------------
11:02:09 AM * 1341: objval = 8.225886544e+002 infeas =
5.280220705e-013 (0)
11:02:09 AM OPTIMAL SOLUTION FOUND
11:02:09 AM Integer optimization begins...
Gap = 1.79769313486232E+308 Reason = 6
Gap = 1.79769313486232E+308 Reason = 7
11:02:10 AM + 1341: mip = not found yet >= -inf (1;
0)
Gap = 1.79769313486232E+308 Reason = 1
Gap = 1.79769313486232E+308 Reason = 3
Gap = 1.79769313486232E+308 Reason = 4
Gap = 1.79769313486232E+308 Reason = 5
Gap = 1.79769313486232E+308 Reason = 7
11:02:13 AM + 1341: mip = not found yet >= 8.225886544e+002 (2;
0)
Gap = 1.79769313486232E+308 Reason = 1
Gap = 1.79769313486232E+308 Reason = 3
Gap = 1.79769313486232E+308 Reason = 4
Gap = 1.79769313486232E+308 Reason = 5
Gap = 1.79769313486232E+308 Reason = 7
11:02:17 AM + 1345: mip = not found yet >= 8.225886544e+002 (3;
0)
11:02:17 AM GLPK internal error: lp->tree == NULL; file ..\src\glpapi01.c,
line 1147
--
View this message in context:
http://www.nabble.com/GLPK-4_23-internal-error-in-call-back-tf4786374.html#a13692864
Sent from the Gnu - GLPK - Help mailing list archive at Nabble.com.
- [Help-glpk] GLPK 4_23 internal error in call back,
ms <=