Options

Blog - Connections: Petri nets, systems biology, and beyond

I've started work on a blog article with the working title Connections: Petri nets, systems biology, and beyond. My proposal, with some initial feedback from John, is in another forum post. The initial version of the blog article is here. I've looked at How to write a blog entry, and I think there are a few formatting things I will need to fix up.

My plan now is to continue adding text to the various sections in the blog, and to make sure that the sections are all well connected with each other. My goal is a step-by-step progression. Comments are always welcome and can be posted on this forum page.

«1

Comments

  • 1.
    edited September 2012

    Here are some comments as I read it your article. You write:

    UML, SBML, SBGN, .

    Could you please explain what these acronyms mean, the first time they show up? An undefined acronym is like an undigestable ball of letters. In general, acronyms save the writer a tiny bit of work but cause nonexpert readers a lot of hardship, so I spell them out as often as possible.

    CRN

    Likewise.

    In the table:

    Mem Comp ABM SBML Xholon

    Likewise.

    Btw, it's fascinating to me that you say 'n.a.' in the category theory slot for 'container' or 'compartment'. If this is an important general concept, it's either already part of category theory or should be. I suspect that it already is. One thing you don't mention is that the categories that show up in Petri net theory are much more than mere categories: they're symmetric monoidal categories. What this means is that the objects do not correspond to species in a chemical reaction network (as your table suggests) but instead to tensor products of species. Simply put: a reaction goes not from a single species to a single species but from a bunch of species to a bunch of species!

    This makes me suspect that when we include 'containers' we are preventing reactions that involves species in different containers. Is something like that right?

    But there has to be some way to get things from one container to another, or else we just have a number of completely independent chemical reaction networks, which is a bit dull.

    I have guesses for how all this gets expressed in category theory jargon, but I'd have to learn more details to be sure.

    One last comment: if we include all the sketches for future work near the bottom of this article, it's too much to be a single blog article. Even if you have the energy to fill in all those details, it'll be more than most people can absorb in a single sitting. So, how about doing something more bite-sized and manageable, and then, if you want, going back and doing another... and another... and another?

    I for one would love to read a chatty discussion of different systems like UML, SBML, SBGN, Xholon, etc... with some indication of whether these are programming languages, or commercially available software, or 'standards', or what... and some of their key differences. Pictures like the ones you've included are a good way to give a feel for what these things are, but lots of plain English talk also helps. Then, with that under my belt, I'd be ready to read more theoretical stuff comparing details of these systems and what they do.

    Comment Source:Here are some comments as I read it your article. You write: > UML, SBML, SBGN, . Could you please explain what these acronyms mean, the first time they show up? An undefined acronym is like an undigestable ball of letters. In general, acronyms save the writer a tiny bit of work but cause nonexpert readers a lot of hardship, so I spell them out as often as possible. > CRN Likewise. In the table: > Mem Comp > ABM > SBML > Xholon Likewise. Btw, it's fascinating to me that you say 'n.a.' in the category theory slot for 'container' or 'compartment'. If this is an important general concept, it's either already part of category theory or should be. I suspect that it already is. One thing you don't mention is that the categories that show up in Petri net theory are much more than mere categories: they're symmetric monoidal categories. What this means is that the objects _do not_ correspond to species in a chemical reaction network (as your table suggests) but instead to _tensor products_ of species. Simply put: a reaction goes not from a single species to a single species but from a _bunch_ of species to a _bunch_ of species! This makes me suspect that when we include 'containers' we are preventing reactions that involves species in different containers. Is something like that right? But there has to be some way to get things from one container to another, or else we just have a number of completely independent chemical reaction networks, which is a bit dull. I have guesses for how all this gets expressed in category theory jargon, but I'd have to learn more details to be sure. One last comment: if we include all the sketches for future work near the bottom of this article, it's too much to be a single blog article. Even if you have the energy to fill in all those details, it'll be more than most people can absorb in a single sitting. So, how about doing something more bite-sized and manageable, and then, if you want, going back and doing another... and another... and another? I for one would love to read a chatty discussion of different systems like UML, SBML, SBGN, Xholon, etc... with some indication of whether these are programming languages, or commercially available software, or 'standards', or what... and some of their key differences. Pictures like the ones you've included are a good way to give a feel for what these things are, but lots of _plain English talk_ also helps. Then, with that under my belt, I'd be ready to read more theoretical stuff comparing details of these systems and what they do.
  • 2.

    I agree with all your comments John. I'll take care of the acronyms soon. In the table, I've changed Category to Symmetric Monoidal Category.

    I've updated the table to include an extra column representing the connections between active and passive objects. I'm tentatively calling it Ports because that's the UML terminology, which is what I'm most familiar with. Feinberg, in his lectures (p. 2-2), states that a chemical reaction network (CRN) consists of three sets - species, complexes, and reactions. Most descriptions of Petri nets (e.g. wikipedia) describe an equivalent three things - sets of places, arcs, and transitions. In SBML, each reaction has a listOfReactants and a listOfProducts. In general, all the approaches I discuss have a concept of something additional that connects things together, a something that makes the things more than just the sum of a bunch of parts.

    I'm very interested to get your ideas on what category theory has to say about 'container' or 'compartment' or 'hierarchy'.

    This makes me suspect that when we include 'containers' we are preventing reactions that involves species in different containers. Is something like that right?

    Feinberg, in his CRN lectures, uses implicit containers in some of his models and diagrams. Figure 2.3 (page 2-23) shows a reactor container and an environment container that feeds and removes species into and from the reactor. Figure 2-4 (page 2-29) shows three containers - 2 cells inside an environment. Feinberg introduces a zero complex that wouldn't be necessary if he used explicit containers. I think we don't necessarily prevent reactions from occurring, but it becomes more and more difficult to keep things straight without containers.

    But in biology, there are a lot of reactions that won't occur (or at least not well or optimally) unless things are organized into separate containers. SBML has an explicit 'compartment' type, and every SBML model must have at least one compartment "because everything has to exist somewhere".

    Comment Source:I agree with all your comments John. I'll take care of the acronyms soon. In the table, I've changed _Category_ to _Symmetric Monoidal Category_. I've updated the table to include an extra column representing the connections between active and passive objects. I'm tentatively calling it _Ports_ because that's the UML terminology, which is what I'm most familiar with. Feinberg, in his lectures (p. 2-2), states that a chemical reaction network (CRN) consists of three sets - species, complexes, and reactions. Most descriptions of Petri nets (e.g. wikipedia) describe an equivalent three things - sets of places, arcs, and transitions. In SBML, each reaction has a listOfReactants and a listOfProducts. In general, all the approaches I discuss have a concept of something additional that connects things together, a something that makes the things more than just the sum of a bunch of parts. I'm very interested to get your ideas on what category theory has to say about 'container' or 'compartment' or 'hierarchy'. > This makes me suspect that when we include 'containers' we are preventing reactions that involves species in different containers. Is something like that right? Feinberg, in his CRN lectures, uses implicit containers in some of his models and diagrams. Figure 2.3 (page 2-23) shows a reactor container and an environment container that feeds and removes species into and from the reactor. Figure 2-4 (page 2-29) shows three containers - 2 cells inside an environment. Feinberg introduces a _zero complex_ that wouldn't be necessary if he used explicit containers. I think we don't necessarily prevent reactions from occurring, but it becomes more and more difficult to keep things straight without containers. But in biology, there are a lot of reactions that won't occur (or at least not well or optimally) unless things are organized into separate containers. SBML has an explicit 'compartment' type, and every SBML model must have at least one compartment "because everything has to exist somewhere".
  • 3.
    edited September 2012

    This might end up off-topic with respect to this particular blog article, but I find this issue of "containers" or "boundaries" difficult to deal with in thinking about biochemical networks in particular and biological systems in general.

    If you restrict a model to the timescale of particular biochemical reaction networks then perhaps assuming containers around various subsets is reasonable. But moving on to longer timescales, the containers relevant to biological systems were presumably constructed in some way by some (perhaps even the same) biochemical reaction networks. So on these larger timescales, the distinction between the reaction networks and the containers within which they occur breaks down. Over perhaps even longer timescales, the structure and composition of the containers may change. This potentially higher-order change will be neglected by most models, but seems fundamental to the way in which biochemical networks work.

    It seems that some higher-order logic needs to be brought to bear on this kind of problem to avoid circular definitions (i.e. impredicativity) in constructing models that incorporate longer timescales approaching at some point those relevant to evolution. Of course, from a practical perspective this sounds kind of hard to simulate using methods that have been employed in modeling biochemical reaction networks (e.g. ODEs), but maybe there is a way to avoid this issue without simply assuming that one only cares about small timescales.

    Any direct (i.e. "Why not use this method ...") or meta- (i.e. "Your statement doesn't make sense for this reason...") ideas on this?

    I've been looking lately into modern flavors of type theory (since it was historically developed to deal with impredicativity) and considering example applications of higher-order functions from both computer science and physics. It seems like it could be a good idea, but I'm not sure how to bring ideas from computational trinitarianism down to earth with respect to models of biochemical networks!

    Comment Source:This might end up off-topic with respect to this particular blog article, but I find this issue of "containers" or "boundaries" difficult to deal with in thinking about biochemical networks in particular and biological systems in general. If you restrict a model to the timescale of particular biochemical reaction networks then perhaps assuming containers around various subsets is reasonable. But moving on to longer timescales, the containers relevant to biological systems were presumably constructed in some way by some (perhaps even the same) biochemical reaction networks. So on these larger timescales, the distinction between the reaction networks and the containers within which they occur breaks down. Over perhaps even longer timescales, the structure and composition of the containers may change. This potentially higher-order change will be neglected by most models, but seems fundamental to the way in which biochemical networks work. It seems that some higher-order logic needs to be brought to bear on this kind of problem to avoid circular definitions (i.e. impredicativity) in constructing models that incorporate longer timescales approaching at some point those relevant to evolution. Of course, from a practical perspective this sounds kind of hard to simulate using methods that have been employed in modeling biochemical reaction networks (e.g. ODEs), but maybe there is a way to avoid this issue without simply assuming that one only cares about small timescales. Any direct (i.e. "Why not use this method ...") or meta- (i.e. "Your statement doesn't make sense for this reason...") ideas on this? I've been looking lately into modern flavors of type theory (since it was historically developed to deal with impredicativity) and considering [example applications of higher-order functions](http://math.andrej.com/2006/03/21/interesting-higher-order-functionals/) from both computer science and physics. It seems like it could be a good idea, but I'm not sure how to bring ideas from [computational trinitarianism](http://ncatlab.org/nlab/show/computational+trinitarianism) down to earth with respect to models of biochemical networks!
  • 4.

    Cameron: Some quick early thoughts on boundaries, containers, and timescales. In my blog article I start with Petri nets and chemical reaction networks (CRN). After reading your comment I was thinking that all the approaches in my article are top-down, while your comment is more about bottom-up approaches that require longer timescales because something new has to emerge. For me it's interesting to think how Petri nets and CRNs could be used to model the emergence of boundaries and containers.

    Maturana and Varela's concept of autopoiesis is probably relavent. McMullin and Varela created an artificial chemistry model where a lipid container emerges from the interactions of a catalyst with small substrate molecules. The catalyst (Petri net transition, CRN reaction) transforms sustrate molecules (Petri net places, CRN species) into link/lipid molecules. The lipid molecules have the ability to link together and form enclosed structures (containers).

    So I should state in my blog article that I'm only considering top-down small-timescale approaches where nothing new needs to emerge.

    Comment Source:Cameron: Some quick early thoughts on boundaries, containers, and timescales. In my blog article I start with Petri nets and chemical reaction networks (CRN). After reading your comment I was thinking that all the approaches in my article are top-down, while your comment is more about bottom-up approaches that require longer timescales because something new has to emerge. For me it's interesting to think how Petri nets and CRNs could be used to model the emergence of boundaries and containers. Maturana and Varela's concept of [autopoiesis](http://en.wikipedia.org/wiki/Autopoiesis) is probably relavent. McMullin and Varela created an [artificial chemistry model](http://samoa.santafe.edu/media/workingpapers/97-01-002.pdf) where a lipid container emerges from the interactions of a catalyst with small substrate molecules. The catalyst (Petri net transition, CRN reaction) transforms sustrate molecules (Petri net places, CRN species) into link/lipid molecules. The lipid molecules have the ability to link together and form enclosed structures (containers). So I should state in my blog article that I'm only considering top-down small-timescale approaches where nothing new needs to emerge.
  • 5.

    Ken Webb wrote:

    Feinberg, in his CRN lectures, uses implicit containers in some of his models and diagrams. Figure 2.3 (page 2-23) shows a reactor container and an environment container that feeds and removes species into and from the reactor. Figure 2-4 (page 2-29) shows three containers - 2 cells inside an environment. Feinberg introduces a zero complex that wouldn't be necessary if he used explicit containers. I think we don't necessarily prevent reactions from occurring, but it becomes more and more difficult to keep things straight without containers.

    I'll look at those. But can you help me out by saying, generally and abstractly, how containers work in one of the formalisms you know? I suggested one possibility that is too simple: we have a finite set of containers, each of which comes along with its own chemical reaction network, and time evolution proceeds independently in each container according to the master equation (or rate equation, if you prefer). This is too boring because there's no interaction at all between containers.

    So, presumably we want to allow some interaction between chemicals in different containers, but we want it to be limited in some way. And I want to know what way.

    My question here is orthogonal from Cameron's remark:

    this issue of "containers" or "boundaries" difficult to deal with in thinking about biochemical networks in particular and biological systems in general.

    I completely agree that it's tricky to get this right---but you make it sound like SBML and Xholon and 'Memb Comp' have some way of saying how containers work, and I'd like to know what that is, regardless of whether it's 'right'. Or do they leave it so open-ended that it's up to us to straighten it out?

    I'm very interested to get your ideas on what category theory has to say about 'container' or 'compartment' or 'hierarchy'.

    I can imagine formalisms where containers have no topological aspect, but also formalisms where they're formed by 'membranes' - surfaces in n-dimensional space, probably n = 3 for most biologists. I can imagine formalisms where things (perhaps just species, but perhaps including other containers) are allowed to pass through the walls of these membranes with certain probabilities given by certain rules. I can imagine formalisms where containers are allowed to split, merge, or otherwise change topology. Ideas very similar to these already show up in topological quantum field theory.

    But I'll be able to do a better job once I better understand some existing formalism for handling containers. Then I can try to re-express that formalism in a more elegant way... and perhaps improve it a bit, in the process.

    Comment Source:Ken Webb wrote: > Feinberg, in his CRN lectures, uses implicit containers in some of his models and diagrams. Figure 2.3 (page 2-23) shows a reactor container and an environment container that feeds and removes species into and from the reactor. Figure 2-4 (page 2-29) shows three containers - 2 cells inside an environment. Feinberg introduces a zero complex that wouldn't be necessary if he used explicit containers. I think we don't necessarily prevent reactions from occurring, but it becomes more and more difficult to keep things straight without containers. I'll look at those. But can you help me out by saying, generally and abstractly, how containers work in one of the formalisms you know? I suggested one possibility that is too simple: we have a finite set of containers, each of which comes along with its own chemical reaction network, and time evolution proceeds independently in each container according to the master equation (or rate equation, if you prefer). This is too boring because there's no interaction at all between containers. So, presumably we want to allow some interaction between chemicals in different containers, but we want it to be limited in some way. And I want to know what way. My question here is orthogonal from Cameron's remark: > this issue of "containers" or "boundaries" difficult to deal with in thinking about biochemical networks in particular and biological systems in general. I completely agree that it's tricky to get this right---but you make it sound like SBML and Xholon and 'Memb Comp' have _some_ way of saying how containers work, and I'd like to know what that is, regardless of whether it's 'right'. Or do they leave it so open-ended that it's up to us to straighten it out? > I'm very interested to get your ideas on what category theory has to say about 'container' or 'compartment' or 'hierarchy'. I can imagine formalisms where containers have no topological aspect, but also formalisms where they're formed by 'membranes' - surfaces in n-dimensional space, probably n = 3 for most biologists. <img src = "http://math.ucr.edu/home/baez/emoticons/tongue2.gif" alt = ""/> I can imagine formalisms where things (perhaps just species, but perhaps including other containers) are allowed to pass through the walls of these membranes with certain probabilities given by certain rules. I can imagine formalisms where containers are allowed to split, merge, or otherwise change topology. Ideas very similar to these already show up in topological quantum field theory. But I'll be able to do a better job once I better understand some existing formalism for handling containers. Then I can try to re-express that formalism in a more elegant way... and perhaps improve it a bit, in the process.
  • 6.

    Thanks for mentioning cats Ken. I've tried to get people interested in coalgebraic specification (describing bisimulation and reversible programs). Baart Jacobs seems to be leading this work and a free intro book is here.

    A container with impure side-effects on the real world is a monad. Yee! Perhaps I get a prize for a first mention on Azimuth (but obviously not TWF).

    Comment Source:Thanks for mentioning cats Ken. I've tried to get people interested in coalgebraic specification (describing bisimulation and reversible programs). Baart Jacobs seems to be leading this work and a free intro book is [here](http://www.cs.ru.nl/B.Jacobs/CLG/JacobsCoalgebraIntro.pdf). A container with impure side-effects on the real world is a monad. Yee! Perhaps I get a prize for a first mention on Azimuth (but obviously not TWF).
  • 7.
    edited September 2012

    This is more than somewhat previous as they say up North. I am in the middle of typing in the code from this thesis on dynamic monadic systems for modelling global vulnerabilities. It talks about a lot of international bureaucratic stuff but the code seems aimed at climate and I will be trying to use it with Functional Reactive Programming (FRP) for climate models in general and not just vulnerability.

    It's the first climate code I've come across in Haskell.

    On the FRP front I've been playing with an FRP webserver called webwire.

    The netwire library on which it's based is ideal for circuit modelling which is something Glyn Adgie and I are interested in.

    Hope this wasn't too off topic but it's let me push some hobby horses.

    FI A couple of years ago Simon Peyton-Jones (known as SPJ) described FRP as probably the most exciting development in Haskell programming.

    Comment Source:This is more than somewhat previous as they say up North. I am in the middle of typing in the code from this [thesis](http://www.pik-potsdam.de/research/transdisciplinary-concepts-and-methods/research-areas/copy_of_model-specification-and-program-development/ionescu-diss.pdf) on dynamic monadic systems for modelling global vulnerabilities. It talks about a lot of international bureaucratic stuff but the code seems aimed at climate and I will be trying to use it with [Functional Reactive Programming (FRP)](http://en.wikipedia.org/wiki/Functional_reactive_programming) for climate models in general and not just vulnerability. It's the first climate code I've come across in Haskell. On the FRP front I've been playing with an FRP webserver called [webwire](http://hackage.haskell.org/package/webwire). The netwire library on which it's based is ideal for circuit modelling which is something Glyn Adgie and I are interested in. Hope this wasn't too off topic but it's let me push some hobby horses. FI A couple of years ago Simon Peyton-Jones (known as SPJ) described FRP as probably the most exciting development in Haskell programming.
  • 8.
    edited September 2012

    As usual I didn't post the comment I originally wanted to. I found Vladmimir Voevodski's Univalent Foundations to be the most motivating paper I've read since the Rosetta Stone paper.

    So what struck me about Harper's trinity was that he has proofs, cats, types but Voevodski has homotopy theory, cats and types.

    So the obvious questions seem to be: how appropriate is homotopy theory for organising proofs,cats and types and how different and overlapping are the approaches in these 3 papers?

    Comment Source:As usual I didn't post the comment I originally wanted to. I found Vladmimir Voevodski's [Univalent Foundations](http://www.math.ias.edu/~vladimir/Site3/Univalent_Foundations_files/univalent_foundations_project.pdf) to be the most motivating paper I've read since the Rosetta Stone paper. So what struck me about Harper's trinity was that he has proofs, cats, types but Voevodski has homotopy theory, cats and types. So the obvious questions seem to be: how appropriate is homotopy theory for organising proofs,cats and types and how different and overlapping are the approaches in these 3 papers?
  • 9.

    John: I'll try to write down a few ideas about containers, but it's a tough area to get a handle on. I'll write more later about composite structure in UML, and Xholon which is my own software, but I take the idea of containment too much for granted in those approaches, so I'll need to sneak up on the ideas from a different direction. I'd like to write something about the membranes in biological cells. But let me start with HTML, specifically this very page in the Azimuth forum.

    Every HTML page has a hierarchical structure. You can see this by looking at the page source, Ctrl-U in Firefox and Chrome. Even better is if you use a debug tool in Firefox like Firebug, or the Developer tools in Chrome (Tool --> Developer Tools, and then select Elements). You'll see a structure like the following:

    <html>
      <head>...</head>
      <body id="CommentsPage">
        <div id="SiteContainer">
          <div id="Session">...</div>
          <div id="Header">...</div>
          <div id="Body">
            <div id="Panel">...</div>
            <div id="Content">
              <div class="ContentInfo Top">...</div>
              <div id="ContentBody">...</div>
              <div class="ContentInfo Middle">...</div>
              <div id="Form" class="AddComments">...</div>
              <div class="ContentInfo Bottom">...</div>
            </div>
            <a id="pgbottom"> </a>
          </div>
        </div>
      </body>
    </html>
    

    The HTML <div> element provides high level structure for the page. It's a container element that can be nested to any desired level. It typically doesn't do anything itself. It usually just has an id and/or class attribute, and some child nodes. The child nodes do the work of providing visible markup (<p> <img> <a> <h2> etc.), or executable code (<script>). The <div> container just provide useful targets for the scripts and for Cascadable Style Sheets (CSS) instructions, to make it easier for them to process the page and format the different sections. Specialized languages such as XPath, CSS selectors, and jQuery allow developers to navigate pages using id and class names of <div> and other tags.

    So <div> just provides structure to the document. A div structure is like the chapters and sections in a book, what you see in a table of contents. Imagine writing a 1000 page textbook without first doing an outline. The sections force you to write about different things in different parts of the book, rather than randomly jumping around.

    I think that membranes in a cell do something similar. They force enough of the right stuff together so that things can happen. If the chemical mixture in the cell is too diffuse, then nothing will happen. If the ideas in a book are too randomly spread around through a 1000 pages, then the ideas won't get across.

    I would suggest that a formal theory of containers would need to consider both the structure of HTML (and the related XML, SVG, and MathML), and the structure of cells. Containers don't do anything on their own. Although of course the lipid bilayer, transport proteins, and other elements that make up a biological membrane do perform essential physical tasks. It's tricky to agree on exactly what should be labeled as a container.

    But keep in mind that the blog article I'm writing uses the very simple Feinberg CRN model that doesn't have any containers. I'm hoping to do a follow-up simple climate model that does have a significant containment structure, based on a Petri net. Also keep in mind that UML, HTML, XML, and related standards aren't really formalisms in the mathematical sense.

    I like your statement

    So, presumably we want to allow some interaction between chemicals in different containers, but we want it to be limited in some way. And I want to know what way.

    A eukaryotic cell (the type in multi-cellular organisms like humans) has many different compartments (containers). Membranes regulate the flow of chemicals between compartments. I think basically the lipid bilayer prevents any interaction, but then selectively allows specific reactions. Transport proteins project across the bilayer from one compartment to the other, and passively or actively permit only certain exchanges. Bilayers also work in many other ways (including what you mention in the 2nd to the last paragraph of your comment 6), as do proteins. It's all incredibly complicated. Look at some of the structural diagrams on the wikipedia page.

    A few tentative conclusions at this point:

    • Containers don't do anything on their own. They just help to organize.

    • Containers become more and more necessary with increasing complexity.

    Comment Source:John: I'll try to write down a few ideas about containers, but it's a tough area to get a handle on. I'll write more later about composite structure in UML, and Xholon which is my own software, but I take the idea of containment too much for granted in those approaches, so I'll need to sneak up on the ideas from a different direction. I'd like to write something about the membranes in biological cells. But let me start with HTML, specifically this very page in the Azimuth forum. Every HTML page has a hierarchical structure. You can see this by looking at the page source, Ctrl-U in Firefox and Chrome. Even better is if you use a debug tool in Firefox like Firebug, or the Developer tools in Chrome (Tool --> Developer Tools, and then select Elements). You'll see a structure like the following: <pre> &lt;html> &lt;head>...&lt;/head> &lt;body id="CommentsPage"> &lt;div id="SiteContainer"> &lt;div id="Session">...&lt;/div> &lt;div id="Header">...&lt;/div> &lt;div id="Body"> &lt;div id="Panel">...&lt;/div> &lt;div id="Content"> &lt;div class="ContentInfo Top">...&lt;/div> &lt;div id="ContentBody">...&lt;/div> &lt;div class="ContentInfo Middle">...&lt;/div> &lt;div id="Form" class="AddComments">...&lt;/div> &lt;div class="ContentInfo Bottom">...&lt;/div> &lt;/div> &lt;a id="pgbottom"> &lt;/a> &lt;/div> &lt;/div> &lt;/body> &lt;/html> </pre> The HTML &lt;div> element provides high level structure for the page. It's a container element that can be nested to any desired level. It typically doesn't do anything itself. It usually just has an id and/or class attribute, and some child nodes. The child nodes do the work of providing visible markup (&lt;p> &lt;img> &lt;a> &lt;h2> etc.), or executable code (&lt;script>). The &lt;div> container just provide useful targets for the scripts and for Cascadable Style Sheets (CSS) instructions, to make it easier for them to process the page and format the different sections. Specialized languages such as XPath, CSS selectors, and jQuery allow developers to navigate pages using id and class names of &lt;div> and other tags. So &lt;div> just provides structure to the document. A div structure is like the chapters and sections in a book, what you see in a table of contents. Imagine writing a 1000 page textbook without first doing an outline. The sections force you to write about different things in different parts of the book, rather than randomly jumping around. I think that membranes in a cell do something similar. They force enough of the right stuff together so that things can happen. If the chemical mixture in the cell is too diffuse, then nothing will happen. If the ideas in a book are too randomly spread around through a 1000 pages, then the ideas won't get across. I would suggest that a formal theory of containers would need to consider both the structure of HTML (and the related XML, SVG, and MathML), and the structure of cells. Containers don't do anything on their own. Although of course the lipid bilayer, transport proteins, and other elements that make up a biological membrane do perform essential physical tasks. It's tricky to agree on exactly what should be labeled as a container. But keep in mind that the blog article I'm writing uses the very simple Feinberg CRN model that doesn't have any containers. I'm hoping to do a follow-up simple climate model that does have a significant containment structure, based on a Petri net. Also keep in mind that UML, HTML, XML, and related standards aren't really formalisms in the mathematical sense. I like your statement > So, presumably we want to allow some interaction between chemicals in different containers, but we want it to be limited in some way. And I want to know what way. A [eukaryotic cell](http://en.wikipedia.org/wiki/Eukaryote) (the type in multi-cellular organisms like humans) has many different compartments (containers). Membranes regulate the flow of chemicals between compartments. I think basically the lipid bilayer prevents any interaction, but then selectively allows specific reactions. Transport proteins project across the bilayer from one compartment to the other, and passively or actively permit only certain exchanges. Bilayers also work in many other ways (including what you mention in the 2nd to the last paragraph of your comment 6), as do proteins. It's all incredibly complicated. Look at some of the structural diagrams on the wikipedia page. A few tentative conclusions at this point: * Containers don't do anything on their own. They just help to organize. * Containers become more and more necessary with increasing complexity.
  • 10.
    edited September 2012

    Thanks, Ken!

    I'm reasonably familiar with the basic basics of cellular biology in a rough sort of way... what I really need to catch up on is existing attempts to formalize the concept of 'container'. I'm not really eager to plunge in without doing a bit more reading. The main attempts I've heard about are the 'membrane calculi' sketched here:

    and the work of Gordon Plotkin:

    (This is not supposed to be an exhaustive list: it's just what I could quickly find.)

    Comment Source:Thanks, Ken! I'm reasonably familiar with the basic basics of cellular biology in a rough sort of way... what I really need to catch up on is existing attempts to _formalize_ the concept of 'container'. I'm not really eager to plunge in without doing a bit more reading. The main attempts I've heard about are the 'membrane calculi' sketched here: * Luca Cardelli, [Brane calculi: interactions of biological membranes](http://lucacardelli.name/Papers/Brane%20Calculi.pdf). * Jes&uacute;s F. Almansa, [Brane calculi](http://www-sop.inria.fr/mimosa/Pascal.Zimmer/mobility/branes.pdf). and the work of Gordon Plotkin: * Michael Pedersen and Gordon Plotkin, [A language for biochemical systems](http://homepages.inf.ed.ac.uk/gdp/publications/Lang_Bio_Sys_Design_Spec.pdf). * Gordon Plotkin, [A calculus of chemical systems](http://homepages.inf.ed.ac.uk/gdp/publications/CCS.pdf). (This is not supposed to be an exhaustive list: it's just what I could quickly find.)
  • 11.
    edited September 2012

    I think these have come up before:

    1. Some links related to bigraphs
    2. Milner R. The space and motion of communicating agents. 2009.
    3. Damgaard TC, Danos V, Krivine J. A language for the cell. December 2008;(TR-2008-116):1–67.
    4. Damgaard TC, Krivine J. A generic process-language for biological systems based on bigraphs. October 2008;(TR-2008-115):1–37.
    5. Damgaard TC, Højsgaard E, Krivine J. Formal cellular machinery. In: SASB 2011. 2011 p. 1–24.

    John I just noticed that you have checked out bigraphs about three years ago. Do you have any more recent impressions beyond what is in that comment thread?

    Comment Source:I think these have come up before: 1. Some [links related to bigraphs](http://www.cl.cam.ac.uk/archive/rm135/uam-theme.html) 1. Milner R. [The space and motion of communicating agents](http://www.cl.cam.ac.uk/archive/rm135/Bigraphs-draft.pdf). 2009. 1. Damgaard TC, Danos V, Krivine J. [A language for the cell](http://itu.dk/en/Forskning/Technical-Reports/2008/TR-2008-116). December 2008;(TR-2008-116):1–67. 1. Damgaard TC, Krivine J. [A generic process-language for biological systems based on bigraphs](http://itu.dk/en/Forskning/Technical-Reports/2008/TR-2008-115). October 2008;(TR-2008-115):1–37. 1. Damgaard TC, Højsgaard E, Krivine J. [Formal cellular machinery](http://www.pps.jussieu.fr/~jkrivine/homepage/Research_files/fcm.pdf). In: SASB 2011. 2011 p. 1–24. John I just noticed that you have [checked out bigraphs](http://golem.ph.utexas.edu/category/2009/08/the_pi_calculus.html#c025973) about three years ago. Do you have any more recent impressions beyond what is in that comment thread?
  • 12.

    Folks interested in chemistry might like my friend Mark Leach's Metasynthesis thesaurus and chemical database which interactively predicts reactions for a huge number of chemical species. The book casts the whole chemical apparatus into Lewis acid-base theory. There has been much discussion among chemistry teachers of the validity of acid-base theory, FMO and Hartree-Fock models.

    Comment Source:Folks interested in chemistry might like my friend Mark Leach's [Metasynthesis](http://www.meta-synthesis.com/) thesaurus and chemical database which interactively predicts reactions for a huge number of chemical species. The book casts the whole chemical apparatus into Lewis acid-base theory. There has been much discussion among chemistry teachers of the validity of acid-base theory, FMO and Hartree-Fock models.
  • 13.

    I'll look at the references you guys mention, and get back with some thoughts on how those ideas fit in with UML, Xholon and such. I'm familiar with Luca Cardelli's Brane Calculi, and I've looked at some of Milner's papers. I'm going to first post another comment from the software development world I'm most familiar with.

    Comment Source:I'll look at the references you guys mention, and get back with some thoughts on how those ideas fit in with UML, Xholon and such. I'm familiar with Luca Cardelli's Brane Calculi, and I've looked at some of Milner's papers. I'm going to first post another comment from the software development world I'm most familiar with.
  • 14.

    A major incentive for using containment is dealing with the complexity found in large systems. Here's a relatively simple example, and another attempt to figure out what containers are good for.

    If you google for the following

    "radiative-convective model" STELLA Robinson

    one of the links on the first page should be a books.google entry pointing to a page in Walter Robinson's book "Modeling Dynamic Climate Systems". Figure 2.9 on page 23 shows the design of a radiative-convective climate model in STELLA, a commercial system dynamics modeling tool. If you open Robinson's model in STELLA, this is the diagram you will see. The circles and rectangles correspond roughly with Petri net places, and objects with little valves on top correspond roughly with Petri net transitions. STELLA and other system dynamics tools lack a concept of containment, so the Robinson diagram redraws the same structure five times to show five layers of the atmosphere. It looks like each layer was separately hand drawn, and each object in the diagram has a different name (ex: T0, T1, T2, T3, T4, T5 for temperatures).

    I started to reimplement this model using Xholon webEdition. The web page with my version is here. About half-way down the page is the XML for the composite structure hierarchy. A key element in the containment structure is the following line

    <Layer multiplicity="5">

    Layer is contained within Atmosphere, and in turn contains all the objects mentioned in the Robinson model. With this containment structure, it now becomes trivial to vary the number of layers, for example

    <Layer multiplicity="20">

    or even

    <Layer multiplicity="100">

    You can run the Xholon model by clicking the Run button at the top of the page, and then clicking the Step button once. It creates the number of Layer objects specified in the multiplicity attribute, and draws a Scalable Vector Graphic (SVG) image with that number of layers. If you change the value of multiplicity, and then click Refresh and Step, the runtime overlay will redisplay the containment structure and the SVG image. The model doesn't implement the differential equations yet.

    I'm quickly going through the book that was published in 1994 describing the ObjecTime tool and the Real-Time Object-Oriented Modeling (ROOM) methodology behind the tool, which are the ultimate source of my ideas on containment. I'll write a comment here soon about that. ObjecTime and ROOM were developed to deal with the complexity in large real-time telecommunication systems containing millions of lines of programming code.

    Comment Source:A major incentive for using containment is dealing with the complexity found in large systems. Here's a relatively simple example, and another attempt to figure out what containers are good for. If you google for the following <pre>"radiative-convective model" STELLA Robinson</pre> one of the links on the first page should be a books.google entry pointing to a page in Walter Robinson's book "Modeling Dynamic Climate Systems". Figure 2.9 on page 23 shows the design of a radiative-convective climate model in STELLA, a commercial system dynamics modeling tool. If you open Robinson's model in STELLA, this is the diagram you will see. The circles and rectangles correspond roughly with Petri net places, and objects with little valves on top correspond roughly with Petri net transitions. STELLA and other system dynamics tools lack a concept of containment, so the Robinson diagram redraws the same structure five times to show five layers of the atmosphere. It looks like each layer was separately hand drawn, and each object in the diagram has a different name (ex: T0, T1, T2, T3, T4, T5 for temperatures). I started to reimplement this model using Xholon webEdition. The web page with my version is [here](http://www.primordion.com/Xholon/wb/openwb.php?q=2605571&f=gist.github.com/raw/). About half-way down the page is the XML for the composite structure hierarchy. A key element in the containment structure is the following line <pre>&lt;Layer multiplicity="5"></pre> Layer is contained within Atmosphere, and in turn contains all the objects mentioned in the Robinson model. With this containment structure, it now becomes trivial to vary the number of layers, for example <pre>&lt;Layer multiplicity="20"></pre> or even <pre>&lt;Layer multiplicity="100"></pre> You can run the Xholon model by clicking the Run button at the top of the page, and then clicking the Step button once. It creates the number of Layer objects specified in the multiplicity attribute, and draws a Scalable Vector Graphic (SVG) image with that number of layers. If you change the value of multiplicity, and then click Refresh and Step, the runtime overlay will redisplay the containment structure and the SVG image. The model doesn't implement the differential equations yet. I'm quickly going through the book that was published in 1994 describing the ObjecTime tool and the Real-Time Object-Oriented Modeling (ROOM) methodology behind the tool, which are the ultimate source of my ideas on containment. I'll write a comment here soon about that. ObjecTime and ROOM were developed to deal with the complexity in large real-time telecommunication systems containing millions of lines of programming code.
  • 15.

    I've added a page to the Azimuth Project site, linked from my personal page, containing information about the Real-Time Object-Oriented Modeling (ROOM) methodology. It's in the form of excerpts from the ROOM book with my comments. I've pieced this together to try to answer John's question:

    But can you help me out by saying, generally and abstractly, how containers work in one of the formalisms you know?

    The problem with software methodologies and standards is that they usually aren't formally defined anywhere, at least not in the way that mathematicians are looking for. Software developers are just looking for something that works. The ROOM book does have some good informal descriptions, and a section on Formal Specifications.

    Comment Source:I've added a page to the Azimuth Project site, linked from my personal page, containing information about the [Real-Time Object-Oriented Modeling](http://www.azimuthproject.org/azimuth/show/Real-time+object-oriented+modeling+%28ROOM%29) (ROOM) methodology. It's in the form of excerpts from the ROOM book with my comments. I've pieced this together to try to answer John's question: > But can you help me out by saying, generally and abstractly, how containers work in one of the formalisms you know? The problem with software methodologies and standards is that they usually aren't formally defined anywhere, at least not in the way that mathematicians are looking for. Software developers are just looking for something that works. The ROOM book does have some good informal descriptions, and a section on _Formal Specifications_.
  • 16.

    Thanks so much John and Cameron for the suggested readings. I was especially looking for these authors' ideas on containers, compartments, and hierarchy. The various papers all recognize it as important.

    The abstract in Cardelli's Brane Calculi paper begins:

    We introduce a family of process calculi with dynamic nested membranes.

    Pedersen and Plotkin write in the abstract for their Language for Biochemical Systems (LBS) paper:

    ... networks in terms of reactions between modified complexes, occurring concurrently inside a hierarchy of compartments and with possible cross-compartment interactions and transport.

    Damgaard et al. write in the abstract of their Formal cellular machinery paper:

    ... structures interactions and agents from the most basic elements of the cell (protein interaction sites) to higher order ones (compartments and molecular species).

    Regev, Panina, Silverman, Cardelli, and Shapiro begin their BioAmbients paper with:

    Compartments play an essential role in the functioning of biomolecular systems, by organizing them in a hierarchical and modular way.

    I found the material on Milner's Bigraph formalism, which I've never heard of before, the most interesting. The bigraph concept meshes very nicely with the ideas of the Real-time Object-Oriented Modeling (ROOM) methodology that I mentioned in previous comments. As a bonus, Milner describes bigraphs in terms of symmetric partial monoidal (spm) categories. It fits well with what I'm familiar with, and (I hope) well with John and others' more mathematical backgrounds. So to me bigraphs look like the perfect vehicle to connect ideas from ROOM, UML composite structure, SysML blocks, and Xholon, with Category Theory.

    As an example, at the end of the notes on ROOM that I posted a few days ago, I included a few ROOM/UML structure diagrams. These diagrams illustrate Milner's central ideas on bigraphs. In chapter 1 of the draft of his book (Bigraphs-draft.pdf, p.3), The idea of bigraphs, he writes:

    In this chapter we develop the notion of bigraph from the simple idea that it consists of two independent structures on the same set of nodes. ... a forest is a set of rooted trees; and a hypergraph consists of a set of nodes, together with a set of edges each linking any number of nodes.

    The nodes in the three UML structure diagrams are part of the hierarchical tree structure of the model (parent child relationships), and are also part of a graph that links these nodes through ports and edges.

    Comment Source:Thanks so much John and Cameron for the suggested readings. I was especially looking for these authors' ideas on containers, compartments, and hierarchy. The various papers all recognize it as important. The abstract in Cardelli's _Brane Calculi_ paper begins: > We introduce a family of process calculi with dynamic nested membranes. Pedersen and Plotkin write in the abstract for their _Language for Biochemical Systems_ (LBS) paper: > ... networks in terms of reactions between modified complexes, occurring concurrently inside a hierarchy of compartments and with possible cross-compartment interactions and transport. Damgaard et al. write in the abstract of their _Formal cellular machinery_ paper: > ... structures interactions and agents from the most basic elements of the cell (protein interaction sites) to higher order ones (compartments and molecular species). Regev, Panina, Silverman, Cardelli, and Shapiro begin their _BioAmbients_ paper with: > Compartments play an essential role in the functioning of biomolecular systems, by organizing them in a hierarchical and modular way. I found the material on Milner's _Bigraph_ formalism, which I've never heard of before, the most interesting. The bigraph concept meshes very nicely with the ideas of the _Real-time Object-Oriented Modeling_ (ROOM) methodology that I mentioned in previous comments. As a bonus, Milner describes bigraphs in terms of _symmetric partial monoidal (spm) categories_. It fits well with what I'm familiar with, and (I hope) well with John and others' more mathematical backgrounds. So to me bigraphs look like the perfect vehicle to connect ideas from ROOM, UML composite structure, SysML blocks, and Xholon, with Category Theory. As an example, at the end of the [notes on ROOM](http://www.azimuthproject.org/azimuth/show/Real-time+object-oriented+modeling+%28ROOM%29) that I posted a few days ago, I included a few ROOM/UML structure diagrams. These diagrams illustrate Milner's central ideas on bigraphs. In chapter 1 of the draft of his book (Bigraphs-draft.pdf, p.3), _The idea of bigraphs_, he writes: > In this chapter we develop the notion of _bigraph_ from the simple idea that it consists of two independent structures on the same set of nodes. ... a _forest_ is a set of rooted trees; and a _hypergraph_ consists of a set of nodes, together with a set of edges each linking any number of nodes. The nodes in the three UML structure diagrams are part of the hierarchical tree structure of the model (parent child relationships), and are also part of a graph that links these nodes through ports and edges.
  • 17.
    edited September 2012

    A model checker for bigraphical reactive systems written in C++ (I wish it were in Haskell or OCaml) has recently become available. As you can see, the code is on github. The associated paper is

    • Perrone G, Debois S, Hildebrandt TT. A model checker for Bigraphs. Proceedings of the 27th Annual ACM Symposium on Applied Computing - SAC ’12 2012;1320.

    There have also been attempts to define type systems for process calculi. This paper is titled as if it's about bigraphs, but they appear to only work through some details for the $\pi$-calculus

    Comment Source:A [model checker](http://bigraph.org/bigmc/) for bigraphical reactive systems written in C++ (I wish it were in Haskell or OCaml) has recently become available. As you can see, the code is on [github](https://github.com/bigmc/bigmc/). The associated paper is * Perrone G, Debois S, Hildebrandt TT. [A model checker for Bigraphs](http://itu.dk/~gdpe/pubs/sacsvt12.pdf). Proceedings of the 27th Annual ACM Symposium on Applied Computing - SAC ’12 2012;1320. There have also been attempts to define type systems for process calculi. This paper is titled as if it's about bigraphs, but they appear to only work through some details for the $\pi$-calculus * Hildebrandt TT, Sangiorgi D. [Type Systems for Bigraphs](http://www.itu.dk/people/elsborg/ITU-TR-2008-110.pdf). Lecture Notes in Computer Science 2009;5474:126–140.
  • 18.
    edited September 2012

    Cameron wrote:

    John I just noticed that you have checked out bigraphs about three years ago. Do you have any more recent impressions beyond what is in that comment thread?

    I never made heads or tails out of them. I got a bit more interested a few days ago when looking at Plotkin's work on containers; he has a paper called On Hierarchical Graphs: Reconciling Bigraphs, Gs-Monoidal Theories and Gs-Graphs which gave me my first vague glimpse about what the heck bigraphs could be good for.

    The definition in Wikipedia is typical of the quasi-mathematical style of writing that I have a lot of trouble understanding:

    A bigraph is a 5-tuple:

    $$(V,E,ctrl,prnt,link) : \langle k,X \rangle \to \langle m,Y \rangle$$ where $V$ is a set of
    nodes, $E$ is a set of edges, $ctrl$ is the control map that assigns controls to nodes, $prnt$ is the parent map that defines the nesting of nodes, and $link$ is the link map that defines the link structure.

    The notation $\langle k,X \rangle \to \langle m,Y \rangle$ indicates that the bigraph has $k$ holes (sites) and a set of inner names $X$ and $m$ regions, with a set of outer names $Y$. These are respectively known as the inner and outer interfaces of the bigraph.

    In math it's perfectly fine to introduce sets and made up arbitrary names for their elements---we call the elements of $V$ 'nodes', we call the elements of $E$ 'edges'. Fine.

    But it's no good to introduce maps without saying what they're maps from and to, so saying '$ctrl$ is the control map that assigns controls to nodes' is very mysterious, since the word 'controls' has not been introduced as the name for elements of some set. Is $ctrl$ a map from the set of nodes to some set of 'controls' that hasn't been mentioned? Is $ctrl$ a map from nodes to nodes, that assigns to each node a node called its control? Or is $ctrl*$ a map from nodes to edges? We are left to guess.

    Ditto for $prnt$, although I feel okay guessing that $prnt$ is a map from nodes to nodes. And ditto for $link$: saying this map 'defines the link structure' means nothing to me; what I want to know is what it's a map from and what it's a map to.

    This may be what happened to me the last time I tried to understand bigraphs. I can't abide this sort of mush, where you're supposed to sort of know what's going on so they don't tell you. I'm sure someone somewhere has given a proper definition.

    Comment Source:Cameron wrote: > John I just noticed that you have checked out bigraphs about three years ago. Do you have any more recent impressions beyond what is in that comment thread? I never made heads or tails out of them. I got a bit more interested a few days ago when looking at Plotkin's work on containers; he has a paper called [On Hierarchical Graphs: Reconciling Bigraphs, Gs-Monoidal Theories and Gs-Graphs](http://homepages.inf.ed.ac.uk/gdp/publications/Montanari.pdf) which gave me my first vague glimpse about what the heck bigraphs could be good for. The [definition in Wikipedia](http://en.wikipedia.org/wiki/Bigraph) is typical of the quasi-mathematical style of writing that I have a lot of trouble understanding: > A bigraph is a 5-tuple: > $$(V,E,ctrl,prnt,link) : \langle k,X \rangle \to \langle m,Y \rangle$$ > where $V$ is a set of **nodes**, $E$ is a set of **edges**, $ctrl$ is the **control** map that assigns controls to nodes, $prnt$ is the **parent** map that defines the nesting of nodes, and $link$ is the **link** map that defines the link structure. > The notation $\langle k,X \rangle \to \langle m,Y \rangle$ indicates that the bigraph has $k$ **holes** (sites) and a set of inner names $X$ and $m$ regions, with a set of outer names $Y$. These are respectively known as the **inner** and **outer** interfaces of the bigraph. In math it's perfectly fine to introduce sets and made up arbitrary names for their elements---we call the elements of $V$ 'nodes', we call the elements of $E$ 'edges'. Fine. But it's no good to introduce maps without saying what they're maps _from_ and _to_, so saying '$ctrl$ is the control map that assigns controls to nodes' is very mysterious, since the word 'controls' has not been introduced as the name for elements of some set. Is $ctrl$ a map from the set of nodes to some set of 'controls' that hasn't been mentioned? Is $ctrl$ a map from nodes to nodes, that assigns to each node a node called its **control**? Or is $ctrl*$ a map from nodes to edges? We are left to guess. Ditto for $prnt$, although I feel okay guessing that $prnt$ is a map from nodes to nodes. And ditto for $link$: saying this map 'defines the link structure' means nothing to me; what I want to know is what it's a map _from_ and what it's a map _to_. This may be what happened to me the last time I tried to understand bigraphs. I can't abide this sort of mush, where you're supposed to sort of know what's going on so they don't tell you. I'm sure someone somewhere has given a proper definition.
  • 19.

    This sketchy idea is already clearer:

    In this chapter we develop the notion of bigraph from the simple idea that it consists of two independent structures on the same set of nodes. … a forest is a set of rooted trees; and a hypergraph consists of a set of nodes, together with a set of edges each linking any number of nodes.

    Comment Source:This sketchy idea is already clearer: > In this chapter we develop the notion of bigraph from the simple idea that it consists of two independent structures on the same set of nodes. … a forest is a set of rooted trees; and a hypergraph consists of a set of nodes, together with a set of edges each linking any number of nodes.
  • 20.

    I'm trying to explain the wikipedia page on bigraphs, if only to myself, in a separate Azimuth Project page. Because I only understand things when I work through an example, ideally with programming code and diagrams, I've included some diagrams on the page. The page is here. I agree that the wikipedia page is pretty cryptic.

    As an aside, is that the best way in the Azimuth Project to write something that's more than a comment in a discussion, but not substantial enough or thought out enough (yet) to be a blog article?

    Comment Source:I'm trying to explain the wikipedia page on bigraphs, if only to myself, in a separate Azimuth Project page. Because I only understand things when I work through an example, ideally with programming code and diagrams, I've included some diagrams on the page. The page is [here](http://www.azimuthproject.org/azimuth/show/Bigraphs+-+an+informal+explanation). I agree that the wikipedia page is pretty cryptic. As an aside, is that the best way in the Azimuth Project to write something that's more than a comment in a discussion, but not substantial enough or thought out enough (yet) to be a blog article?
  • 21.
    edited September 2012

    I agree John with your criticisms of the Wikipedia bigraphs article. To be honest, as much as I love Wikipedia, it seems to me that many of the articles on mathematical topics suffer from the problem of not providing precise definitions beginning with things that almost everyone is willing to accept as primitive. Of course, the wonderful thing about Wikipedia is that, if I feel that way, I should just do something about it! I wish I could pledge that every time I turn from Wikipedia to textbook, I would try to brush up the Wikipedia article, but doing a good enough job to meet my own "I think the world should reference this" standard takes a lot of time!

    I like the figures Ken!

    I will be interested to see if the bigraph formalism has significant advantages in representing models relative to the kinds of heuristics that people such as those at the virtual cell project would use.

    A test case might be to adapt the recent "whole-cell model" of Mycoplasma genitalium (this is the organism that people working with Craig Venter used as the basis for their Mycoplasma laboratorium) to this format. The (mostly) MATLAB code for the existing model is available here.

    It seems that bigraphs could serve as an appealing alternative to a hodge-podge of simple stochastic processes and ODEs.

    Comment Source:I agree John with your criticisms of the Wikipedia bigraphs article. To be honest, as much as I love Wikipedia, it seems to me that many of the articles on mathematical topics suffer from the problem of not providing precise definitions beginning with things that almost everyone is willing to accept as primitive. Of course, the wonderful thing about Wikipedia is that, if I feel that way, I should just do something about it! I wish I could pledge that every time I turn from Wikipedia to textbook, I would try to brush up the Wikipedia article, but doing a good enough job to meet my own "I think the world should reference this" standard takes a lot of time! I like the figures Ken! I will be interested to see if the bigraph formalism has significant advantages in representing models relative to the kinds of heuristics that people such as those at the [virtual cell project](http://www.nrcam.uchc.edu/) would use. A test case might be to adapt the recent "whole-cell model" of _[Mycoplasma genitalium](http://en.wikipedia.org/wiki/Mycoplasma_genitalium#Synthetic_life)_ (this is the organism that people working with Craig Venter used as the basis for their _[Mycoplasma laboratorium](http://en.wikipedia.org/wiki/Mycoplasma_laboratorium)_) to this format. The (mostly) MATLAB code for the existing model is available [here](https://simtk.org/home/wholecell). * Karr JR et al. (2012) [A Whole-Cell Computational Model Predicts Phenotype from Genotype](http://covertlab.stanford.edu/publicationpdfs/mgenitalium_whole_cell_2012_07_20.pdf). Cell 150:389–401. It seems that bigraphs could serve as an appealing alternative to a hodge-podge of simple stochastic processes and ODEs.
  • 22.
    edited September 2012

    Ken wrote:

    As an aside, is that the best way in the Azimuth Project to write something that’s more than a comment in a discussion, but not substantial enough or thought out enough (yet) to be a blog article?

    We need to keep various kinds of pages separate on the Azimuth Wiki: we've got the Azimuth Library page, but also Blog articles in progress and Experiments, which are different... and your page is one of the latter. If your goal is to make it into a blog article someday, it should be a Blog article of progress. If you just want a place where you can 'think out loud' and let others see it, it goes in Experiments. Either way, you should announce it in a new thread here, so we can easily spot it later on. I'll do that for you this time, just so you can see how it's done.

    You seem to much closer to giving a definition of bigraphs - in particular, you say that $prnt$ is a map from nodes to nodes, and you say that $cntrl$ is map from nodes to some new set that the Wikipedia author forgot to introduce: the set of 'controls'.

    I'll try to say some more useful things later, when I'm not just about to go back home to California...

    Comment Source:Ken wrote: > As an aside, is that the best way in the Azimuth Project to write something that’s more than a comment in a discussion, but not substantial enough or thought out enough (yet) to be a blog article? We need to keep various kinds of pages separate on the Azimuth Wiki: we've got the [[Azimuth Library]] page, but also [[Blog articles in progress]] and [[Experiments]], which are different... and your page is one of the latter. If your goal is to make it into a blog article someday, it should be a [[Blog article of progress]]. If you just want a place where you can 'think out loud' and let others see it, it goes in [[Experiments]]. Either way, you should announce it in a new thread here, so we can easily spot it later on. I'll do that for you this time, just so you can see how it's done. You seem to much closer to giving a definition of bigraphs - in particular, you say that $prnt$ is a map from nodes to nodes, and you say that $cntrl$ is map from nodes to some new set that the Wikipedia author forgot to introduce: the set of 'controls'. I'll try to say some more useful things later, when I'm not just about to go back home to California...
  • 23.
    edited September 2012

    Cameron wrote:

    I agree John with your criticisms of the Wikipedia bigraphs article. To be honest, as much as I love Wikipedia, it seems to me that many of the articles on mathematical topics suffer from the problem of not providing precise definitions beginning with things that almost everyone is willing to accept as primitive.

    I don't find problems with too many Wikipedia articles on math, probably because I think it's hopeless to provide definitions beginning with things that almost everyone is willing to accept as primitive. There is nothing in math, except perhaps the numbers 1-10, that everyone is willing to accept as primitive. Mathematics comes in too many layers of sophistication to expect all definitions to include definitions of all prerequisite concepts - they'd be too long. And even if you included those prerequisites, it wouldn't make the definition easy to understand. Definitions of sophisticated math concepts will always take months or years to understand if one hasn't mastered the prerequisites. A lot of math is just deep. So, all a Wikipedia definition can be expected to do is precisely define a concept in terms of other concepts that have been defined elsewhere on Wikipedia, and include links to those other definitions.

    But, it should at least do that. And that's the problem with the definition of 'bigraph'. It's not what mathematicians would call a precise definition.

    By contrast, this Wikipedia definition:

    An affine scheme is a locally ringed space isomorphic to Spec(A) for some commutative ring A.

    is almost fine, since it includes the definition of 'locally ringed space', and earlier on that page there's a link to 'commutative ring' and 'spectrum of a ring'. However, it's not quite fine, because you need to guess that 'Spec(A)' means the spectrum of the commutative ring A - this is nowhere stated in the article, nor is there a link. You shouldn't need to guess stuff in definitions. So, I'll change this definition to

    An affine scheme is a locally ringed space isomorphic to the spectrum of a commutative ring.

    or something like that.

    However, nobody should expect that understanding the concept of 'affine scheme' from this definition is going to be possible without a couple of years of hard work, if you're starting from scratch! You need at least to learn what a locally ringed space is, which means you need to know what a sheaf is, which means you need to know what a topological space is... and you need to know what the spectrum of a commutative ring is, which means you need to know what a commutative ring is. And - hardest of all - you need to have an intuition for all these concepts, to see why this definition is a good idea.

    Comment Source:Cameron wrote: > I agree John with your criticisms of the Wikipedia bigraphs article. To be honest, as much as I love Wikipedia, it seems to me that many of the articles on mathematical topics suffer from the problem of not providing precise definitions beginning with things that almost everyone is willing to accept as primitive. I don't find problems with too many Wikipedia articles on math, probably because I think it's hopeless to provide definitions _beginning with things that almost everyone is willing to accept as primitive_. There is nothing in math, except perhaps the numbers 1-10, that everyone is willing to accept as primitive. Mathematics comes in too many layers of sophistication to expect all definitions to include definitions of all prerequisite concepts - they'd be too long. And even if you included those prerequisites, it wouldn't make the definition easy to understand. Definitions of sophisticated math concepts will _always_ take months or years to understand if one hasn't mastered the prerequisites. A lot of math is just deep. So, all a Wikipedia definition can be expected to do is precisely define a concept in terms of other concepts that have been defined elsewhere on Wikipedia, and include links to those other definitions. But, it _should_ at least do _that_. And that's the problem with the definition of 'bigraph'. It's not what mathematicians would call a precise definition. By contrast, this Wikipedia definition: > An affine scheme is a locally ringed space isomorphic to Spec(A) for some commutative ring A. is almost fine, since it includes the definition of 'locally ringed space', and earlier on that page there's a link to 'commutative ring' and 'spectrum of a ring'. However, it's not quite fine, because you need to _guess_ that 'Spec(A)' means the spectrum of the commutative ring A - this is nowhere stated in the article, nor is there a link. You shouldn't need to guess stuff in definitions. So, I'll change this definition to > An affine scheme is a locally ringed space isomorphic to the spectrum of a commutative ring. or something like that. However, nobody should expect that understanding the concept of 'affine scheme' from this definition is going to be possible without a couple of years of hard work, if you're starting from scratch! You need at least to learn what a locally ringed space is, which means you need to know what a sheaf is, which means you need to know what a topological space is... and you need to know what the spectrum of a commutative ring is, which means you need to know what a commutative ring is. And - hardest of all - you need to have an intuition for all these concepts, to see why this definition is a good idea.
  • 24.

    Thank you for that perspective John. I do agree that a definition via links is good and preferable to redundancy as long as there aren't any significant holes. I certainly did not mean to imply that I think I should be able to just open up an article and almost instantly get the same level of intuition for a concept that someone who has spent their career working in a field in which that concept is crucial. Nevertheless, I think many of these sophisticated concepts are useful, the world might be a better place if everyone had the time to understand them, and that probably not everyone should be a mathematician. So, it would be nice to minimize the barrier to understanding in cases where it is possible. Given that I have benefited much from your willingness to share some of the intuition you have developed by writing informally about complicated concepts, I think we're on the same page about that. But, of course, you have the background to actually do it and I don't—at least not yet.

    Comment Source:Thank you for that perspective John. I do agree that a definition via links is good and preferable to redundancy as long as there aren't any significant holes. I certainly did not mean to imply that I think I should be able to just open up an article and almost instantly get the same level of intuition for a concept that someone who has spent their career working in a field in which that concept is crucial. Nevertheless, I think many of these sophisticated concepts are useful, the world might be a better place if everyone had the time to understand them, and that probably not everyone should be a mathematician. So, it would be nice to minimize the barrier to understanding in cases where it is possible. Given that I have benefited much from your willingness to share some of the intuition you have developed by writing informally about complicated concepts, I think we're on the same page about that. But, of course, you have the background to actually do it and I don't—at least not yet.
  • 25.

    I would love all Wikipedia explanations of math concepts to be really good... starting with a section anyone can read, giving a rough idea of the point of that concept, and then getting more serious (and accessible by fewer people) as they go on. Unfortunately, only mathematicians are in a position to explain advanced math concepts, and most of them don't know how to write good explanations. But most decent mathematicians at least know what a precise definition is, and value this sort of precision. So that's a reasonable 'bare minimum' we can expect from Wikipedia.

    Comment Source:I would love all Wikipedia explanations of math concepts to be really good... starting with a section anyone can read, giving a rough idea of the point of that concept, and then getting more serious (and accessible by fewer people) as they go on. Unfortunately, only mathematicians are in a position to explain advanced math concepts, and most of them don't know how to write good explanations. But most decent mathematicians at least know what a precise definition is, and value this sort of precision. So that's a reasonable 'bare minimum' we can expect from Wikipedia.
  • 26.
    edited September 2012

    This is a halfway decent explanation of bigraphs:

    It still doesn't come out and say exactly what bigraphs are: apparently the author is too concerned to explain why the concept is useful to present a precise definition: first he says something pretty simple, but then he adds extra bells and whistles a bit at a time, without ever summarizing it all neatly.

    However, it's really clear to me that bigraphs are operations in some sort of operad, and that there's a category with bigraphs as objects and 'reaction rules' as morphisms. I think anyone who knows modern math would feel a strong urge to work out what's 'really going on here' - by which I mean, to integrate this idea with the usual concepts mathematicians use to talk about these things.

    Comment Source:This is a halfway decent explanation of bigraphs: * [A brief introduction to bigraphs](http://www.itu.dk/research/pls/wiki/index.php/A_Brief_Introduction_To_Bigraphs). It still doesn't come out and say exactly what bigraphs _are_: apparently the author is too concerned to explain why the concept is useful to present a precise definition: first he says something pretty simple, but then he adds extra bells and whistles a bit at a time, without ever summarizing it all neatly. However, it's really clear to me that bigraphs are operations in some sort of operad, and that there's a category with bigraphs as objects and 'reaction rules' as morphisms. I think anyone who knows modern math would feel a strong urge to work out what's 'really going on here' - by which I mean, to integrate this idea with the usual concepts mathematicians use to talk about these things.
  • 27.

    Cameron commented about the diagrams I use on the renamed page Experiments in bigraphs. These 3 diagrams are generic. Any part of any Xholon (my ROOM-based tool) model can be written out at runtime as a Scalable Vector Graphics (SVG) diagram with a bigraph-like structure, as a composite structure (bigraph place) diagram, and as a network (bigraph link) diagram. Although in this particular example the network diagram uses specialized cell biology symbols for the nodes. I'm also very interested in the many diagrams used in systems biology, especially Systems Biology Graphical Notation (SBGN). I'll look more closely at the references that Cameron mention.

    I'm mostly interested here in quickly generating diagrams from Xholon that seem to capture the concepts of bigraphs, which I'm just learning about, to help me work through how bigraphs are related to stuff I'm already familiar with. I want to test my idea that there's a close correspondence between bigraphs and ROOM/Xholon, and I'm exploring whether or not bigraphs are a useful theoretical underpinning. And yes, I want to explore how bigraphs and bigraph diagrams relate to the models and diagrams used by biologists, because biologists are working on such incredibly complex systems from the natural world.

    SVG is an interesting generic XML-based graphics format. The SVG <g> element (g for group) can be nested to any level. Inkscape, a popular open-source SVG editor, has an extension that knows about lines that connect other shapes. When I generate an SVG image from a bigraph-like Xholon model, I include SVG <g> elements that can represent the bigraph place graph. I also optionally include Inkscape instructions to specify which shapes the various lines connect to, thus capturing the bigraph link graph. All the essential bigraph information is encoded in the SVG, which you can see by opening the diagram. For example, in Google Chrome right-click the image and select Open Image in New Tab (or just click here ), and then in the new tab do Ctrl-U. You should see the SVG source code in another new tab. Look for the hierarchy of <g> elements, and the set of <path> elements at the end of the file that have inkscape:connection-start and inkscape:connection-end attributes. Note that this is the SVG content after additional editing (moving the shapes around to get a better layout) in Inkscape.

    So the main point of these diagrams is this: These are the generic types of diagrams that can be used to represent any part of any Xholon/ROOM model, and they also seem to capture the essential features of bigraphs.

    Comment Source:Cameron commented about the diagrams I use on the renamed page [Experiments in bigraphs](http://www.azimuthproject.org/azimuth/show/Experiments+in+bigraphs). These 3 diagrams are generic. Any part of any Xholon (my ROOM-based tool) model can be written out at runtime as a Scalable Vector Graphics (SVG) diagram with a bigraph-like structure, as a composite structure (bigraph place) diagram, and as a network (bigraph link) diagram. Although in this particular example the network diagram uses specialized cell biology symbols for the nodes. I'm also very interested in the many diagrams used in systems biology, especially [Systems Biology Graphical Notation](http://www.sbgn.org/Main_Page) (SBGN). I'll look more closely at the references that Cameron mention. I'm mostly interested here in quickly generating diagrams from Xholon that seem to capture the concepts of bigraphs, which I'm just learning about, to help me work through how bigraphs are related to stuff I'm already familiar with. I want to test my idea that there's a close correspondence between bigraphs and ROOM/Xholon, and I'm exploring whether or not bigraphs are a useful theoretical underpinning. And yes, I want to explore how bigraphs and bigraph diagrams relate to the models and diagrams used by biologists, because biologists are working on such incredibly complex systems from the natural world. SVG is an interesting generic XML-based graphics format. The SVG &lt;g> element (g for group) can be nested to any level. Inkscape, a popular open-source SVG editor, has an extension that knows about lines that connect other shapes. When I generate an SVG image from a bigraph-like Xholon model, I include SVG &lt;g> elements that can represent the bigraph place graph. I also optionally include Inkscape instructions to specify which shapes the various lines connect to, thus capturing the bigraph link graph. All the essential bigraph information is encoded in the SVG, which you can see by opening the diagram. For example, in Google Chrome right-click the image and select _Open Image in New Tab_ (or just click [here](http://www.primordion.com/Xholon/samples/BloodPlasma_5246_1347936037899_07.svg) ), and then in the new tab do Ctrl-U. You should see the SVG source code in another new tab. Look for the hierarchy of &lt;g> elements, and the set of &lt;path> elements at the end of the file that have _inkscape:connection-start_ and _inkscape:connection-end_ attributes. Note that this is the SVG content after additional editing (moving the shapes around to get a better layout) in Inkscape. So the main point of these diagrams is this: These are the generic types of diagrams that can be used to represent any part of any Xholon/ROOM model, and they also seem to capture the essential features of bigraphs.
  • 28.

    For getting started with bigraphs, I'd also recommend the initial chapters in Robin Milner's 2009 book about bigraphs, The space and motion of communicating agents. A draft of the entire book is available here. The prologue explains that he wants to know how to build ubiquitous systems involving millions of agents. Bigraphs are an attempt to understand the structures required of such systems. The agents would move and interact, hence his interest in how larger bigraphs can be composed from two or more smaller bigraphs.

    I found Chapter 1, The idea of bigraphs, to be quite readable. This is true partly because I was able to interpret everything on the first 5 pages of the chapter in terms of concepts I'm already familiar with. Without that background it may not be as accessible.

    Chapter 2 of the book, Defining bigraphs, starts with a formal treatment of bigraphs, and then proceeds into category theory. The wikipedia text that was discussed above, and that I've commented on in Experiments in bigraphs, is taken from the second page of Chapter 2. So chapter 2 provides a context for the sparse wikipedia content. I'm slowly working my way through parts of chapter 2 now.

    Comment Source:For getting started with bigraphs, I'd also recommend the initial chapters in Robin Milner's 2009 book about bigraphs, _The space and motion of communicating agents_. A draft of the entire book is available [here](http://www.cl.cam.ac.uk/archive/rm135/Bigraphs-draft.pdf). The prologue explains that he wants to know how to build _ubiquitous systems_ involving _millions of agents_. Bigraphs are an attempt to understand the structures required of such systems. The agents would move and interact, hence his interest in how larger bigraphs can be composed from two or more smaller bigraphs. I found Chapter 1, _The idea of bigraphs_, to be quite readable. This is true partly because I was able to interpret everything on the first 5 pages of the chapter in terms of concepts I'm already familiar with. Without that background it may not be as accessible. Chapter 2 of the book, _Defining bigraphs_, starts with a formal treatment of bigraphs, and then proceeds into category theory. The wikipedia text that was discussed above, and that I've commented on in [Experiments in bigraphs](http://www.azimuthproject.org/azimuth/show/Experiments+in+bigraphs), is taken from the second page of Chapter 2. So chapter 2 provides a context for the sparse wikipedia content. I'm slowly working my way through parts of chapter 2 now.
  • 29.
    nad
    edited September 2012

    John wrote:

    It still doesn’t come out and say exactly what bigraphs are: apparently the author is too concerned to explain why the concept is useful to present a precise definition: first he says something pretty simple, but then he adds extra bells and whistles a bit at a time, without ever summarizing it all neatly.

    From looking this danish website I understood bigraphs as a special type of a graph. A bigraph seems to be a graph which has a subgraph which is a tree with the same number of nodes as the original graph. In particular I think that what they write:

    "The roots and the outer names make up the outer face of the bigraph, while the sites and the inner names make up its inner face. Inner and outer faces are referred to collectively as interfaces. In the preceding example, we could express B's interfaces by writing B : 〈3,{x0,x1}〉 → 〈2,{y0,y1,y2}〉, indicating that B has 3 sites and inner names x0, x1, and 2 roots and outer names y0, y1, y2. " and "Interfaces tell us which bigraphs can be composed. We can only insert a bigraph A into another bigraph B (written B o A), if the inner face of B is identical to the outer face of A. In other words we must require A : I → I' and B : I' → J for some interfaces I, I', J. "

    is not enough for defining a composition on bigraphs, that is you have at least to state an extra condition which ensures that the hierarchies are regarded.

    Comment Source:John wrote: >It still doesn’t come out and say exactly what bigraphs are: apparently the author is too concerned to explain why the concept is useful to present a precise definition: first he says something pretty simple, but then he adds extra bells and whistles a bit at a time, without ever summarizing it all neatly. From looking this danish website I understood bigraphs as a special type of a graph. A bigraph seems to be a graph which has a subgraph which is a tree with the same number of nodes as the original graph. In particular I think that what they write: >"The roots and the outer names make up the outer face of the bigraph, while the sites and the inner names make up its inner face. Inner and outer faces are referred to collectively as interfaces. In the preceding example, we could express B's interfaces by writing B : 〈3,{x0,x1}〉 → 〈2,{y0,y1,y2}〉, indicating that B has 3 sites and inner names x0, x1, and 2 roots and outer names y0, y1, y2. " and >"Interfaces tell us which bigraphs can be composed. We can only insert a bigraph A into another bigraph B (written B o A), if the inner face of B is identical to the outer face of A. In other words we must require A : I → I' and B : I' → J for some interfaces I, I', J. " is not enough for defining a composition on bigraphs, that is you have at least to state an extra condition which ensures that the hierarchies are regarded.
  • 30.

    Can anyone take a stab at describing a simple example that would motivate the use of a bigraph. I saw the one about Rooms and Ghosts, but that's a rather fanciful application. Ken I saw the biochemical containment diagrams that you put on the Experiments page, that is getting closer to an empirical application. Even a few sentences with the germ of an idea would be helpful. Or part of an idea. Maybe together we can put the pieces together. Thanks.

    Comment Source:Can anyone take a stab at describing a simple example that would motivate the use of a bigraph. I saw the one about Rooms and Ghosts, but that's a rather fanciful application. Ken I saw the biochemical containment diagrams that you put on the Experiments page, that is getting closer to an empirical application. Even a few sentences with the germ of an idea would be helpful. Or part of an idea. Maybe together we can put the pieces together. Thanks.
  • 31.

    Dave: I just saw your comment about bigraphs. I was having a closer look at the Rooms and Ghosts example today, and thinking I might try to implement it with my own software because it's the most accessible model I've seen in the fairly technical bigraphs literature. It's used in the A Brief Introduction To Bigraphs article, and on the Bigraphical Programming Languages poster. I looked at the ITU site and found a few papers like Spooky Virtual Agents: Enter the World of Ghosts and read a bit about the technology rationale for ghosts, but couldn't find anything else about this particular example. I like the example because it's simple, because it was created by someone else (people in the bigraph community), and because it's described in a relatively easy to follow style. It doesn't require knowledge of their SML language syntax, which I'm not ready for yet. Rooms and Ghosts provides some motivation for using bigraphs. It demonstrates the use of combining a place graph and a link graph to enable dynamic connection and movement of objects. So that's my suggestion.

    I also found a graphical bigraph editor bigredit. I can get it to run under Ubuntu Linux, but it immediately locks up as soon as I try to do something. Maybe the Windows version works better. It's able to read and write XML files, so I was hoping to write XML from my own models and have the editor display it as a graphic.

    Comment Source:Dave: I just saw your comment about bigraphs. I was having a closer look at the Rooms and Ghosts example today, and thinking I might try to implement it with my own software because it's the most accessible model I've seen in the fairly technical bigraphs literature. It's used in the [A Brief Introduction To Bigraphs](http://www.itu.dk/research/pls/wiki/index.php/A_Brief_Introduction_To_Bigraphs) article, and on the [Bigraphical Programming Languages](http://www.itu.dk/~tcd/docs/BPL_poster.pdf) poster. I looked at the ITU site and found a few papers like [Spooky Virtual Agents: Enter the World of Ghosts](http://www.itu.dk/research/delca/papers/mikkel/spooky_virtual_agents.pdf) and read a bit about the technology rationale for _ghosts_, but couldn't find anything else about this particular example. I like the example because it's simple, because it was created by someone else (people in the bigraph community), and because it's described in a relatively easy to follow style. It doesn't require knowledge of their SML language syntax, which I'm not ready for yet. Rooms and Ghosts provides some motivation for using bigraphs. It demonstrates the use of combining a place graph and a link graph to enable dynamic connection and movement of objects. So that's my suggestion. I also found a graphical bigraph editor [bigredit](http://code.google.com/p/bigredit/). I can get it to run under Ubuntu Linux, but it immediately locks up as soon as I try to do something. Maybe the Windows version works better. It's able to read and write XML files, so I was hoping to write XML from my own models and have the editor display it as a graphic.
  • 32.

    I'm not in the position yet to give good concrete examples of bigraphical reactive systems, but I suspect that a good one would involve cells and viruses, where a virus can be

    • free-floating in the same medium as the cells, or

    • penetrated into the cell but not yet attached to the nucleus, or

    • attached to the nucleus, where it then initiates the creation of new viruses (or technically, 'virions').

    I could try to make this more biologically realistic, but I'm not sure that's worthwhile: more important, right now, is the idea that each cell is a container that can hold virions and the cell nucleus, and that a virion can attach to the nucleus.

    This probably can be modelled with a Petri net if we allow lots of species like 'cell with $n$ virions in it, $m$ of which are attached to the nucleus', but that's awkward... and that awkwardness is precisely the point.

    Comment Source:I'm not in the position yet to give good concrete examples of bigraphical reactive systems, but I suspect that a good one would involve cells and viruses, where a virus can be * free-floating in the same medium as the cells, or * penetrated into the cell but not yet attached to the nucleus, or * attached to the nucleus, where it then initiates the creation of new viruses (or technically, 'virions'). I could try to make this more biologically realistic, but I'm not sure that's worthwhile: more important, right now, is the idea that each cell is a container that can hold virions and the cell nucleus, and that a virion can attach to the nucleus. This probably _can_ be modelled with a Petri net if we allow lots of species like 'cell with $n$ virions in it, $m$ of which are attached to the nucleus', but that's awkward... and that awkwardness is precisely the point.
  • 33.
    edited September 2012

    Ken - I hope you can craft

    into a blog article that I can publish in a week or two. There's already more than enough material - there are limits to what anyone can absorb in one blog-reading session. So, I think the easiest thing would be to take some of the topics you haven't developed much yet and move them to another page, which could be 'part 2'.

    By the way, you ask:

    Do Petri nets and CRNs belong to the same category, or are they different categories, presumably subclasses of symmetric monoidal category?

    A Petri net is a presentation of a symmetric monoidal category that's freely generated by some objects and morphisms. I don't know if that makes sense to you, since presentation, generator and free are math terms people usually learn when studying group theory... but they generalize to symmetric monoidal category theory. I could explain this, but...

    ... let's just say that 'Petri net' and 'reaction network' are subclasses of 'symmetric monoidal category'. There's a category of symmetric monoidal categories, so there's a category of Petri nets and a category of reaction networks. But here's the interesting thing: the category of Petri nets is equivalent to the category of reaction networks! In other words, they're 'the same for all practical purposes'. Anything you can do with one, you can do with another. They are just different notations for the same thing.

    I started out like the Petri net notation, but then it turned out the reaction network notation has certain technical advantages. So now I like both.

    By the way, I'm using the phrase 'reaction network' rather than 'chemical reaction network' for two reasons:

    1) I like having things precisely defined, and while chemists may use various slightly different concepts of 'chemical reaction network', I defined 'reaction networks' in Part 21 of the network theory course, to make sure I know exactly what the definition is, and to make sure it's true that the category of reaction networks is equivalent to that of Petri nets.

    2) Since reaction networks like Petri nets are highly general tools, it seems a pity to call them chemical reaction networks: that'll prevent non-chemists from getting interested in them!

    Also by the way, my Petri nets and reaction networks don't include rate constants for the transitions. If we include rate constants for the transitions, I add the adjective 'stochastic'.

    Comment Source:Ken - I hope you can craft * [[Connections: Petri nets, systems biology, and beyond]] into a blog article that I can publish in a week or two. There's already more than enough material - there are limits to what anyone can absorb in one blog-reading session. So, I think the easiest thing would be to take some of the topics you haven't developed much yet and move them to another page, which could be 'part 2'. By the way, you ask: > Do Petri nets and CRNs belong to the same category, or are they different categories, presumably subclasses of symmetric monoidal category? A Petri net is a presentation of a symmetric monoidal category that's freely generated by some objects and morphisms. I don't know if that makes sense to you, since [presentation](http://en.wikipedia.org/wiki/Presentation_of_a_group), [generator](http://en.wikipedia.org/wiki/Generating_set_of_a_group) and [free](http://en.wikipedia.org/wiki/Free_group) are math terms people usually learn when studying group theory... but they generalize to symmetric monoidal category theory. I could explain this, but... ... let's just say that 'Petri net' and 'reaction network' are subclasses of 'symmetric monoidal category'. There's a category of symmetric monoidal categories, so there's a category of Petri nets and a category of reaction networks. But here's the interesting thing: the category of Petri nets is [equivalent]() to the category of reaction networks! In other words, they're 'the same for all practical purposes'. Anything you can do with one, you can do with another. They are just different notations for the same thing. I started out like the Petri net notation, but then it turned out the reaction network notation has certain technical advantages. So now I like both. By the way, I'm using the phrase 'reaction network' rather than 'chemical reaction network' for two reasons: 1) I like having things precisely defined, and while chemists may use various slightly different concepts of 'chemical reaction network', I defined 'reaction networks' in [Part 21](http://math.ucr.edu/home/baez/networks/networks_21.html) of the network theory course, to make sure I know exactly what the definition is, and to make sure it's true that the category of reaction networks is equivalent to that of Petri nets. 2) Since reaction networks like Petri nets are highly general tools, it seems a pity to call them _chemical_ reaction networks: that'll prevent non-chemists from getting interested in them! Also by the way, my Petri nets and reaction networks don't include rate constants for the transitions. If we include rate constants for the transitions, I add the adjective 'stochastic'.
  • 34.

    John: I'll make that page a priority this week. It makes sense to break it up into smaller parts. My idea was to reach outwards as far as I could, and then start backfilling with more detail.

    Comment Source:John: I'll make that page a priority this week. It makes sense to break it up into smaller parts. My idea was to reach outwards as far as I could, and then start backfilling with more detail.
  • 35.

    Great! It's fine to start with something broad and not too deep... I was just encouraging you to remove some of those unfinished sections instead of feeling the need to finish them, if they're holding you back.

    Comment Source:Great! It's fine to start with something broad and not too deep... I was just encouraging you to remove some of those unfinished sections instead of feeling the need to finish them, if they're holding you back.
  • 36.

    John: I've put together a draft of a blog article that's an expansion of a subset of the original Connections piece. The working title is Connections Petri nets and beyond Part 1.

    Comment Source:John: I've put together a draft of a blog article that's an expansion of a subset of the original _Connections_ piece. The working title is [Connections Petri nets and beyond Part 1](http://www.azimuthproject.org/azimuth/show/Connections+Petri+nets+and+beyond+Part+1).
  • 37.
    edited October 2012

    Okay, great! I'll check it out soon. Right now my mind is a pulp from teaching 3 hours of class...

    I've changed its title to one that follows the usual rules:

    Other folks should read this too, and write questions/comments/corrections/criticisms/praise here! This is how we do things here: people write blog articles and other people help make them nice before we publish them on the Azimuth Blog.

    Since there are a lot of new people around, I'll point out

    for a summary of the process. In particular, blog articles in development on the wiki should have titles of the form

    Blog - blah blah blah blah

    where the "blah blah blah blah" stuff is the title of the articles as it'll appear on the blog, but in all lower-case. (Like Wikipedia, pages on our wiki have titles that generally have just the first word capitalized.)

    Comment Source:Okay, great! I'll check it out soon. Right now my mind is a pulp from teaching 3 hours of class... I've changed its title to one that follows the usual rules: * [[Blog - connections: Petri nets and beyond (part 1)]] Other folks should read this too, and write questions/comments/corrections/criticisms/praise here! This is how we do things here: people write blog articles and other people help make them nice before we publish them on the [Azimuth Blog](https://johncarlosbaez.wordpress.com/). Since there are a lot of new people around, I'll point out * [How to write a blog article](http://www.azimuthproject.org/azimuth/show/How+to#blog). for a summary of the process. In particular, blog articles in development on the wiki should have titles of the form > Blog - blah blah blah blah where the "blah blah blah blah" stuff is the title of the articles as it'll appear on the blog, but in all lower-case. (Like Wikipedia, pages on our wiki have titles that generally have just the first word capitalized.)
  • 38.

    Hi Ken, I think there is a lot of interesting material here. What comes to my mind are the graphs, and everything that is behind them, and the software system you are building, which sounds like it has many facets.

    I have some suggestions for the format of the writing, to help streamline it from beginning to middle to end. Of all the many directions you could go in with this content, choose one for this article, and save the others for subsequent articles. Choose a "meaty" end goal towards which you will lead the reader. Make a promise in the beginning about what the reader will have by the end, and then wind your way there. And hand in hand with the end goal goes a theme that will set the tone for the article.

    Since it's your material, the choice of end goal and theme is yours, but I have some suggestions.

    Choose your most beautiful and/or interesting graph as the end goal. Now there is alot going on behind this, on several different levels:

    • The underlying model and concepts of Petri nets

    • The nature of the physical reactions being simulated

    • The structure of the software that is running the simulation and rendering the graphs

    So you could start with the graph up front, as a "teaser," and the theme could be, Dear Reader, we will learn something about (1) the dynamics of chemical reactions that are shown here, (2) about the important yet elementary model of computation called Petri Nets, which is a basis for modeling these processes, and (3) about a calculation engine that I am building to run these models. In fact, there is so much implicit material here, that it could only fit into a series of interlocking blog articles, running along these three threads. So this could be an organizing theme for your series of articles.

    I'll take the suggestion couple of steps further. What about starting with Three Cool Graphs, for some substantive yet simple chemical reaction or reactions: one that shows evolution to a stable state, one that exhibits periodic behavior, and one that shows bistable behavior. Then you could talk about these kind of system dynamics, and its relevance to climate modelling. That would then provide context and motivation for then digging into the underlying computational model, Petri nets. And then that could lead towards talking about the structure of your simulation engine.

    In depth this is too much for one blog article. Perhaps your first one could just be about the graphs, the dynamics, and the relevance of the dynamics. That would provide a strong motivating linkage to the next one.

    Alternatively, your first one could just "dip" a bit into each of these three topics, as kind of an abstract of the more in-depth ones to follow.

    Regards, Dave

    Comment Source:Hi Ken, I think there is a lot of interesting material here. What comes to my mind are the graphs, and everything that is behind them, and the software system you are building, which sounds like it has many facets. I have some suggestions for the format of the writing, to help streamline it from beginning to middle to end. Of all the many directions you could go in with this content, choose one for _this_ article, and save the others for subsequent articles. Choose a "meaty" end goal towards which you will lead the reader. Make a promise in the beginning about what the reader will have by the end, and then wind your way there. And hand in hand with the end goal goes a _theme_ that will set the tone for the article. Since it's your material, the choice of end goal and theme is yours, but I have some suggestions. Choose your most beautiful and/or interesting graph as the end goal. Now there is _alot_ going on behind this, on several different levels: * The underlying model and concepts of Petri nets * The nature of the physical reactions being simulated * The structure of the software that is running the simulation and rendering the graphs So you could start with the graph up front, as a "teaser," and the theme could be, Dear Reader, we will learn something about (1) the dynamics of chemical reactions that are shown here, (2) about the important yet elementary model of computation called Petri Nets, which is a basis for modeling these processes, and (3) about a calculation engine that I am building to run these models. In fact, there is so much implicit material here, that it could only fit into a series of interlocking blog articles, running along these three threads. So this could be an organizing theme for your _series_ of articles. I'll take the suggestion couple of steps further. What about starting with Three Cool Graphs, for some substantive yet simple chemical reaction or reactions: one that shows evolution to a stable state, one that exhibits periodic behavior, and one that shows bistable behavior. Then you could talk about these kind of system dynamics, and its relevance to climate modelling. That would then provide context and motivation for then digging into the underlying computational model, Petri nets. And then that could lead towards talking about the structure of your simulation engine. In depth this is too much for one blog article. Perhaps your first one could just be about the graphs, the dynamics, and the relevance of the dynamics. That would provide a strong motivating linkage to the next one. Alternatively, your first one could just "dip" a bit into each of these three topics, as kind of an abstract of the more in-depth ones to follow. Regards, Dave
  • 39.

    I see alot of very cool graphs on your Experiments page, all of which is candidate material for the blog. But I didn't see any there that show periodic behavior.

    Can anyone provide a Petri net specification, plus an initial labelling, that exhibits periodic behavior? I don't know enough about the dynamics to come up with a good suggestions. That could be an exciting "keynote" graph to hook the reader in to the article. I'm imagining several curves on the same graph, each exhibiting some kind of randomized periodic behavior -- one curve for each species. And in general they won't be in phase.

    Can anyone give a specification for a bistable system, with two initial labellings that converge to different attractors. I guess that would have to be shown as two graphs.

    Ken, can you tell us a bit more about the architecture of Xholon. (Do you pronounce it X-holon?) It produces nice results, and it sounds flexible, so some more color on it would be useful.

    Nevermind my suggested theme of a blog series on three levels, if it doesn't speak to you. To follow through on your theme about the interconversion of equivalent formats for Petri nets, you mention UML and SBML, to covered in followup articles. And differential equations to be covered in this one. If that's what you're leading to in the article, then I would say some more about their significance, which is to determine the rates at which the concentrations of the species evolve. And say something about the reasoning behind the procedure, which is that each transition fires at a rate that is proportional to the product of its input concentrations, and therefore contributes tokens to each of its output containers at this rate, and removes tokens from each of its input containers at this rate. That is why for each container X (i.e. place) there is a term contributed by each transition T, that has a factor O - I, where O is the number of times that T outputs to X, and I is the number of times that T inputs from X. If T has 5 outputs to X and three inputs from X, then every time it fires, the net of two tokens gets added to X, hence the rate of increase of tokens at X due to T is 2 times the firing rate of T (product of input concentrations time rate constant).

    Perhaps there is a way to use the gist of my suggestion in the previous post, as a kind of "spice" with which to season your discussion of the conversions between formats. If you're going to talk about conversions, then why not start out with a juicy example, in terms of its scientific and environmental significance. I'm just taking a hint from others here about the significance of bistability (is our climate bistable??) and periodicity. Once the reader is interested in the graph and its meaning, you can explain that it is represented by a Petri net, which concept is explained in various places. Then show the representation of that Petri net in various formats, and talk about the tools that are associated with them. Since Xholon is your creation, you can give more attention to explaining some of the mechanisms it uses to produce the effects. So, along the way, with various good examples, you can be explaining things about reaction networks, climate modelling, and architecture of simulation engines.

    Comment Source:I see alot of very cool graphs on your Experiments page, all of which is candidate material for the blog. But I didn't see any there that show periodic behavior. Can anyone provide a Petri net specification, plus an initial labelling, that exhibits periodic behavior? I don't know enough about the dynamics to come up with a good suggestions. That could be an exciting &quot;keynote&quot; graph to hook the reader in to the article. I'm imagining several curves on the same graph, each exhibiting some kind of randomized periodic behavior -- one curve for each species. And in general they won't be in phase. Can anyone give a specification for a bistable system, with two initial labellings that converge to different attractors. I guess that would have to be shown as two graphs. Ken, can you tell us a bit more about the architecture of Xholon. (Do you pronounce it X-holon?) It produces nice results, and it sounds flexible, so some more color on it would be useful. Nevermind my suggested theme of a blog series on three levels, if it doesn't speak to you. To follow through on your theme about the interconversion of equivalent formats for Petri nets, you mention UML and SBML, to covered in followup articles. And differential equations to be covered in this one. If that's what you're leading to in the article, then I would say some more about their significance, which is to determine the rates at which the concentrations of the species evolve. And say something about the reasoning behind the procedure, which is that each transition fires at a rate that is proportional to the product of its input concentrations, and therefore contributes tokens to each of its output containers at this rate, and removes tokens from each of its input containers at this rate. That is why for each container X (i.e. place) there is a term contributed by each transition T, that has a factor O - I, where O is the number of times that T outputs to X, and I is the number of times that T inputs from X. If T has 5 outputs to X and three inputs from X, then every time it fires, the net of two tokens gets added to X, hence the rate of increase of tokens at X due to T is 2 times the firing rate of T (product of input concentrations time rate constant). Perhaps there is a way to use the gist of my suggestion in the previous post, as a kind of &quot;spice&quot; with which to season your discussion of the conversions between formats. If you're going to talk about conversions, then why not start out with a juicy example, in terms of its scientific and environmental significance. I'm just taking a hint from others here about the significance of bistability (is our climate bistable??) and periodicity. Once the reader is interested in the graph and its meaning, you can explain that it is represented by a Petri net, which concept is explained in various places. Then show the representation of that Petri net in various formats, and talk about the tools that are associated with them. Since Xholon is your creation, you can give more attention to explaining some of the mechanisms it uses to produce the effects. So, along the way, with various good examples, you can be explaining things about reaction networks, climate modelling, and architecture of simulation engines.
  • 40.

    Along with Dave, I've also wondered about periodic behavior with Petri nets. Does anyone know anything about this?

    Dave: For part 1, I'm using five closely related line charts, 3 showing results for standard Petri net kinetics, and two for mass action kinetics. Part 1 is a lot more focused than my initial draft.

    I can write more about Xholon in a later article. I pronounce it holon. Probably the right time to do a blog article with more details on Xholon would be when I write about bigraphs, since my sense is that bigraphs are the theoretical underpinnings for the basics of Xholon. What I hope to do eventually is model and write about bigraphs, and then about using Petri net, bigraph, and related ideas to do climate models.

    I didn't get a chance today to think about your suggestions Dave. I should be able to do some editing tomorrow. Time for some sleep.

    Comment Source:Along with Dave, I've also wondered about periodic behavior with Petri nets. Does anyone know anything about this? Dave: For [part 1](http://www.azimuthproject.org/azimuth/show/Blog+-+connections%3A+Petri+nets+and+beyond+%28part+1%29), I'm using five closely related line charts, 3 showing results for standard Petri net kinetics, and two for mass action kinetics. Part 1 is a lot more focused than my initial draft. I can write more about Xholon in a later article. I pronounce it _holon_. Probably the right time to do a blog article with more details on Xholon would be when I write about bigraphs, since my sense is that bigraphs are the theoretical underpinnings for the basics of Xholon. What I hope to do eventually is model and write about bigraphs, and then about using Petri net, bigraph, and related ideas to do climate models. I didn't get a chance today to think about your suggestions Dave. I should be able to do some editing tomorrow. Time for some sleep.
  • 41.

    Well, there's a "facile" way to get periodic behaviour: create a system with "pathways" each of which only transitions in only one direction in a loop (eg, for a single input A -> B -> C -> A, A -> D-> E -> A ; with a bit of thought I imagine you could come up with a system where transitions require multiple inputs which had cycles leading to periodicity. In fact, thinking about it you could probably produce an incredibly artificial petri net that had strong periodicities simply by having a few "key" components with long pathways of species changes that other more "unstructured" species can only make an important transition if there's a key-species element around). Although arguably that's important (at least part of animal population periodicities comes about from the fact that they take time between being born and reproducing) but I suspect that most interesting periodicities also depend on other factors, which I have no idea how to express within a Petri net.

    Comment Source:Well, there's a "facile" way to get periodic behaviour: create a system with "pathways" each of which only transitions in only one direction in a loop (eg, for a single input A -> B -> C -> A, A -> D-> E -> A ; with a bit of thought I imagine you could come up with a system where transitions require multiple inputs which had cycles leading to periodicity. In fact, thinking about it you could probably produce an incredibly artificial petri net that had strong periodicities simply by having a few "key" components with long pathways of species changes that other more "unstructured" species can only make an important transition if there's a key-species element around). Although arguably that's important (at least _part_ of animal population periodicities comes about from the fact that they take time between being born and reproducing) but I suspect that most interesting periodicities also depend on other factors, which I have no idea how to express within a Petri net.
  • 42.

    Here's an idea for generating simple system with feedback that show bistability, and periodicity.

    Take bistability. The hint for this is flip-flop. If we simplify this circuit to remove the NOR gates, we end up with two inverters, each feeding into the other. This has two stable states, though without the NOR inputs, there is no way to change states.

    Show how can we emulate an "inverter" with a Petri net transition T? It will have one input species A and one output species B. It should map "high" to "low", and "low" to "high." Let's say that low means lots of tokens, and high means few tokens.

    Well suppose that T takes one input from A, sends one output to back to A, and also takes one input from B. Then T will leave the count at A unchanged. And it will consume tokens at B at a rate proportional to the count at A. So when A is high, it will drain the B's towards zero. When A is low, it will barely drain B at all. It's an imperfect analogy with an inverter, because a low value for A doesn't make B high, it leaves B alone. But maybe it is good enough to generate the kind of behavior we're seeking.

    What if we added the opposite transition T', which inputs from A and B, and outputs to B? Will it exhibit the two kinds of states? This is motivating me to add the stochastic parameters to petri1.py and test it out... Also it could be analyzed mathematically...

    Here is a stab at periodic behavior. Use negative feedback. Cross couple an inverter with a "buffer" circuit, that implements the boolean identity function, with a time lag. Can we model a delay circuit by a transition that inputs from A, outputs to A, and outputs to B. When A is high, B will become high. When A is low, B will be left alone. Again, an imperfect analogy with the buffer. But does the cross coupled circuit generate periodic behavior?

    Can we do a better job at building transitions for the gates? What about And and Or gates? We could make stochastic Petri net analogs of all kinds of digital circuits.

    An attempt at an Or gate is just a buffer that connects A to C, and another buffer that connects B to C. Then C looks like Or(A,B). For And(A,B), just take a transition that inputs from A, inputs from B, and outputs to C.

    All of these are "one-sided" approximations. Can we improve the wiring?

    Comment Source:Here's an idea for generating simple system with feedback that show bistability, and periodicity. Take bistability. The hint for this is [flip-flop](http://en.wikipedia.org/wiki/Flip-flop_%28electronics%29). If we simplify this circuit to remove the NOR gates, we end up with two inverters, each feeding into the other. This has two stable states, though without the NOR inputs, there is no way to change states. Show how can we emulate an "inverter" with a Petri net transition T? It will have one input species A and one output species B. It should map "high" to "low", and "low" to "high." Let's say that low means lots of tokens, and high means few tokens. Well suppose that T takes one input from A, sends one output to back to A, and also takes one input from B. Then T will leave the count at A unchanged. And it will consume tokens at B at a rate proportional to the count at A. So when A is high, it will drain the B's towards zero. When A is low, it will barely drain B at all. It's an imperfect analogy with an inverter, because a low value for A doesn't make B high, it leaves B alone. But maybe it is good enough to generate the kind of behavior we're seeking. What if we added the opposite transition T', which inputs from A and B, and outputs to B? Will it exhibit the two kinds of states? This is motivating me to add the stochastic parameters to petri1.py and test it out... Also it could be analyzed mathematically... Here is a stab at periodic behavior. Use negative feedback. Cross couple an inverter with a "buffer" circuit, that implements the boolean identity function, with a time lag. Can we model a delay circuit by a transition that inputs from A, outputs to A, and _outputs_ to B. When A is high, B will become high. When A is low, B will be left alone. Again, an imperfect analogy with the buffer. But does the cross coupled circuit generate periodic behavior? Can we do a better job at building transitions for the gates? What about And and Or gates? We could make stochastic Petri net analogs of all kinds of digital circuits. An attempt at an Or gate is just a buffer that connects A to C, and another buffer that connects B to C. Then C looks like Or(A,B). For And(A,B), just take a transition that inputs from A, inputs from B, and outputs to C. All of these are "one-sided" approximations. Can we improve the wiring?
  • 43.

    I've made numerous edits to the blog article Blog - connections: Petri nets and beyond (part 1). I've included suggestions by John Baez and some material from Part 21 of the network theory series. I included some specific suggestions by David Tanzer in the section on reaction networks, and have added some additional description of the Xholon tool at the end of the article. I'll continue to edit it to ensure a common theme running throughout, and to make sure that the theme is well stated. And I have to write a conclusion.

    Comment Source:I've made numerous edits to the blog article [Blog - connections: Petri nets and beyond (part 1)](http://www.azimuthproject.org/azimuth/show/Blog+-+connections%3A+Petri+nets+and+beyond+%28part+1%29). I've included suggestions by John Baez and some material from Part 21 of the network theory series. I included some specific suggestions by David Tanzer in the section on reaction networks, and have added some additional description of the Xholon tool at the end of the article. I'll continue to edit it to ensure a common theme running throughout, and to make sure that the theme is well stated. And I have to write a conclusion.
  • 44.
    edited October 2012

    Comment Source:<img src = "http://math.ucr.edu/home/baez/emoticons/thumbsup.gif" alt = ""/>
  • 45.

    Re the discussion on bistability, and periodicity.

    I found some Systems Biology Markup Language (SBML) models dealing with oscillators, bistable switches, and such. Antimony supports SBML models and their site includes several examples. Googling for SBML oscillator turns up a bunch of stuff. I haven't looked at any of this in detail, but someone else might like to have a look to see if it's relevant.

    In part 2 of my blog series, I plan on discussing SBML. In part 1 I gloss over the fact that I'm using SBML as an intermediate format when converting the Petri net to GNU Octave differential equations. In part 2 I will argue that Petri nets and reaction networks can be completely specified using SBML. For example, this SBML is the Feinberg reaction network. Note how similar the terminology is to that used in reaction networks. The following is an abbreviated skeleton:

    <listOfSpecies>
      <species id="a_7s" name="A" compartment="pot_petriNet_1c" initialAmount="140.0"/>
      <species id="b_8s" name="B" compartment="pot_petriNet_1c" initialAmount="180.0"/>
      <species id="c_9s" name="C" compartment="pot_petriNet_1c" initialAmount="200.0"/>
      <species id="d_10s" name="D" compartment="pot_petriNet_1c" initialAmount="25.0"/>
      <species id="e_11s" name="E" compartment="pot_petriNet_1c" initialAmount="80.0"/>
    </listOfSpecies>
    
    <listOfReactions>
      <reaction id="a_BB_13r" name="A_BB" reversible="false">
        <listOfReactants>
          <speciesReference species="a_7s"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="b_8s" stoichiometry="2.0"/>
        </listOfProducts>
        <kineticLaw>
         ...
        </kineticLaw>
      </reaction>
      <reaction id="bB_A_18r" name="BB_A" reversible="false">
        <listOfReactants>
          <speciesReference species="b_8s" stoichiometry="2.0"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="a_7s"/>
        </listOfProducts>
        <kineticLaw>
         ...
        </kineticLaw>
      </reaction>
      <reaction id="aC_D_23r" name="AC_D" reversible="false">
        <listOfReactants>
          <speciesReference species="a_7s"/>
          <speciesReference species="c_9s"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="d_10s"/>
        </listOfProducts>
        <kineticLaw>
         ...
        </kineticLaw>
      </reaction>
      <reaction id="d_AC_29r" name="D_AC" reversible="false">
        <listOfReactants>
          <speciesReference species="d_10s"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="a_7s"/>
          <speciesReference species="c_9s"/>
        </listOfProducts>
        <kineticLaw>
         ...
        </kineticLaw>
      </reaction>
      <reaction id="d_BE_35r" name="D_BE" reversible="false">
        <listOfReactants>
          <speciesReference species="d_10s"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="b_8s"/>
          <speciesReference species="e_11s"/>
        </listOfProducts>
        <kineticLaw>
         ...
        </kineticLaw>
      </reaction>
      <reaction id="bE_AC_41r" name="BE_AC" reversible="false">
        <listOfReactants>
          <speciesReference species="b_8s"/>
          <speciesReference species="e_11s"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="a_7s"/>
          <speciesReference species="c_9s"/>
        </listOfProducts>
        <kineticLaw>
         ...
        </kineticLaw>
      </reaction>
    </listOfReactions>
    

    My point is that models specified in SBML, such as the oscillator models, may be easy to convert to a Petri net syntax.

    Comment Source:Re the discussion on **bistability, and periodicity**. I found some [Systems Biology Markup Language](http://sbml.org/Main_Page) (SBML) models dealing with oscillators, bistable switches, and such. Antimony supports SBML models and their site includes [several examples](http://antimony.sourceforge.net/antimony-examples.html). Googling for _SBML oscillator_ turns up a bunch of stuff. I haven't looked at any of this in detail, but someone else might like to have a look to see if it's relevant. In part 2 of my blog series, I plan on discussing SBML. In [part 1](http://www.azimuthproject.org/azimuth/show/Blog+-+connections%3A+Petri+nets+and+beyond+%28part+1%29) I gloss over the fact that I'm using SBML as an intermediate format when converting the Petri net to GNU Octave differential equations. In part 2 I will argue that Petri nets and reaction networks can be completely specified using SBML. For example, [this SBML](https://raw.github.com/gist/3666649/ReactionNetworkSystem_0_1346797705635.sbml.xml) is the Feinberg reaction network. Note how similar the terminology is to that used in reaction networks. The following is an abbreviated skeleton: ~~~~ <listOfSpecies> <species id="a_7s" name="A" compartment="pot_petriNet_1c" initialAmount="140.0"/> <species id="b_8s" name="B" compartment="pot_petriNet_1c" initialAmount="180.0"/> <species id="c_9s" name="C" compartment="pot_petriNet_1c" initialAmount="200.0"/> <species id="d_10s" name="D" compartment="pot_petriNet_1c" initialAmount="25.0"/> <species id="e_11s" name="E" compartment="pot_petriNet_1c" initialAmount="80.0"/> </listOfSpecies> <listOfReactions> <reaction id="a_BB_13r" name="A_BB" reversible="false"> <listOfReactants> <speciesReference species="a_7s"/> </listOfReactants> <listOfProducts> <speciesReference species="b_8s" stoichiometry="2.0"/> </listOfProducts> <kineticLaw> ... </kineticLaw> </reaction> <reaction id="bB_A_18r" name="BB_A" reversible="false"> <listOfReactants> <speciesReference species="b_8s" stoichiometry="2.0"/> </listOfReactants> <listOfProducts> <speciesReference species="a_7s"/> </listOfProducts> <kineticLaw> ... </kineticLaw> </reaction> <reaction id="aC_D_23r" name="AC_D" reversible="false"> <listOfReactants> <speciesReference species="a_7s"/> <speciesReference species="c_9s"/> </listOfReactants> <listOfProducts> <speciesReference species="d_10s"/> </listOfProducts> <kineticLaw> ... </kineticLaw> </reaction> <reaction id="d_AC_29r" name="D_AC" reversible="false"> <listOfReactants> <speciesReference species="d_10s"/> </listOfReactants> <listOfProducts> <speciesReference species="a_7s"/> <speciesReference species="c_9s"/> </listOfProducts> <kineticLaw> ... </kineticLaw> </reaction> <reaction id="d_BE_35r" name="D_BE" reversible="false"> <listOfReactants> <speciesReference species="d_10s"/> </listOfReactants> <listOfProducts> <speciesReference species="b_8s"/> <speciesReference species="e_11s"/> </listOfProducts> <kineticLaw> ... </kineticLaw> </reaction> <reaction id="bE_AC_41r" name="BE_AC" reversible="false"> <listOfReactants> <speciesReference species="b_8s"/> <speciesReference species="e_11s"/> </listOfReactants> <listOfProducts> <speciesReference species="a_7s"/> <speciesReference species="c_9s"/> </listOfProducts> <kineticLaw> ... </kineticLaw> </reaction> </listOfReactions> ~~~~ My point is that models specified in SBML, such as the oscillator models, may be easy to convert to a Petri net syntax.
  • 46.

    I've installed an initial version of a service that runs and returns results from a variety of Petri net, reaction network, and other models I've written. This includes the Feinberg model I describe in my blog article. Each Petri net produces and displays a line chart showing the changing values of Place nodes over time. Just click on any of the example links, and then look at the results in the web page.

    Petri nets and other examples

    Comment Source:I've installed an initial version of a service that runs and returns results from a variety of Petri net, reaction network, and other models I've written. This includes the Feinberg model I describe in my blog article. Each Petri net produces and displays a line chart showing the changing values of Place nodes over time. Just click on any of the example links, and then look at the results in the web page. [Petri nets and other examples](http://www.primordion.com:8080/xhsrv/)
  • 47.

    Wow! It would be great if each of these examples:

    • Reaction network - Feinberg 1.1
    • Reaction network - Feinberg 2.31
    • Reaction network - Feinberg 2.34
    • Reaction network - Feinberg 2.38
    • Reaction network - Feinberg 2.44
    • Reaction network - Feinberg (1987) 6.5
    • Reaction network - Feinberg (1987) 6.7

    would include a little discussion in English saying what this example illustrates. If I had a bit more time I'd write it myself - with Feinberg's papers at hand, each one should take 10 minutes to write up.

    I have 5 would-be grad students now... maybe I should make them write up something!

    Comment Source:Wow! It would be great if each of these examples: * Reaction network - Feinberg 1.1 * Reaction network - Feinberg 2.31 * Reaction network - Feinberg 2.34 * Reaction network - Feinberg 2.38 * Reaction network - Feinberg 2.44 * Reaction network - Feinberg (1987) 6.5 * Reaction network - Feinberg (1987) 6.7 would include a little discussion in English saying what this example illustrates. If I had a bit more time I'd write it myself - with Feinberg's papers at hand, each one should take 10 minutes to write up. I have 5 would-be grad students now... maybe I should make _them_ write up something!
  • 48.
    nad
    edited October 2012

    Ken Webb wrote:

    Along with Dave, I’ve also wondered about periodic behavior with Petri nets. Does anyone know anything about this?

    David Tanzer wrote:

    All of these are “one-sided” approximations. Can we improve the wiring?

    I could imagine that there is probably a lot of literature on periodic behavior with Petri nets, however I could imagine that it could be interesting to play around with them. I had supervised a student project, called "mimirix" which allows for the graphical creation of graphs via a graphical tool and relative easy sharing of graphs via a user mangement interface. Via the graphical interface one creates a JSON object, which is in RDF format. One could use mimirix instead of pipe2 for creating Petri net diagrams translate the JSON into Ken's format and use his Xholon for further creation of python or other formats. I saw the the graphical diagrams in the petrinet description, they are already quite good to see, whats happening in a petri net but I could imagine that one could even get axis names etc. with a different program.

    mimirix is described in more detail in here: http://www.azimuthproject.org/azimuth/show/Examples+of+semantic+web+applications+and+environment

    problems:

    • as said one would need to translate the RDF into Kens format and program the transfer

    • Jim's server has centos and the mimirix database runs on debian, apart from this I could imagine that the server size may be a problem at one point.

    • the graphical interface is in HTML,javascript and probably not very save against code injections, (but one could run it with a password) moreover it could need some improvements, like variable icons etc.

    • it would be good to get the diagrams also via javascript next to the graph, but one would need someone who can program with javascript

    • general: if the calculations get numerically more intensive then I could imagine that one is easily running into problems. there was once a project at TU Berlin which looks to me in the ansatz a little bit like Kens xholon and here issues like thread safeness etc. played quite a role, may be it is interesting for you to read: jReality, jtem, and oorange — a way to do math with computers

    Comment Source:Ken Webb wrote: >Along with Dave, I’ve also wondered about periodic behavior with Petri nets. Does anyone know anything about this? David Tanzer wrote: >All of these are “one-sided” approximations. Can we improve the wiring? I could imagine that there is probably a lot of literature on periodic behavior with Petri nets, however I could imagine that it could be interesting to play around with them. I had supervised a student project, called "mimirix" which allows for the graphical creation of graphs via a graphical tool and relative easy sharing of graphs via a user mangement interface. Via the graphical interface one creates a JSON object, which is in RDF format. One could use mimirix instead of pipe2 for creating Petri net diagrams translate the JSON into Ken's format and use his Xholon for further creation of python or other formats. I saw the the graphical diagrams in <a href="http://www.azimuthproject.org/azimuth/show/Blog+-+connections%3A+Petri+nets+and+beyond+%28part+1%29">the petrinet description</a>, they are already quite good to see, whats happening in a petri net but I could imagine that one could even get axis names etc. with a different program. mimirix is described in more detail in here: <a href="http://www.azimuthproject.org/azimuth/show/Examples+of+semantic+web+applications+and+environment">http://www.azimuthproject.org/azimuth/show/Examples+of+semantic+web+applications+and+environment</a> problems: - as said one would need to translate the RDF into Kens format and program the transfer - Jim's server has centos and the mimirix database runs on debian, apart from this I could imagine that the server size may be a problem at one point. - the graphical interface is in HTML,javascript and probably not very save against code injections, (but one could run it with a password) moreover it could need some improvements, like variable icons etc. - it would be good to get the diagrams also via javascript next to the graph, but one would need someone who can program with javascript - general: if the calculations get numerically more intensive then I could imagine that one is easily running into problems. there was once a project at TU Berlin which looks to me in the ansatz a little bit like Kens xholon and here issues like thread safeness etc. played quite a role, may be it is interesting for you to read: <a href="citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.91.4479">jReality, jtem, and oorange — a way to do math with computers</a>
  • 49.

    Hi Nad,

    If there's some way you can get hold of the Mimirix source I'll post the destructions for uploading it to the sever and see if it builds on Centos.

    Comment Source:Hi Nad, If there's some way you can get hold of the Mimirix source I'll post the destructions for uploading it to the sever and see if it builds on Centos.
  • 50.

    Hi Ken, How does the Xholon engine process the rate constants, and how does it sequence the transitions?

    Xholon can generate code for petri1.py, but, as noted in the blog article, petri1.py does not produce output that is empirically valid -- because it just arbitrarily picks the next transition to fire, it contains no modelling of the mass action kinetics, and the Poisson character of the process is not implemented in the code. petri2.py will address this, using the algorithm that Graham posted here. The proof for why this simple but not self-evident code is correct is given in these lecture notes by Renato Feres. (The whole mathematical foundations of the subject are nicely built, from the ground up, in this and the two preceding lecture notes by Feres, in the course on Random Processes.)

    I'll be posting petri2.py this week, and it would be cool if you could tweak Xholon to generate output for it. The difference in the input specification will of course just be the addition of the rate constant. The difference in the output format will be that the "real" time will be shown on each record of the output.

    Comment Source:Hi Ken, How does the Xholon engine process the rate constants, and how does it sequence the transitions? Xholon can generate code for petri1.py, but, as noted in the blog article, petri1.py does not produce output that is empirically valid -- because it just arbitrarily picks the next transition to fire, it contains no modelling of the mass action kinetics, and the Poisson character of the process is not implemented in the code. petri2.py will address this, using the algorithm that Graham posted [here](http://forum.azimuthproject.org/discussion/1078/algorithm-for-simulating-a-stochastic-petri-net/?Focus=7621#Comment_7621). The proof for why this simple but not self-evident code is correct is given in these [lecture notes](http://www.math.wustl.edu/~feres/Math450Lect06.pdf) by Renato Feres. (The whole mathematical foundations of the subject are nicely built, from the ground up, in this and the two preceding lecture notes by Feres, in the course on [Random Processes](http://www.math.wustl.edu/~feres/Math450syll.html).) I'll be posting petri2.py this week, and it would be cool if you could tweak Xholon to generate output for it. The difference in the input specification will of course just be the addition of the rate constant. The difference in the output format will be that the "real" time will be shown on each record of the output.
Sign In or Register to comment.