/** * Builds a simulation for a given environment. By default it uses a * DependencyGraph and an IndexedPriorityQueue internally. If you want to * use your own implementations of {@link DependencyGraph} and * {@link ReactionManager} interfaces, don't use this constructor. * * @param e * the environment at the initial time * @param maxSteps * the maximum number of steps to do * @param t * the maximum time to reach */ public Engine(final Environment<T> e, final long maxSteps, final Time t) { L.trace("Engine created"); env = e; env.setSimulation(this); dg = new MapBasedDependencyGraph<T>(env, handlers); ipq = new ArrayIndexedPriorityQueue<>(); this.steps = maxSteps; this.finalTime = t; }