assert roadMapping != null;
final int radius = (int) ((roadMapping.laneCount() + 2) * roadMapping.laneWidth());
final RoadMapping.PosTheta posTheta;
// draw the road segment source, if there is one
final AbstractTrafficSource trafficSource = roadSegment.trafficSource();
if (trafficSource != null) {
g.setColor(sourceColor);
posTheta = roadMapping.startPos();
g.fillOval((int) posTheta.x - radius / 2, (int) posTheta.y - radius / 2, radius, radius);
g.setColor(Color.BLACK);
StringBuilder inflowStringBuilder = new StringBuilder();
inflowStringBuilder.append("set/target inflow: ");
inflowStringBuilder.append((int) (Units.INVS_TO_INVH * trafficSource.getTotalInflow(simulationTime())));
inflowStringBuilder.append("/");
inflowStringBuilder.append((int) (Units.INVS_TO_INVH * trafficSource.measuredInflow()));
inflowStringBuilder.append(" veh/h");
inflowStringBuilder.append(" (");
inflowStringBuilder.append(trafficSource.getQueueLength());
inflowStringBuilder.append(")");
g.drawString(inflowStringBuilder.toString(), (int) (posTheta.x) + radius / 2, (int) (posTheta.y)
+ radius / 2);
}
}