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.Replication;
import nl.tudelft.simulation.dsol.experiment.ReplicationMode;
import nl.tudelft.simulation.dsol.gui.swing.DSOLApplication;
import nl.tudelft.simulation.dsol.gui.swing.DSOLPanel;
import nl.tudelft.simulation.dsol.simtime.SimTimeDouble;
import nl.tudelft.simulation.dsol.simulators.DESSSimulator;
/**
*
* Copyright (c) 2002-2014 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights
* reserved.
*
* See for project information www.simulation.tudelft.nl.
*
* The DSOL project is distributed under the following BSD-style license:
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this list of conditions and the following
* disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other materials provided with the distribution.
* - Neither the name of Delft University of Technology, nor the names of its contributors may be used to endorse or
* promote products derived from this software without specific prior written permission.
*
* This software is provided by the copyright holders and contributors "as is" and any express or implied warranties,
* including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are
* disclaimed. In no event shall the copyright holder or contributors be liable for any direct, indirect, incidental,
* special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or
* services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability,
* whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use
* of this software, even if advised of the possibility of such damage.
* @version Aug 15, 2014
* @author Alexander Verbraeck
*/
public class DESSSwingApplication extends DSOLApplication
{
/**
* @param title the title
* @param panel the panel
*/
public DESSSwingApplication(final String title, final DSOLPanel panel)
{
super(title, panel);
}
/** */
private static final long serialVersionUID = 1L;
/**
* @param args 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
{
DESSModel model = new DESSModel();
DESSSimulator.TimeDouble simulator = new DESSSimulator.TimeDouble(0.1);
Replication replication =
new Replication<>("rep1", new SimTimeDouble(0.0), 0.0, 100.0, model);
simulator.initialize(replication, ReplicationMode.TERMINATING);
new DESSSwingApplication("DESS model", new DESSPanel(model, simulator));
}
}