chiark / gitweb /
Use GLPK's simplex solver instead
authorIan Jackson <ian@liberator.(none)>
Fri, 2 Oct 2009 22:02:12 +0000 (23:02 +0100)
committerIan Jackson <ian@liberator.(none)>
Sat, 3 Oct 2009 09:12:18 +0000 (10:12 +0100)
(interior point solver complains about numerical instability)

yarrg/rsvalue.c

index 70e1f65..f867319 100644 (file)
@@ -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);