Path: blob/main/tests/complex/traci_java/multiclient/data/MultiClient2.java
169689 views
/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2017-2025 German Aerospace Center (DLR) and others.3// TraaS module4// Copyright (C) 2013-2017 Dresden University of Technology5// This program and the accompanying materials are made available under the6// terms of the Eclipse Public License 2.0 which is available at7// https://www.eclipse.org/legal/epl-2.0/8// This Source Code may also be made available under the following Secondary9// Licenses when the conditions for such availability set forth in the Eclipse10// Public License 2.0 are satisfied: GNU General Public License, version 211// or later which is available at12// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html13// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later14/****************************************************************************/15/// @file MultiClient2.java16/// @author Jakob Erdmann17/// @author Mirko Barthauer18/// @date 201919///20//21/****************************************************************************/2223import org.eclipse.sumo.libtraci.*;2425public class MultiClient2 {2627public static void main(String[] args) {28Simulation.preloadLibraries();29try {30Simulation.init(9999);31Simulation.setOrder(2);323334for (int i = 0; i < 3600; i++) {35Simulation.step();36double timeSeconds = Simulation.getTime();37System.out.println(String.format("Step %s", timeSeconds));38}3940Simulation.close();4142} catch (Exception ex) {43ex.printStackTrace();44}4546}4748}495051