From 81bd9338a2395caf88731f9d16de5b88868dd5c9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 2 Oct 2009 23:02:12 +0100 Subject: [PATCH] Use GLPK's simplex solver instead (interior point solver complains about numerical instability) --- yarrg/rsvalue.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/yarrg/rsvalue.c b/yarrg/rsvalue.c index 70e1f65..f867319 100644 --- a/yarrg/rsvalue.c +++ b/yarrg/rsvalue.c @@ -313,14 +313,15 @@ double value_route(int nislands, const int *islands) { if (DEBUGP(lp)) lpx_write_cpxlp(lp, (char*)DEBUG_DEV); - int ipr= lpx_interior(lp); + int ipr= lpx_simplex(lp); assert(ipr==LPX_E_OK); if (DEBUGP(lp)) - lpx_print_ips(lp, (char*)DEBUG_DEV); + lpx_print_sol(lp, (char*)DEBUG_DEV); - assert(lpx_ipt_status(lp) == LPX_T_OPT); - profit= lpx_ipt_obj_val(lp); + int lpst= lpx_get_status(lp); + assert(lpst == LPX_OPT); + profit= lpx_get_obj_val(lp); } lpx_delete_prob(lp); -- 2.30.2