package nl.tudelft.simulation.dsol.swing.gui.test; 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.model.DSOLModel; import nl.tudelft.simulation.dsol.simulators.DEVSSimulator; import nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface; import nl.tudelft.simulation.dsol.swing.gui.DSOLApplication; import nl.tudelft.simulation.dsol.swing.gui.control.DEVSControlPanel; /** * MM1SwingApplication is a test GUI application. *

* Copyright (c) 2020-2022 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See * for project information DSOL Manual. The DSOL * project is distributed under a three-clause BSD-style license, which can be found at * DSOL License. *

* @author Alexander Verbraeck */ public class MM1SwingApplication extends DSOLApplication { /** */ private static final long serialVersionUID = 1L; /** * @param panel the simulation panel */ public MM1SwingApplication(final MM1Panel panel) { super(panel, "MM1 Queueing model"); } /** * @param args String[]; the arguments for the program (should be empty) * @throws SimRuntimeException on simulation error * @throws RemoteException on remote error * @throws NamingException on naming/animation error */ public static void main(final String[] args) throws SimRuntimeException, RemoteException, NamingException { DEVSSimulator.TimeDouble simulator = new DEVSSimulator.TimeDouble("MM1SwingApplication.Simulator"); DSOLModel.TimeDouble model = new MM1Model(simulator); ReplicationInterface.TimeDouble replication = new SingleReplication.TimeDouble("rep1", 0.0, 0.0, 1000.0); simulator.initialize(model, replication); DEVSControlPanel.TimeDouble controlPanel = new DEVSControlPanel.TimeDouble(model, simulator); new MM1SwingApplication(new MM1Panel(controlPanel)); } }