Sha256: 9a9df2f823b40146b0b7bf595f4686d4b7130dd8714bcb18b797739ee84b6ec4

Contents?: true

Size: 492 Bytes

Versions: 16

Compression:

Stored size: 492 Bytes

Contents

#! /usr/bin/ruby
# encoding: utf-8

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

plot_state

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
y_petri-2.1.50 test/examples/gillespie.rb
y_petri-2.1.49 test/examples/gillespie.rb
y_petri-2.1.48 test/examples/gillespie.rb
y_petri-2.1.47 test/examples/gillespie.rb
y_petri-2.1.46 test/examples/gillespie.rb
y_petri-2.1.45 test/examples/gillespie.rb
y_petri-2.1.44 test/examples/gillespie.rb
y_petri-2.1.42 test/examples/gillespie.rb
y_petri-2.1.40 test/examples/gillespie.rb
y_petri-2.1.39 test/examples/gillespie.rb
y_petri-2.1.37 test/examples/gillespie.rb
y_petri-2.1.36 test/examples/gillespie.rb
y_petri-2.1.35 test/examples/gillespie.rb
y_petri-2.1.34 test/examples/gillespie.rb
y_petri-2.1.33 test/examples/gillespie.rb
y_petri-2.1.31 test/examples/gillespie.rb