The dsol-demo project has been repaired and is from now on again a formal part of the dsol framework.
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.