Add ReactionSystem.

This commit is contained in:
Sergiu Ivanov 2023-08-08 18:34:40 +02:00
parent 9efca22f7b
commit cf9a68ae6b
2 changed files with 11 additions and 1 deletions

4
rs.rkt
View File

@ -4,7 +4,7 @@
(require typed/graph "utils.rkt" "dynamics.rkt")
(provide
Species (struct-out reaction) Reaction
Species (struct-out reaction) Reaction ReactionSystem
make-reaction enabled?)
(module+ test
@ -40,6 +40,8 @@
(set 'a 'b 'c)))
(check-false (enabled? (make-reaction '(a b) '(c d) '())
(set 'b 'e)))))
(define-type ReactionSystem (HashTable Symbol Reaction))
)
(require graph "utils.rkt" "generic.rkt")

View File

@ -73,6 +73,14 @@ reactants are in the set and none of its inhibitors are.
(set 'b 'e))
]}
@deftype[ReactionSystem]{
A reaction system is a dictionary mapping reaction names
(@racket[Symbol]s) to @racket[Reaction]s.
}
@section{Org-mode interaction}
This section contains some useful primitives for