ip->ntrades= 0;
ip->trades= 0;
int inblock= TRADES_PER_BLOCK;
- TradesBlock *block= 0;
+ TradesBlock *block=0, **tail=&ip->trades;
debugf("VALUE ipair_get(%d,%d) running...\n", si,di);
SQL_MUST( sqlite3_bind_int(ss_ipair_dist, 1, si) );
while (SQL_STEP(ss_ipair_trades)) {
if (inblock == TRADES_PER_BLOCK) {
block= mmalloc(sizeof(*block));
- block->next= ip->trades;
- ip->trades= block;
+ block->next= 0;
+ *tail= block;
+ tail= &block->next;
inblock= 0;
}
int *irp, i;
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);