View Javadoc

1   /*
2    * @(#) Model.java May 10, 2004
3    * 
4    * Copyright (c) 2003 Delft University of Technology Jaffalaan 5, 2628 BX Delft,
5    * the Netherlands All rights reserved.
6    * 
7    * This software is proprietary information of Delft University of Technology
8    * The code is published under the General Public License
9    */
10  package nl.tudelft.simulation.dsol.tutorial.section44;
11  
12  import java.rmi.RemoteException;
13  
14  import nl.tudelft.simulation.dsol.ModelInterface;
15  import nl.tudelft.simulation.dsol.SimRuntimeException;
16  import nl.tudelft.simulation.dsol.simulators.DESSSimulatorInterface;
17  import nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface;
18  import nl.tudelft.simulation.dsol.simulators.SimulatorInterface;
19  import nl.tudelft.simulation.language.d3.DirectedPoint;
20  
21  /***
22   * Model, the ball example in 3D <br>
23   * (c) copyright 2003 <a href="http://www.simulation.tudelft.nl">Delft
24   * University of Technology </a>, the Netherlands. <br>
25   * See for project information <a
26   * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
27   * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
28   * License (GPL) </a>, no warranty <br>
29   * 
30   * @version 1.0 10.05.2004 <br>
31   * @author <a href="http://www.tbm.tudelft.nl/webstaf/royc/index.htm">Roy Chin
32   *         </a>
33   */
34  public class Model implements ModelInterface
35  {
36  	/***
37  	 * Constructs new Model
38  	 */
39  	public Model()
40  	{
41  		super();
42  	}
43  
44  	/***
45  	 * @see nl.tudelft.simulation.dsol.ModelInterface#constructModel
46  	 *      (nl.tudelft.simulation.dsol.simulators.SimulatorInterface)
47  	 */
48  	public void constructModel(final SimulatorInterface simulator)
49  			throws RemoteException, SimRuntimeException
50  	{
51  		new World(new DirectedPoint(0, 0, -5.5), simulator);
52  		for (int i = 0; i < 10; i++)
53  		{
54  			new DiscreteBall((DEVSSimulatorInterface) simulator);
55  			new ContinuousBall((DESSSimulatorInterface) simulator);
56  		}
57  	}
58  }