package nl.tudelft.simulation.examples.dsol.dess; import java.rmi.RemoteException; import javax.naming.NamingException; import nl.tudelft.simulation.dsol.SimRuntimeException; import nl.tudelft.simulation.dsol.experiment.ReplicationInterface; import nl.tudelft.simulation.dsol.experiment.SingleReplication; import nl.tudelft.simulation.dsol.simulators.DESSSimulator; import nl.tudelft.simulation.dsol.swing.gui.DSOLApplication; import nl.tudelft.simulation.dsol.swing.gui.DSOLPanel; /** *

* Copyright (c) 2002-2022 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See * for project information https://simulation.tudelft.nl. The DSOL * project is distributed under a three-clause BSD-style license, which can be found at * * https://simulation.tudelft.nl/dsol/3.0/license.html. *

* @author Alexander Verbraeck */ public class DESSSwingApplication extends DSOLApplication { /** * @param title String; the title * @param panel DSOLPanel<Double,Double,SimTimeDouble>; the panel */ public DESSSwingApplication(final String title, final DSOLPanel panel) { super(panel, title); panel.enableSimulationControlButtons(); } /** */ private static final long serialVersionUID = 1L; /** * @param args String[]; arguments, expected to be empty * @throws SimRuntimeException on error * @throws RemoteException on error * @throws NamingException on error */ public static void main(final String[] args) throws SimRuntimeException, RemoteException, NamingException { DESSSimulator.TimeDouble simulator = new DESSSimulator.TimeDouble("DESSSwingApplication", 0.1); DESSModel model = new DESSModel(simulator); ReplicationInterface.TimeDouble replication = new SingleReplication.TimeDouble("rep1", 0.0, 0.0, 100.0); simulator.initialize(model, replication); new DESSSwingApplication("DESS model", new DESSPanel(model, simulator)); } }