private void addToBuffer(final QVehicle veh) { // yy might make sense to just accumulate to "zero" and go into negative when something is used up. // kai/mz/amit, mar'12 double now = context.getSimTimer().getTimeOfDay() ; flowcap_accumulate.addValue(-veh.getFlowCapacityConsumptionInEquivalents(), now); buffer.add(veh); if (buffer.size() == 1) { bufferLastMovedTime = now; // (if there is one vehicle in the buffer now, there were zero vehicles in the buffer before. in consequence, // need to reset the lastMovedTime. If, in contrast, there was already a vehicle in the buffer before, we can // use the lastMovedTime that was (somehow) computed for that vehicle.) } final QNodeI toNode = qLink.getToNodeQ(); if ( toNode instanceof QNodeImpl ) { ((QNodeImpl) toNode).activateNode(); // yy for an "upstream" QLane, this activates the toNode too early. Yet I think I founds this // also in the original QLane code. kai, sep'13 } }