From 485b859f34311338c976ecf278c6fc137c6685d6 Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Thu, 22 Oct 2020 10:39:27 +0200 Subject: [PATCH] example: Show an example of read-org-sbn. --- example/example.org | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/example/example.org b/example/example.org index b0be0f5..6c45115 100644 --- a/example/example.org +++ b/example/example.org @@ -1058,6 +1058,33 @@ tab [[file:dots/examplew206DH.svg]] :end: + For convenience, there is a similar function =read-org-sbn= which + allows reading an SBN. + + #+NAME: sbn-figure2 + | - | A | B | C | + | A | -1 | 1 | 2 | + | B | 2 | -2 | -2 | + | C | -1 | 2 | -1 | + + #+NAME: sbn-figure2-sg + #+BEGIN_SRC racket :results silent drawer :var sbn-figure2=munch-sexp(sbn-figure2) +(dotit ((compose pretty-print-state-graph + build-full-01-state-graph + make-syn-dynamics + tbn->network + read-org-sbn) sbn-figure2)) + #+END_SRC + + #+BEGIN_SRC dot :file dots/sbn-figure2-sg.svg :results raw drawer :cmd sfdp :noweb yes +<> + #+END_SRC + + #+RESULTS: + :results: + [[file:dots/sbn-figure2-sg.svg]] + :end: + * Reaction systems :PROPERTIES: :header-args:racket: :prologue "#lang racket\n(require graph dds/rs dds/utils)"