// case speed = 0 --> set vehicle ast equilibrium speed
// generateMacroFields: rho guaranteed to be > RHOMIN, v to be < VMAX
for (int i = 0; i < size; i++) {
MacroIC localMacroIC = macroIC.get(i);
final double rhoLocal = localMacroIC.getDensityPerKm() * Units.INVKM_TO_INVM;
if (rhoLocal > MovsimConstants.SMALL_VALUE) {
pos[i] = localMacroIC.getPosition();
rho[i] = rhoLocal;
if (hasUserDefinedSpeeds()) {
speed[i] = Math.min(localMacroIC.getSpeed(), MovsimConstants.MAX_VEHICLE_SPEED);
LOG.debug("speed={}", speed[i]);
}
}
}
}