chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-live.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7824364
)
Use GLPK's simplex solver instead
author
Ian Jackson
<ian@liberator.(none)>
Fri, 2 Oct 2009 22:02:12 +0000
(23:02 +0100)
committer
Ian 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
patch
|
blob
|
history
diff --git
a/yarrg/rsvalue.c
b/yarrg/rsvalue.c
index 70e1f65d96cbd683a08aab16867102a5e54de232..f86731923f873524a80e7446600f9d4a0f1f9694 100644
(file)
--- 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);