*/
private static void setMacroInitialConditions(RoadSegment roadSegment, List<MacroIC> macroInitialConditions,
TrafficCompositionGenerator vehGenerator) {
LOG.info("choose macro initial conditions: generate vehicles from macro-localDensity ");
final InitialConditionsMacro icMacro = new InitialConditionsMacro(macroInitialConditions);
for (LaneSegment laneSegment : roadSegment.laneSegments()) {
if (laneSegment.type() != Lanes.Type.TRAFFIC) {
LOG.debug("no macroscopic initial conditions for non-traffic lanes (slip roads etc).");
continue;
}
double position = roadSegment.roadLength(); // start at end of segment
while (position > 0) {
final TestVehicle testVehicle = vehGenerator.getTestVehicle();
final double rhoLocal = icMacro.rho(position);
double speedInit = icMacro.hasUserDefinedSpeeds() ? icMacro.vInit(position) : testVehicle
.getEquilibriumSpeed(rhoLocal);
if (LOG.isDebugEnabled() && !icMacro.hasUserDefinedSpeeds()) {
LOG.debug("use equilibrium speed={} in macroscopic initial conditions.", speedInit);
}
if (LOG.isDebugEnabled()) {
LOG.debug(String