1 package org.opentrafficsim.simulationengine; 2 3 import org.djunits.value.vdouble.scalar.Time; 4 5 import nl.tudelft.simulation.dsol.SimRuntimeException; 6 import nl.tudelft.simulation.dsol.formalisms.eventscheduling.SimEvent; 7 import nl.tudelft.simulation.dsol.simtime.SimTimeDoubleUnit; 8 import nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface; 9 10 /** 11 * <p> 12 * Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br> 13 * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>. 14 * <p> 15 * $LastChangedDate: 2018-09-19 13:55:45 +0200 (Wed, 19 Sep 2018) $, @version $Revision: 4006 $, by $Author: averbraeck $, 16 * initial version 11 mei 2015 <br> 17 * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a> 18 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a> 19 */ 20 public interface SimpleSimulatorInterface extends DEVSSimulatorInterface.TimeDoubleUnit 21 { 22 /** 23 * Construct and schedule a SimEvent using a Time to specify the execution time. 24 * @param executionTime Time; the time at which the event must happen 25 * @param priority short; should be between <cite>SimEventInterface.MAX_PRIORITY</cite> and 26 * <cite>SimEventInterface.MIN_PRIORITY</cite>; most normal events should use 27 * <cite>SimEventInterface.NORMAL_PRIORITY</cite> 28 * @param source Object; the object that creates/schedules the event 29 * @param target Object; the object that must execute the event 30 * @param method String; the name of the method of <code>target</code> that must execute the event 31 * @param args Object[]; the arguments of the <code>method</code> that must execute the event 32 * @return SimEvent<SimTimeDoubleUnit>; the event that was scheduled (the caller should save this if a need to cancel 33 * the event may arise later) 34 * @throws SimRuntimeException when the <code>executionTime</code> is in the past 35 */ 36 SimEvent<SimTimeDoubleUnit> scheduleEvent(Time executionTime, short priority, Object source, Object target, String method, 37 Object[] args) throws SimRuntimeException; 38 39 }