Add ReactionSystem.
This commit is contained in:
parent
9efca22f7b
commit
cf9a68ae6b
2 changed files with 11 additions and 1 deletions
4
rs.rkt
4
rs.rkt
|
@ -4,7 +4,7 @@
|
||||||
(require typed/graph "utils.rkt" "dynamics.rkt")
|
(require typed/graph "utils.rkt" "dynamics.rkt")
|
||||||
|
|
||||||
(provide
|
(provide
|
||||||
Species (struct-out reaction) Reaction
|
Species (struct-out reaction) Reaction ReactionSystem
|
||||||
make-reaction enabled?)
|
make-reaction enabled?)
|
||||||
|
|
||||||
(module+ test
|
(module+ test
|
||||||
|
@ -40,6 +40,8 @@
|
||||||
(set 'a 'b 'c)))
|
(set 'a 'b 'c)))
|
||||||
(check-false (enabled? (make-reaction '(a b) '(c d) '())
|
(check-false (enabled? (make-reaction '(a b) '(c d) '())
|
||||||
(set 'b 'e)))))
|
(set 'b 'e)))))
|
||||||
|
|
||||||
|
(define-type ReactionSystem (HashTable Symbol Reaction))
|
||||||
)
|
)
|
||||||
|
|
||||||
(require graph "utils.rkt" "generic.rkt")
|
(require graph "utils.rkt" "generic.rkt")
|
||||||
|
|
|
@ -73,6 +73,14 @@ reactants are in the set and none of its inhibitors are.
|
||||||
(set 'b 'e))
|
(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}
|
@section{Org-mode interaction}
|
||||||
|
|
||||||
This section contains some useful primitives for
|
This section contains some useful primitives for
|
||||||
|
|
Loading…
Reference in a new issue