extern double max_mass, max_volu, max_capi;
extern double distance_loss_factor_per_league;
-#define LOSS_FACTOR_PER_DELAY_SLOT (1-1e8)
+#define LOSS_FACTOR_PER_DELAY_SLOT (1-1e-8)
#endif /*RSCOMMON_H*/
add_leg_c(capi_constraints, leg, t->src_price);
}
+ double unit_profit= (t->dst_price - t->src_price) * loss_factor;
+ debugf(" unit profit %f\n", unit_profit);
+assert(unit_profit < 1e6);
+
lpx_set_col_bnds(lp, col, LPX_LO, 0, 0);
- lpx_set_obj_coef(lp, col,
- (t->dst_price - t->src_price) * loss_factor);
+ lpx_set_obj_coef(lp, col, unit_profit);
lpx_set_mat_col(lp, col, nconstraint_rows,
constraint_rows, constraint_coeffs);
+
if (DEBUGP(value)) {
char *name= masprintf("c%d_p%d_%d_p%d_%d",
t->commodid, s, t->src_price, d, t->dst_price);