1
2
3
4
5
6
7
8
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 }