Skip to Main Content

Collection data output behavior

838385Mar 26 2016 — edited Mar 26 2016

Hi, I am working on a sumo project. I am using TraCI 4J to control the simulation. I am stuck in a simple problem:

for (int i = 0; i < 37260; i++) {

     Collection<Vehicle> vehicles = conn.getVehicleRepository().getAll().values();

     Iterator<Vehicle> itr = vehicles.iterator();

     while (itr.hasNext()) {

             Vehicle vehicle =;


                                System.out.println("Found typeNS");


                                System.out.println("Found typeWE");






The last output gives every possible vehicle.getType but the top if statement always get ommitted. There are hundres of typeNS and typeWE but it does not catch that. Any idea? What's the problem here?

Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Apr 23 2016
Added on Mar 26 2016
1 comment