README.md in y_petri-2.1.30 vs README.md in y_petri-2.1.31
- old
+ new
@@ -83,9 +83,40 @@
If you have `gnuplot` gem installed properly, you can view plots:
```ruby
plot_state
plot_flux
```
+## Gillespie method
+
+To try out another simulation method, Gillespie algorithm, open a fresh session
+and type:
+```ruby
+require 'y_petri'
+require 'sy'
+require 'mathn'
+include YPetri
+
+A = Place m!: 10
+B = Place m!: 10
+AB = Place m!: 0
+AB_association = Transition s: { A: -1, B: -1, AB: 1 }, rate: 0.1
+AB_dissociation = Transition s: { AB: -1, A: 1, B: 1 }, rate: 0.1
+A2B = Transition s: { A: -1, B: 1 }, rate: 0.05
+B2A = Transition s: { A: 1, B: -1 }, rate: 0.07
+
+set_step 1
+set_target_time 50
+set_sampling 1
+set_simulation_method :gillespie
+
+run!
+
+print_recording
+```
+Again, you can visualize the results using `gnuplot` gem:
+```ruby
+ plot_state
+```
So much for the demo for now! Thanks for trying YPetri!
## Contributing
1. Fork it
\ No newline at end of file