The documentation has been repaired. Several links were not working. some inheritance is used in the site.xml file. The site.vm files for Doxia have been updated to the latest version. Included a relativizeDecorationLinks option set to false in the maven.site section in the pom file to properly render the menus in the site (absolute paths instead of relative ones). The ImageRenderable in dsol-swing gave a NullPointerException when loading the image. An extra check has been built in. SimEventInterface and LambdaSimEvent got easy access classes for the different types of clocks. The SimEvent got easy access classes. So you can now, e.g., construct a SimEvent.TimeDouble that takes a double as the execution time. The "easy access" constructors of Treatment and Replication now take parameters in absolute and relative time units rather than SimTime. So a new Treatment.TimeDoubleUnit takes as parameters: (Time startTime, Duration warmupPeriod, Duration runLength). This is a lot more clear than using SimTime wrappers. The general Treatment and Replication constructors still needs a SimTime. Extra methods getStartSimTime(), getWarmupSimTime() and getEndSimTime() have been added to the Treatment in case the wrapper object are needed, e.g., for comparison or adding/subtracting durations. Simulator.getSimulatorTime() returns the absolute time A rather than the SimTime T. This makes coding a lot easier, as the wrapper T is only used to implement the internals of adding and subtracting absolute and relative simulation times, but should actually never be exposed to the user, unless the user is really interested in the wrapper. For this, the method Simulator.getSimTime() has been implemented, which returns a SimTime object. Utilization in dsol-core now uses generics for time. The Simulator classes do not use the internal TimeUnit classes anymore. Instead, the Time and Duration from DJUNITS have been used. This holds for the TimeDoubleUnit, TimeFloatUnit, CalendarDouble and CalendarFloat. TimeLongUnit has been removed, as it did not really make sense how it was implemented. CalendarLong uses a relative Long to indicate time in milliseconds. Most of the Model and Simulator methods and constructors do not throw RemoteExceptions anymore. RemoteExceptions are only thrown for the Listeners and Context (for the animation), as both of these are expected to be Remote sometimes. This means that statistics like Tally, Persistent, and Counter throw RemoteExceptions on construction and adding series, as these are dependent on (possibly remote) events. The ImmutableCollections have been updated to avoid accepting a List in the constructor of an ImmutableSet when the copyOrWrap is Immutable.WRAP. The size() of the original List and the ImmutableSet were different in case of duplicates in the List, which was terribly confusing. Therefore, accepting a Collection should always lead to a COPY, whereas a 'compatible' Collection can use the WRAP. In addition, wrapping has become a lot more strict. An ImmutableSortedMap wraps only a SortedMap, whereas an ImmutableHashMap wraps a Map. Originally, they could wrap each other, leading to incompatibilities. The same holds for Lists and Sets. Updated all maven dependencies and libraries to their latest version in the dsol pom-file. StateSaver class included in dsol-base. dsol-core is now not dependent anymore on xstream to do state-save and state-retrieve for rollback. The dsol-demo project has been repaired and is from now on again a formal part of the dsol framework. Renderable2D.contains() method is made non-final to allow returning false for non-clickable animation items. Added GISRenderable2D constructor with a z-value. Added setBackground(boolean) method in GIS Map. When parallel threads constructed a SimEvent, the uniqueness of the id was not guaranteed. An AtomicLong solves this problem. Renderable2D and derived classes can now specify the Locatable as their source. Data that is shown on the screen is not clickable for viewing or displaying. The ESRI Map can return the layers as a Map from String (name) to Layer. The layers in the ESRI Map can be toggled on or off with the showLayer and the hideLayer methods. Repaired bug for caching of shape-file content for an extent. Renderable2D.destroy() has been made non-final so it can be overridden. A Renderable2D can be added or removed from within the paint() method. This is, however, not really advisable, as this will only be done when the object is visible on the screen. Default log4j-2 configuration file added to dsol-base. The ImmutableCollections from opentrafficsim have been added to dsol-base. The AnimationPanel supports showing and hiding of layers, based on the class of the Locatable object. DSOL is now compiled with Java version 1.8. The Throw class now also is able to return an object (its first parameter) to allow for its use in a super(...) call. A Throw class with Throw.throw(condition, ...) and Throw.whenNull(object, ...) has been added to dsol-base to easily check pre- and post-conditions in constructors and methods. The dsol-base project is split into dsol-base, dsol-interpreter, dsol-introspection, dsol-event and dsol-naming. The internal dsol logger is retired and replaced by the log4j version 2 logger. The DEVSSimulatorInterface.scheduleXXX methods now return the event that they have scheduled. This enables the user to easily store the event for later cancellation. Timed events report the time as the absolute time rather than as the time wrapper. Statistical events sent by Persistent made different from those by Tally. The events within dsol-core are now timed events. DEVSRealTimeClock can fire CHANGE_SPEED_FACTOR_EVENT. Simulator can start() without firing event. Simulator can stop() without firing event. Simulator can step() without firing event. GisRenderable2D uses a self-generated unique id to identify itself in the Context. This avoids problems with Locatable objects that don't have a unique toString() result and therefore could not be distinguished. Renamed LocatableInterface to Locatable. Renamed ModelInterface to DSOLModel. Added a Identifiable<T> to identify instances with a getId() method. Subclasses Long and String have been created as well. Added the method 'runUpToAndIncluding' in the DEVSSimulatorInterface and implemented the method in all classes that implement this interface. In the dsol-swing project, changed the zoom with the scroll wheel to scroll around the cursor. The zoom with the plus and minus keys still zoom around the center position of the window. x and y positions of the mouse in world coordinates are shown with a tooltip. The tooltip can be switched on and off. x and y positions of the mouse in world coordinates can be requested with a method to show elsewhere on the control panel of a simulation. In the dsol-swing project, ensured in the introspection package that no errors will be given when the source has been deleted. In the dsol-swing project, created a method to zoom to the entire animation, and a public callable method to zoom to the whole extent as well as to set the default extent. In the dsol-swing project, fixed a small error in computeVisibleExtent(...) that caused extent zoom actions to be off sometimes. Improved the thread-safety of the DEVSRealTimeClock. Improved the alignment of the DEVSRealTimeClock with the wall-clock. ESRI shape files can be parsed with a user-defined transformation. The old constructors have been kept, so they can also be parsed as before. Added the dsol-akka project. Still empty, just as a reference for future developments. Cleaned up a lot of the outdated javadoc. Site generation has been updated. All DSOL projects now have a site with an adapted Velocity template and CSS updates. The Apache Velocity template has been based on theMaven Stylus Skin, version 1.5. A possibility to link to a site in a target="_blank" window has been added to the site.vm file. In addition, several of the menus have been updated, streamlined, and brought up-to-date with the latest changes in the Maven site standards. Simulator class does not throw RemoteExceptions anymore on most common scheduling methods, as this was not needed. Changes file is kept the same for all projects, as all projects increase version numbers at once. ClassUtil: cache the super constructors, methods, fields as well at the super constructors, methods, fields to avoid repetitive lookup of super constructors, methods, and fields, which can take a lot of time. Renderable2D: use the hashCode to store the renderable in the context tree. Guarantee a reproducible hashCode and equals. The toString() also gives the hashCode() as this can be used to identify the Renderable2D in the context tree. Two code metrics tools are added to the project reports: JDepend and JavaNCSS. They provide information on cyclometric complexity, fan in, fan out, etc. Use of Context rationalized and standardized. Context becomes: /experiment_hash_code/replication_number_or_id/animation/2D/renderables /experiment_hash_code/replication_number_or_id/animation/3D/renderables /experiment_hash_code/replication_number_or_id/statistics/graphs Code for binding a statistic: Context context = ContextUtil.lookup(simulator.getReplication().getContext(), "/statistics"); ContextUtil.bind(context, this); Code for binding a renderable2D: Context context = ContextUtil.lookup(simulator.getReplication().getContext(), "/animation/2D"); ContextUtil.bind(context, this); Removing the entire tree of an experiment: experiment.removeFromContext(); or if you just have a simulator: simulator.getReplication().getExperiment().removeFromContext(); ]]> ContextUtil: extended methods to be symmetrical (bind-unbind) and (initial-given) contexts. The Replication caches the context. Caching a context is removed from the Simulator. ContextUtil.destroySubContext method added to recursively remove subcontexts and bindings. Added a cleanUp() method to the Simulator to explicitly kill the worker thread that takes care of execution. Added a cleanUp() method to the WorkerThread to explicitly kill the worker thread. StatusBar got a cancelTimer() method to dispose of the timer so the StatusBar can be garbage collected. Hierarchy for AnimationPanel and GridPanel changed. Several changes in DSOLPanel. Fixed the jittergrid. Cobertura 2.7 used for Java 8. DEVSSimulator has a runUpTo(absoluteTime) method. GridPanel extends a BorderPanel, so panels can be placed N, S, E and W of the animation, e.g. to provide buttons or a legend. Several extensions were made in the ESDEVS package: AbstractDEVSPortModel got two new methods: public final Map> getInputPortMap() public final Map> getOutputPortMap() ]]> CoupledModel got four extra methods: public final Set> getInternalCouplingSet() public final Set> getExternalOutputCouplingSet() public final Set> getExternalInputCouplingSet() public final Set getModelComponents() ]]> Phase got one new method: public final String getName() ]]> The AtomicModel.initialize() method in ESDEVS has been changed to allow for re-initialization, e.g. after rollback. The method now looks as follows: public void initialize(final double e) { if (this.timeAdvance() != Double.POSITIVE_INFINITY) { try { this.nextEvent = new SimEvent( this.getSimulator().getSimulatorTime().plus(this.timeAdvance() - e), this, this, "deltaInternalEventHandler", null); this.timeLastEvent = this.getSimulator().getSimulatorTime().get(); this.simulator.scheduleEvent(this.nextEvent); } catch (RemoteException | SimRuntimeException exception) { Logger.severe(this, "initialize", exception); } } else { this.nextEvent = null; } } ]]> DEVSRealTimeClock has been added. old RealTimeClock has been removed. DEVSRealTimeClock has been given a speed factor. Made it possible to save and restore a state of a RandomStream, e.g. to make a model to rollback to an earlier state. Two methods have been added: saveState() : Object and restoreState(Object o). ESDEVS formalism files in DSOL-CORE upgraded with comments, final modifiers, and appropriate visibility for modifiers. In addition, the following variables in AtomicModel have changed visibility:
  • In AtomicModel.java file, changed private double timeLastEvent; to protected double timeLastEvent
  • In the same file, changed private double timeNextEvent; to protected double timeNextEvent
  • In the same file, changed private double elapsedTime; elapsedTime
  • protected boolean conflictStrategy = AtomicModel.INTERNAL_FIRST; instead of private in AtomicModel
  • non-final public SimEvent getNextEvent() in AtomicModel
  • ]]>
    Extended Replication, Experiment and Treatement with easy access classes. Repaired a number of dependencies in the easy access classes of Simulators. Comments in dsol-core updated. Changes for version 3.00.03. A lot of them are textual, a few to solve minor bugs and omissions. valueOf() methods instead of new Integer() etc. Small change in SimTime to satisfy Resource. Split the Animator into a DEVSAnimator and a DEVDESSAnimator class. SimTime relative number has to extend Number to get values for e.g., graphs. Comments. Final methods. Final fields. Checkstyle conventions. Complete project restructuring compared to DSOL 2.0. See website http://simulation.tudelft.nl/simulation/index.php/dsol/dsol-3-java-7]]> for more information.