Version history
v0.3.0
(2020-09-11) v0.3.0 was a significant improvement over 0.2.0 with a name change, multi-threading, resource handling and a streamlined documentation (announcement on Julia discourse).
Breaking Name Changes
- following the advice on discourse and in issue #13
Simulate.jlwas renamed toDiscreteEvents.jl. Github maintains and forwards the links. - there are further renamings to make the API more consistent:
Simfunction→fun,SFis no longer defined,SimProcess→Prc,SPis no longer defined,SimEvent→DiscreteEvent,SimCond→DiscreteCond,sample!→periodic!, was a name collision withDistributions.jl.reset!→resetClock!, was a name collision withDataStructures.jl
Streamlined Documentation
- the documentation has been reduced to minimal introductory examples and API documentation,
- everything else (explanations, further examples, notebooks, benchmarks) has been moved to a companion site: DiscreteEventsCompanion.
New Functionality in v0.3.0
Actionis introduced as synonym forUnion{Function,Expr,Tuple},- thereby in addition to
fun, you can now schedule arbitrary function closures as events, periodic!takes anActionas argument,- you can pass also symbols, expressions or other
funs or function closures as arguments tofun. They get evaluated at event time before being passed to the event function, DiscreteEvents.versiongives now the package version,DiscreteEvents.jlis now much faster due to optimizations,onthreadallows simulations with asynchronous tasks (processes and actors) to run much faster on threads other than 1,Resourceprovides an API for modeling limited resources,- you can now create a real time clock
RTClockand schedule events to it (experimental), - actors can register their message channels to the
clock.channelsvector and the clock will not proceed before they are empty, - processes and actors (asynchronous tasks) can transfer IO-operations to the clock with
now!or print directly via the clock, event!anddelay!now also accept stochastic time variables (aDistribution),- there is a
nkeyword parameter for the number of repeatevent!s, - you can seed the thread-specific RNGs with
pseed!.
Multi-Threading (Experimental)
- The data structure of
Clockhas been changed, it now has a fieldacproviding channels to parallel clocks, PClocksets up a clock with parallel active clocks on each available thread,- with
pclockall parallel clocks can be accessed and referenced, process!can now start tasks on parallel threads,event!can now schedule events for execution on parallel threads,periodic!can now register sampling functions or expressions to parallel clocks,- if setup with parallel clocks,
Clockbecomes the master to drive them and synchronize with them at eachΔttime step,
Other Breaking Changes in v0.3.0
τas an alias fortauis no longer defined.- The macros
@tau,@val,@SF,@SPare no longer defined. - Logging functions have been removed (they were not useful enough).
- A function
fgiven toPrcmust now take aClock-variable as its first argument. - The first
::Clock-argument todelay!andwait!andnow!can no longer be omitted. Since the task function has now aClock-variable available (see above), it must provide it todelay!,wait!andnow. event!no longer accepts aVectoras argument.Clkas alias of𝐶is no longer provided.event!now returns nothing.event!andperiodic!now doesn't take anymore the scope as an argument. Symbols or expressions given to them or included infuns are only evaluated inMainscope: this feature therefore can be used only by end users but not by any packages usingDiscreteEvents.jl.
Deprecated functionality in v0.3.0
- Evaluating expressions or symbols at global scope is much slower than using functions and gives now a one time warning. This functionality may be removed entirely in a future version. (Please write an issue if you want to keep it.)
v0.2.0
(2019-12-03) This is the first version fully supporting three modeling schemes: events, processes and sampling.
now!for IO-operations of processes,- functions and macros for defining conditions,
- conditional
wait!, - conditional events with
event!(sim, ex, cond), - most functions can be called without the first clock argument, default to
𝐶, event!takes an expression or aSimFunctionor a tuple or an array of them,- introduced aliases:
SFforSimFunctionandSPforSimProcess - introduced process-based simulation:
SimProcessandprocess!anddelay!, - extensive documentation,
- more examples.
v0.1.0
First registration 2019-11-04:
- event-/activity-/state-based simulation with
SimFunctionandevent!based on Julia functions and expressions, - introduced a central clock variable 𝐶,
Clockstate machine withinit!,run!,incr!,stop!,resume!,Loggerand logging functions,- first documentation,
- first examples,
- CI and development setup.