PredictUserContext *u= c->u;
t->seg->now_present= t->seg->pred_present= t->seg->will_polarise= 1;
t->seg->until= 0;
- u->noninv_tally[!t->backwards]++; /* ! since going backwards along train */
+ if (!t->seg->i->invertible)
+ u->noninv_tally[!t->backwards]++; /* ! since going backwards along train */
return 0;
}
pred_callback_debug(" tail_nextseg",t,c);
- u->noninv_tally[leaving->tr_backwards]--;
+ if (!t->seg->i->invertible)
+ u->noninv_tally[leaving->tr_backwards]--;
if (t->seg->pred_vacated) return 0; /* only vacate once */
t->seg->pred_present= 0;
if (t->seg->det_expected)
strcat(flags,"*");
+ if (t->seg->det_ignore)
+ strcat(flags,".");
if (t->seg == u->train->foredetect) {
strcat(flags,"!");
u->usecurrentposn=u->forceusemotions;
}
- if (t->seg->det_ignore)
- strcat(flags,"@");
- if (t->seg->tr_backwards)
- strcat(flags,"-");
- oprintf(UPO," %s%s",flags,t->seg->i->pname);
+ oprintf(UPO," %s%s", t->seg->tr_backwards?"-":"", t->seg->i->pname);
if (t->seg->i->n_poscombs > 1) {
r= pred_getmovpos(t,c,mpc); assert(!r); assert(*mpc>=0);
oprintf(UPO,"/%s", t->seg->i->poscombs[*mpc].pname);
}
+ oprintf(UPO,"%s",flags);
return 0;
}
/*----- commit to the plan -----*/
- if (u.need_polarise)
+ oprintf(DUPO("safety") " predict committing\n");
+
+ if (u.need_polarise) {
+ oprintf(DUPO("safety") " predict polarising train_polarity=%d\n",
+ u.train_polarity_inverted),
actual_inversions_start();
+ }
+ oprintf(DUPO("safety") " predict ");
FOR_SEG {
+ oprintf(UPO,
+ " %s%s%s%c%c%c%c",
+ seg->tr_backwards?"-":"", seg->i->pname,
+ seg->owner == tra ? "#" : "=",
+ "-N"[ seg->now_present ],
+ "-P"[ seg->pred_present ],
+ "-V"[ seg->pred_vacated ],
+ "-#"[ seg->will_polarise ]);
+
if (seg->owner == tra) {
seg->det_ignore= 0;
seg->owner= 0;
ec= movpos_change(seg, target, -1, reservation);
assert(!ec);
}
- if (u.need_polarise) {
- if (seg->will_polarise)
- seg->seg_inverted= seg->tr_backwards ^ u.train_polarity_inverted;
+ if (u.need_polarise && seg->will_polarise) {
+ seg->seg_inverted= seg->tr_backwards ^ u.train_polarity_inverted;
actual_inversions_segment(seg);
}
seg->now_present= seg->pred_present=
seg->pred_vacated= seg->will_polarise= 0;
}
+ oprintf(UPO,"\n");
if (u.need_polarise)
actual_inversions_done();