Skip to content

Commit e2fd425

Browse files
committed
Update README
1 parent dd3c1fa commit e2fd425

1 file changed

Lines changed: 49 additions & 50 deletions

File tree

README.md

Lines changed: 49 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -37,63 +37,62 @@ julia> Pkg.add("SimJulia")
3737

3838
#### Release Notes
3939

40-
* Version 0.5 does no longer integrate a continuous time solver. A continuous time solver using SimJulia as its discrete event engine can be found in [QuantizedStateSystems](https://github.com/BenLauwens/QuantizedStateSystems.jl.git)
41-
* Starting from SimJulia v0.4.1, [ResumableFunctions](https://github.com/BenLauwens/ResumableFunctions.jl.git) is a separate package exporting the `resumable` and `yield` macro and it is a dependency for `SimJulia`. Users have to take into account the following syntax change:
40+
* Version 0.5 does no longer integrate a continuous time solver. A continuous time solver using SimJulia as its discrete event engine can be found in the repository [QuantizedStateSystems](https://github.com/BenLauwens/QuantizedStateSystems.jl.git)
41+
* Starting from version 0.4.1, [ResumableFunctions](https://github.com/BenLauwens/ResumableFunctions.jl.git) is a separate package exporting the `resumable` and `yield` macro and it is a dependency for `SimJulia`. Users have to take into account the following syntax change:
4242
* `@yield return arg` is replaced by `@yield arg`
43-
* Version 0.4 is a complete rewrite: more julian and less pythonic.
44-
* Only supports Julia v0.6 and above.
45-
* Scheduling of events can be done with `Base.Dates.Datetime` and `Base.Dates.Period`:
46-
```julia
47-
using SimJulia
48-
using Base.Dates
49-
50-
function datetimetest(sim::Simulation)
51-
println(nowDatetime(sim))
52-
yield(Timeout(sim, Day(2)))
53-
println(nowDatetime(sim))
54-
end
55-
56-
datetime = now()
57-
sim = Simulation(datetime)
58-
@process datetimetest(sim)
59-
run(sim, datetime+Month(3))
60-
```
61-
* The discrete event features are on par with version 0.3. (STABLE)
62-
* Two ways of making `Processes` are provided:
63-
- using the existing concept of `Tasks`:
43+
* Version 0.4 only supports Julia v0.6 and above. It is a complete rewrite: more julian and less pythonic.
44+
* The discrete event features are on par with version 0.3 and following features are added:
45+
* Scheduling of events can be done with `Base.Dates.Datetime` and `Base.Dates.Period`:
6446
```julia
65-
function fibonnaci(sim::Simulation)
66-
a = 0.0
67-
b = 1.0
68-
while true
69-
println(now(sim), ": ", a)
70-
yield(Timeout(sim, 1))
71-
a, b = b, a+b
72-
end
47+
using SimJulia
48+
using Base.Dates
49+
50+
function datetimetest(sim::Simulation)
51+
println(nowDatetime(sim))
52+
yield(Timeout(sim, Day(2)))
53+
println(nowDatetime(sim))
7354
end
7455

75-
sim = Simulation()
76-
@process fibonnaci(sim)
77-
run(sim, 10)
56+
datetime = now()
57+
sim = Simulation(datetime)
58+
@process datetimetest(sim)
59+
run(sim, datetime+Month(3))
7860
```
79-
- using a novel finite-statemachine approach:
80-
```julia
81-
using ResumableFunctions
82-
83-
@resumable function fibonnaci(sim::Simulation)
84-
a = 0.0
85-
b = 1.0
86-
while true
87-
println(now(sim), ": ", a)
88-
@yield Timeout(sim, 1)
89-
a, b = b, a+b
61+
* Two ways of making `Processes` are provided:
62+
- using the existing concept of `Tasks`:
63+
```julia
64+
function fibonnaci(sim::Simulation)
65+
a = 0.0
66+
b = 1.0
67+
while true
68+
println(now(sim), ": ", a)
69+
yield(Timeout(sim, 1))
70+
a, b = b, a+b
71+
end
9072
end
91-
end
9273

93-
sim = Simulation()
94-
@coroutine fibonnaci(sim)
95-
run(sim, 10)
96-
```
74+
sim = Simulation()
75+
@process fibonnaci(sim)
76+
run(sim, 10)
77+
```
78+
- using a novel finite-statemachine approach:
79+
```julia
80+
using ResumableFunctions
81+
82+
@resumable function fibonnaci(sim::Simulation)
83+
a = 0.0
84+
b = 1.0
85+
while true
86+
println(now(sim), ": ", a)
87+
@yield Timeout(sim, 1)
88+
a, b = b, a+b
89+
end
90+
end
91+
92+
sim = Simulation()
93+
@coroutine fibonnaci(sim)
94+
run(sim, 10)
95+
```
9796
* Documentation is automated with [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl). (WIP)
9897

9998

0 commit comments

Comments
 (0)