Hello.
I have a java program (shown below). I can load and step through the model,
and it even warns that some vehicles have to perform emergency braking.
However, vehicle queries like "Simulation.getLoadedNumber()" are returning 0
when this clearly should not be.
Anyone know what's wrong? I'm using sumo-1.8.0.
=========================
package sumotest;
import org.eclipse.sumo.libsumo.Simulation;
import org.eclipse.sumo.libsumo.StringVector;
public class App {
public static void main(String[] args) {
System.loadLibrary("libsumojni");
Simulation.load(new StringVector(new String[] {"-c",
"SUMO/subway.sumo.cfg"}));
Simulation.subscribe();
for(int ix = 0 ; ix < 50000 ; ++ix) {
Simulation.step();
}
System.out.println("Loaded vehicles: " + Simulation.getLoadedNumber());
// prints "0"
Simulation.close();
}
}
==========================
-- Harmon
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user