Print distribution costs when compiled with DISTRIBUTE_DEBUG
This commit is contained in:
parent
4547d3dcc2
commit
25665bc49a
1 changed files with 10 additions and 0 deletions
|
@ -41,6 +41,12 @@
|
||||||
#include "prototypes.h"
|
#include "prototypes.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
|
#ifdef DISTRIBUTE_DEBUG
|
||||||
|
#define DPRINTF(fmt, ...) ((void)printf(fmt , ## __VA_ARGS__))
|
||||||
|
#else
|
||||||
|
#define DPRINTF(fmt, ...) ((void)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define EXPORT_BONUS 10.0
|
#define EXPORT_BONUS 10.0
|
||||||
#define IMPORT_BONUS 10.0
|
#define IMPORT_BONUS 10.0
|
||||||
|
|
||||||
|
@ -80,6 +86,10 @@ dodistribute(struct sctstr *sp, int imex, char *path, double dist_i_cost,
|
||||||
dist_packing = dist->sct_effic >= 60 ? dchr[dist->sct_type].d_pkg : IPKG;
|
dist_packing = dist->sct_effic >= 60 ? dchr[dist->sct_type].d_pkg : IPKG;
|
||||||
sect_packing = sp->sct_effic >= 60 ? dchr[sp->sct_type].d_pkg : IPKG;
|
sect_packing = sp->sct_effic >= 60 ? dchr[sp->sct_type].d_pkg : IPKG;
|
||||||
|
|
||||||
|
DPRINTF("distribute: %d,%d to %d,%d pathcost %g\n",
|
||||||
|
sp->sct_x, sp->sct_y, sp->sct_dist_x, sp->sct_dist_y,
|
||||||
|
imex == IMPORT ? dist_i_cost : dist_e_cost);
|
||||||
|
|
||||||
lplague = rplague = changed = 0;
|
lplague = rplague = changed = 0;
|
||||||
for (item = I_NONE + 1; item <= I_MAX; item++) {
|
for (item = I_NONE + 1; item <= I_MAX; item++) {
|
||||||
if (sp->sct_dist[item] == 0)
|
if (sp->sct_dist[item] == 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue