The following document contains the results of PMD's CPD 6.13.0.
| File | Line |
|---|---|
| org\opentrafficsim\aimsun\AimsunControl.java | 179 |
| org\opentrafficsim\aimsun\AimsunControl.java | 278 |
Time stopTime = simulator.getSimulatorTime();
// System.err.println("Entering sendGTUPositionsToAimsun: simulator time is " + stopTime);
AimsunControlProtoBuf.GTUPositions.Builder builder = AimsunControlProtoBuf.GTUPositions.newBuilder();
for (GTU gtu : this.model.getNetwork().getGTUs())
{
AimsunControlProtoBuf.GTUPositions.GTUPosition.Builder gpb =
AimsunControlProtoBuf.GTUPositions.GTUPosition.newBuilder();
gpb.setGtuId(gtu.getId());
DirectedPoint dp;
try
{
dp = gtu.getOperationalPlan().getLocation(stopTime);
gpb.setX(dp.x);
gpb.setY(dp.y);
gpb.setZ(dp.z);
gpb.setAngle(dp.getRotZ());
gpb.setLength(gtu.getLength().si);
gpb.setWidth(gtu.getWidth().si);
gpb.setGtuTypeId(Integer.parseInt(gtu.getGTUType().getId().split("\\.")[1]));
gpb.setSpeed(gtu.getSpeed().si);
builder.addGtuPos(gpb.build());
}
catch (OperationalPlanException exception)
{
exception.printStackTrace();
}
}
builder.setStatus("OK"); | |