Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] libsumo returning 0, empty lists for vehicle queries
  • From: "Nine, Harmon S" <harmon.s.nine@xxxxxxxxxxxxxx>
  • Date: Fri, 11 Nov 2022 02:48:53 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vanderbilt.edu; dmarc=pass action=none header.from=vanderbilt.edu; dkim=pass header.d=vanderbilt.edu; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RHJP0x6Vv7x58bvaN7Ts/scZG4JNF2x0zkeALmi6DT4=; b=eoCvzyV3Z6UXVz7mPw2MtgEdu0XsDh3EG1HxZ+OEFBeSlcLB4yNIu1NtFWyHZo56BuYmJqfI06XFfvUzJ5cgytNlnV/r0j80191OugR7QggbVy+o5+wKYyDDdHyiu40NOfJVPobC7gC7JIQDFvMqBILa2uuXm0wcDnAjU/gAUZ9b3BJob7cjvz1oJHT5tojZ9Zy1sZViKDxJnqF5u//K24Ekex4LtQYE1VyUQ7dynnCG8UIpvynsV3hTxqJ0mhMZ+xzE75ef4dymF6m2AExyhRxgXMVKX8Ogy64EfxQNF7YRTSBWlHxYnNZhDqABbMTDIrG2/wwV6S1H4L78MR/Z4A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K8i9zo/tO+RjIfpdmHhe6V2IzgbCsmYC1/wSgdfLdyfikY4ddCwEF2eqlBvOwRrieY6eSSUYfHCknC5V1qpm1iYsH8XBXOXSJMH/7kMh5/Fn/X8eafKOpht3UgjUMxgyKfiiViSirrp3kAxmYfMInAA6XZNyW0iWhMbVuS8p1A52TfBfVsWGfHP+L9g3Wh+RHS4bUjh86v2o1XPZyhbU/MGyT3TyrMWl7LCTJIsFyCOe/1WKb4m5WMTP4CSdvL1J30TGDlbUXUrNExwxSKV8Q6EQhz/9hcRChYi5i9+MGy4xBgL4Euh9cWVCUPjFfEa9MoOiQMFMSFqqPqpcAI2BGQ==
  • Delivered-to: sumo-user@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/sumo-user/>
  • List-help: <mailto:sumo-user-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHY9XeS4POgYJKGIkW5ZDPTuoUubA==
  • Thread-topic: libsumo returning 0, empty lists for vehicle queries

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

Back to the top