The djutils dependency has been updated to version 1.05.03.
The DEVSSimulator, DEVSAnimator, DEVDESSSimulator and DEVDESSAnimator always executed one event
at the runUntil() method, also when there was no event to execute. The time could therefore jump
beyond the runUntil time. This has been repaired for these 4 simulators.
Updated djutils to 1.05.02 with a much smaller jar footprint.
Removed xstream from the dsol pom as it is not used anymore.
Took out the STEP_EVENT. Instead, the step follows the same rule as normal running: the START_EVENT
and the STOP_EVENT are fired before/after the execution of the step.
More clear contract for the old isRunning() method. Created a RunState class and a method
getRunState() that is much more precise in the state of the simulator: NOT_INITIALIZED, INITIALIZED,
STARTING, STARTED, STOPPING, STOPPED, ENDED with more precise methods: isStartingOrRunning(),
isStoppingOrStopped(). The Simulator now implements a clear state machine for the run state.
Created a clear contract for the Replication state. Created a ReplicationState class and a method
getReplicationState() that is precise in the state of the replication within simulator:
NOT_INITIALIZED, INITIALIZED, STARTED, ENDING, ENDED. The Simulator implements a clear state machine
for the replication state.
Fixed a bug where the run thread of the simulator / animator does not start very briefly after it has
been stopped, since it is possible that the worker thread has not yet stopped while the stop() method
has already returned.
Fixed the way how experiments and replications are triggered and advanced. The old way was to start at
experiment number -1, and replication number -1, and trigger an END_OF_EXPERIMENT_EVENT and an
END_OF_REPLICATION_EVENT at the start to advance the experiment and replication both to 0. This
has been replaced by a proper start that also triggers the right events.
Events for starting and stopping the simulation have been split into a STARTING_EVENT (Event) that
indicates that an external thread has asked to start the simulator, and a START_EVENT (TimedEvent)
that indicates that the run() method of the simulation has actually started. Same for the
STOPPING_EVENT (Event) and the STOP_EVENT (TimedEvent).
The way events are fired from the Simulator has been made much more precise. Start, stop, end_replication
and other events are fired as close as possible to the actual state change that happens. Double firing
of events is prevented as much as possible.
The methods for the simulator start(boolean), step(boolean) and stop(boolean) have been removed. These
methods could indicate not to fire a START, STEP or STOP event. Since sending these events is part
of the contract for a simulator, the option to not send them has been removed. Instead, startImpl(),
stepImpl() and stopImpl() have been created that just do the work without firing events that belong
to the user interface thread.
The START_REPLICATION_EVENT, WARMUP_EVENT and END_REPLICATION_EVENT are now defined in the Replication
rather than in the SimulatorInterface.
Fixed the BoxAndWhiskerPlot for not listening to TIMED event for timed, weighted tally.
Updated djutils to 1.05.01, where events have metadata, and TimedEvents are separated from non-timed
Events. All events in DSOL have been given the appropriate metadata that defines the types and names
of the fields in the event. TimedEvents and TimedEventTypes have been properly allocated as well.
The dsol-core DifferentialEquation had a VALUE_CHANGED_EVENT array of fixed length 30. In order to
give the right length to the array, the constructor of the DifferentialEquation now has the number of
variables as one of its arguments. The DifferentialEquationInterface in dsol-core has been removed for
now, as it was empty.
The jstats statistics have been moved to a separate project djutils-stats, as their use is independent
of simulation and much more generic than dsol itself. As a result, the dsol statistics now extend
the djutils-stats statistics. The nl.tudelft.simulation.jstats.statistics package has been
removed from dsol-core.
The DSOL statistics have been updated with the more advanced functions of the djutils-stats
project, such as the possibility to show percentiles, skewness and kurtosis.
All swing-related classes have been moved from dsol-core to dsol-swing. Also the generic 'Swingable'
class is now in dsol-swing. The table representations of dsol-core statistics have stayed, however,
in dsol-core because the table representation itself is independent of its rendering (which could
be using swing, on the web, or in a file).
All demos have been updated to use the new statistics classes.
All classes in dsol-naming have been completely re-implemented without using the heavyweight jndi
classes. Instead, a lightweight recursive tree structure has been used for the contexts that is better
scalable and can be more easily interacted with programmatically.
The DJUTILS version has been updated to 1.04.09, allowing for the newest implementation of
the (remote) event producers and event listeners.
The package nl.tudelft.simulation.naming.context.tree has been removed from the dsol-naming project.
The classes in this package were there for a DnD (Drag and Drop) interface for the context, which
would fit better in dsol-swing, and can be added to dsol-swing at a later stage.
Removed specific listeners for context changes. Context listeners are now implemented through
the normal 'notify' method.
A simple demo for remote contexts has been added to the dsol-naming project in the test sources.
Subscriptions for four different ContextScopes have been added: subscriptions for an object, a
level in the tree, a level plus the context object that is the root of this level, and a complete
subtree including future additions and deletions. The demo in dsol-naming uses an event producer
for the entire context tree.
The DJUTILS version has been updated to 1.04.05.
Animation did not always show in applications or web applications. A check on whether the replication
initialization event comes from the Simulator has been temporarily removed.
The event project has been moved to the DJUTILS project and can be found as part of djutils. See
https://djutils.org/manual/djutils-project/event-package for more information. Much of the event package
has been re-implemented and streamlined as part of the the transfer to DJUTILS.
As a result of the transfer of the event project, all references to nl.tudelft.simulation.dsol.event.* had to
be changed to org.djutils.event.*
The DJUNITS event project implements the EventProducer as an abstract class that needs a sourceId for firing events
rather than exposing 'this' in each event. Therefore, the constructor of the classes that extend EventProducer
had to be changed.
The DJUNITS event project forces the sourceId and content of an event, and the timestamp of a TimedEvent to be
Serializable, because events are often streamed into a database. Several classes had to be updated to reflect
this change.
The context package in the dsol-naming project has been completely re-implemented. The dependency on underlying
JNDI classes has been reduced, and the implementation is more lightweight than it was originally. The package
structure has been updated, and several of the classes have moved to new packages. Interfaces with a Name
object have been removed; only the String representations have been re-implemented. Many of the other interfaces
of the new context implementation are the same as or similar to the original ones. The new Context implementation
has been documented in https://simulation.tudelft.nl/dsol/manual/advanced/naming-context.
Rigid testing of the context package revealed many smaller and bigger mistakes (one of the reasons for
re-implementing the entire package).
Unit tests have been included for the entire context package and dsol-naming project.
A context demo has been added to the dsol-naming project under the test tree (DemoServer and DemoClient classes).
The CategoryLogger in DJUTILS has been turned into a singleton rather than a static class. SimLogger implements a
logger with functionality of the CategoryLogger, but the logger is simulator-aware and can print the simulator time
as part of the log message.
Changed the short values for NumericalIntegrator into an Enum called NumericalIntegratorType. The constructors
of all DifferentialEquation types have been adapted accordingly.
Added test code for an ordinary differential equation, and for a stiff set of ODEs.
Repaired the Gill numerical integration method (formula wrongly implemented).
Added test code for the simulators using multi-threaded testing.
An extended version of ConcurrentUnit for multi-threaded tests has been added to the test code to be able
to test running simulators. See https://github.com/jhalterman/concurrentunit for more info. The original pom
has not been included because it lacked several tests that we want to include here.
Very extensive unit test for random number generators (bins, test on bit level, all drawing methods).
Repaired the DX120 Random Number Generator (average draw was 0.25 instead of 0.5).
Repaired the nextInt(min, max) function in RandomNumberGenerator.
Added unit tests for dsol-base project to increase test coverage. TestCase has been replaced by @Test.
Updated the code for differential equations.
Fixed SphericalPoint in ots-base. The translation from a CartesianPoint to a SphericalPoint was wrong. Also,
the arguments of the constructor of a SphericalPoint have been changed. The call is now:
public SphericalPoint(final double radius, final double theta, final double phi)
Extra equals() methods have been added to DirectedPoint and CartesianPoint in dsol-base. The Tuple3d from
which these point types extends have an equals(Tuple3d) method that always wins from the equals(Object)
method because it is more specific. Therefore the RotX, RotY and RotZ were not taken into account when
comparing two DirectedPoint objects.
DirectedLine uses an embedded enum for Side instead of int.
CompositeFilter uses an embedded enum for Operator instead of int.
StateSaver uses byte[] instead of Object as that is the type in which data is stored. This has changed the
interface of StreamInterface in dsol-core.
Several small errors have been repaired in BitUtil in dsol-base.
Since the classes SwingWorker, ScreenManager and JMultiToolbarFrame are not used anymore in dsol, they
have been removed from dsol-base.
Ensured that "package-list" exists in apidocs for backward compatibility of javadoc linking.
Replaced FindBugs (which already had a problem supporting Java 8) with SpotBugs
(supporting later Java versions as well).
Package nl.tudelft.simulation.dsol.web.peer in dsol-web removed, as this is an internal set
of classes that should not be re-implemented. As of Java-9 they are completely internal-only.
The test in dsol-event have been upgraded to the latest JUnit test format.
djunits and djutils have been updated to the latest Java9+ compatible version.
Included jakarta.annotation-api to be compatible with Java 11+.
tt-tag in javadoc replaced by code-tag to be compatible with HTML-5 and Java-11+.
javadoc source version 8 added to pom-file to be compatible with Java-11+.
The versions of djunits and djutils have been updated to the latest version (4.01.00 and 1.03.01).
The versions of djunits and djutils have been updated to the latest version (4.00.04 and 1.03.00).
As a result of the new djunits version, the Money distributions have been removed.
As a result of the new djunits version, distributions for the following types have been added:
AbsorbedDose, AmountOfSubstance, CatalyticActivity, ElectricalCapacitance, ElectricalConductance,
ElectricalInductance, EquivalentDose, Illuminance, LuminousFlux, LuminousIntensity,
MagneticFluxDensity, MagneticFlux, and RadioActivity.
The calculation of the extent of the animation assumed zero-based coordinates for the calculation
of a small area around the total animation picture. This has been replaced by a relative area.
InputParameters can be parsed from a text file or from program arguments (using key.sub=value).
Added unit tests for language.d2 and inputparameters in dsol-base.
Removed the utility class DirectionalShape from language.d2 in dsol-base. The functionality is
well taken care of by the standard Java classes.
djunits version updated to 3.01.04 to allow for value-with-unit parsing of strings.
Repaired errors with null values in the CollectionRenderer in dsol-swing. toString() is not
called anymore for null values; instead "null" is given as output.
All distribution functions have getters for their parameters.
The truncated Normal distribution function has been added.
Uniform and Triangular distribution functions have been given more clear parameter names.
The triangular distribution now allows for min == mode, or max == mode but not both.
dsol-web has been expanded with further functions. It is now possible to run and view multiple
simulations in parallel by using a token in the web address that uniquely identifies the
simulation session. See AbstractTestDemoServer as a first version in dsol-web.
dsol-web allows for reading of the InputParameters from a web page.
The InputParameterDouble and InputParameterFloat did not check for NaN. This has been repaired.
The InputParameyterDoubleScalar and InputParameyterFloatScalar checked for the min/max values
in the double/float rather than in the SI values including the unit. This has been repaired.
DJUTILS has been updated to version 1.00.06. This resulted in several imports for the Cat class
for logging to be changed.
The 'jumps' that sometimes occurred in the animation of the DEVSRealTimeClock have been repaired.
This was due to an accumulating error in the translation of short waits when no events were happening,
which was corrected with a time jump when the next event was executed. The code that is responsible
for handling this correctly is:
// make a small time step for the animation during wallclock waiting, but never beyond the next event
// time. Changed 2019-04-30: this is now recalculated based on latest system time after the 'sleep'.
synchronized (super.semaphore)
{
A nextEventSimTime = nextEvent.getAbsoluteExecutionTime().get();
R deltaToWall0inSimTime = simulatorTimeForWallClockMillis(
(System.currentTimeMillis() - wallTime0) * currentSpeedFactor);
A currentWallSimTime = simTime0.plus(deltaToWall0inSimTime).get();
if (nextEventSimTime.compareTo(currentWallSimTime) < 0)
{
this.simulatorTime.set(nextEventSimTime);
wallMillisNextEventSinceBaseline = 0.0; // force breakout of the loop
}
else
{
this.simulatorTime.set(currentWallSimTime);
}
}
]]>
The DEVSRealTimeClock got an extra setting: public void setAnimation(final boolean animation). This setting
indicates whether the animation thread will be started or not. For Web-based applications, the simulation
has to be scaled to the real-time clock, but the animation events do not come from the separate
AnimationThread, but from a timer in the Web application. In tat case setAnimation(false) can be
called on the DEVSRealTimeClock after constructing it.
A 'ConcurrentModificationException' on the visibilityMap in the AnimationPanel in dsol-swing has been repaired
with a 'synchronized' block for its use. The main program thread was still setting the visibility of the
classes, while the first animation was already iterating over the visibility to see which classes need to
be drawn on the screen.
The AnimationThread corrects the time between animation updates for the time it takes to draw the animation.
It thereby tries to stay as close as possible to the given update frequency.
Introspection for Map, ImmutableCollection, and ImmutableMap added.
The DelegateIntrospection has been added to introspection. When an object implements the
DelegateIntrospection interface, it delegates the introspection to it parent. The implementation
has been set up that multiple delegations are handled correctly. The function is to provide
intermediate animation objects the option to delegate the introspection to their parent object.
TabbedParameterDialog in ots-swing made better accessible for extensions with user-built
fields, e.g. for radio buttons (see dsol manual - advanced topics).
djutils version updated to 1.00.02.
Copyright notice updated to 2019.
AnimationPanel.visibilityMap changed into a synchronized map to avoid ConcurrentModificationException
on the call of isShowClass().
TabbedParameterDialog updated to be able to easily extend it with different renderings
for the data types.
The recursive call of drawGrid() in dsol-swing's gridPanel has been replaced by a while-loop.
The recursive version sometimes led to an infinite loop.
The XML-parsing has been removed from the dsol-demo project. Instead, interactive applications and
applications using the console or the Web have been created.
The site contains a reference to the new DSOL manual at https://simulation.tudelft.nl/dsol/manual/
The SimCounter, SimTally and SimPersistent have easy access inner classes such as
SimTally.TimeDoubleUnit to link them strongly typed to the right simulator.
The SimPersistent class now handles SimTime objects for the timestamp.
The Persistent class can now also handle Calendar objects for the timestamp.
The simulator-aware versions of the Counter, Tally and Persistent have been renamed into
SimCounter, SimTally and SimPersistent, to avoid having classes with exactly the same
name within the dsol-core project, which has always been very confusing.
The interface for the InputParameter now forces each parameter to return a getCalculatedValue()
in addition to the getValue(). This is important, as for the typed selection functions
using a map, the getValue() returns the map (the value of that parameter), whereas
getCalculatedValue() returns the value that can be calculated from the map. This is
particularly important for the distribution functions. To enable this and to make it
type-safe, the InputParameter interface got one extra generic to denote the 'calculated' type.
The Replication in dsol-core defines a default random stream using a MersenneTwister
with the name "default" and a seed equal to the hashCode of the Replication's id.
The Replication in dsol-core now has an id, and requests the id to be used in the constructor.
The id can be of type String or of type int.
The DSOL categories for the CategoryLogger in DJUTILS have been added to dsol-base into
the nl.tudelft.simulation.dsol.logger package.
Generic classes to multiple projects have been moved to the DJUTILS project.
Examples are the immutable collections, the Throw class, URLResource, Primitive,
ClassUtil, and the CategoryLogger for tinylog. See www.djutils.org for more info.
Distribution functions for scalars with units have been added. They wrap one of
the existing (continuous) distributions. Example:
DistContinuousLength lengthDist = new DistContinuousLength(
new DistUniform(stream, 1.0, 2.0), LengthUnit.METER);
...
Length length = lengthDist.draw();
]]>
Because of the distribution functions with scalars, the existing distribution class
DistContinuousTime has been renamed into DistContinuousSimulationTime.
The ExperimentalFrame, Experiment, Replication and Treatment classes have been
provided with generics to make them compatible with the type of time used, and
the type of simulator used. Easy access classes for the 8 most common types of
simulation time have been provided.
Since version 3.03 of DSOL, models have specified input parameters. These can be
shown on the screen for user input, set by reading them from a file, or set in the
user code of the model itself. The input parameters are stored a SortedMap.
Each input parameter has a key (a String without spaces and periods) and a value.
Sorting of the input parameters is done based on a priority variable, currently
implemented as a double (making it easy to insert a parameter between parameter #3
with a priority 3 and parameter #4 with a priority 4 by giving it a priority
value of e.g., 3.5).
The DSOLModel interface has convenience methods for the extension classes. So it is now
possible to use e.g.:
public SimulatorInterface.TimeDouble getSimulator()
]]>
A class AbstractDSOLModel to easily create a model has been added, together with easy
access inner classes. The AbstractDSOLModel contains fields and access methods for the
simulator, input parameters, and output statistics. It extends EventProducer to provide
statistics to the statistics classes.
The DSOLModel interface has been moved to the nl.tudelft.simulation.dsol.model package.
The ExperimentParser has been moved to the dsol-demo project as it is only used there.
Potentially a dsol-experiment project could be created at some point in time with an
improved version of the xml parsing classes.
The double entries of the classes 'BoxAndWhiskerChart', 'Histogram' and 'XYChart'
have been removed. The classes have been combined into one new class, as they only
differed in terms of the constructors.
The package names of the swing implementation of the UI have been renamed to contain
the word 'swing'.
In order to accommodate the dsol-web implementation, the dsol-swing project has
been split into a dsol-animation project with the implementation-independent
animation classes and a dsol-swing package with the swing-dependent implementation
of the user interface and animation. dol-web contains the Web-specific
implementation of the animation and user interface.
The ParamComments utility class has been added to the dsol-build-tools project.
It adds or updates the type for each parameter in the javadoc of all java files in
/src/main/java in all or in selected projects in the workspace. After running the
utility, do a refresh on all projects, followed by a Source - Format.
The .classpath files have a classpathentry for /src/main/resources after a Maven Update with
an entry 'excluding="**" kind="src"'. The exclusion means that the export of a Runnable jar
in Eclipse does not work. Therefore this update on svn ensures that the export of a jar file
works. Ensure that after each Maven Update in Eclipse, the "Excludes:" entry for
/src/main/resources in each project's Properties - Build path - Source is set to (None)
before committing the sources!
A small program called CleanClassfileFiles has been added to dsol-build-tools to help in
setting the exclusions correctly in the build path. After running this program, do a
Project - Clean - All.
Several experiments with server-side events (SSE), WebSockets, Ajax/jQuery in dsol-web to see
what the best implementation is for the web-based interaction with DSOL models.
dsol-naming, dsol-event, dsol-interpreter, dsol-introspection were updated with the
correct copyright notice and package-info.java files for each of the packages.
The references to java.sun.com in dsol-interpreter have been updated to the SE8 JVM Specification
at https://docs.oracle.com/javase/specs/jvms/se8/html/index.html.
The END_REPLICATION_EVENT was fired twice. Therefore, a special endReplication() method has
been implemented that just takes care of the end of the replication.
The TIME_CHANGED_EVENT of the DEVSSimulator fired at each event, and acted more as a
state changed event. Now, the TIME_CHANGED_EVENT only fires when the time did actually change.
Deleted the dsol-fx project; animation with be done with dsol-swing and dsol-web.
dsol-base and dsol-core were updated with the correct copyright notice and package-info.java files
for each of the packages.
The SimTime classes got two extra methods: A getAbsoluteZero() and R getRelativeZero().
Method diff(A) has been added. T.diff(A) returns R.
The methods T.minus(A):R and T.minus(T):R have been renamed to T.diff(A):R and T.diff(T):R, because
the erasure of T.minus(A) and T.minus(R) is the same for the SimTimeDouble, SimTimeFloat and
SimTimeLong classes.
The DEVS classes in dsol-core have been expanded with generics with respect to SimTime.
The flow classes in dsol-core have been expanded with generics with respect to SimTime.
The AnimationPanel in dsol-swing has an extra method called
isShowClass(final Class<? extends Locatable> locatableClass);
Most of the methods in the AnimationPanel class in dsol-swing have been declared as non-final.
The paint() method in Renderable2D in dsol-swing has been declared as non-final.
The InputListener in the animation.D2.mouse package in dsol-swing does not select an object when
the CTRL-key is pressed during a click on the object.
A CategoryLogger has been added to the logger package in dsol-base. For the CategoryLogger it is
possible to turn categories on and off for display, enabling fine-grained debugging and reporting.
CategoryLogger uses tinylog's Logger for the actual logging work.
A SimLogger has been added to the logger package in dsol-core. The SimLogger extends the
CategoryLogger and is able to display the simulation time as part of the log message.
A SimTimeFormatter class determines how the message with time is formatted.
All calls to printStackTrace() and to older loggers has been replaced by calls to the
CategoryLogger (in dsol-base, dsol-event, dsol-naming, dsol-interpreter, dsol-introspection),
or to the SimLogger (in dsol-core, dsol-swing, dsol-web, dsol-demo).
As log4j2 is quite complicated to configure, it has been replaced by the faster
and smaller tinylog package.
The Console in dsol-swing has been repaired so it captures the log stream again. This is done with
a second logging Writer that acts in parallel with the system console writer. Levels and message
format strings can be set separately for the system console logger and the swing console logger.
Level and message format can be changed with console.setLogLevel(...) and
console.setLogMessageFormat(...).
In order to support logging to the console, the DSOLPanel got a getConsole() method.
The text colors on the Console in dsol-swing are adapted for the Logger.level.
Static helper class ConsoleLogger has been added to easily set or change the logging level
and format for the system console logger. Call first with ConsoleLogger.create(), and
do this before any other (parallel) loggers have been created, such as the swing logger.
Level and message format can be changed with ConsoleLogger.setLevel(...) and
ConsoleLogger.setMessageFormat(...).
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.