MppLab (NetLogo)

A digital laboratory for the study of the Maximum Power Principle.

What is MppLab?

MppLab - This model environment is the second model in a planned series of three, the first being called OamLab, and the last called TpLab. It is clear that, when isolated and left alone, all systems die, run down, erode, decay and/or dissipate their matter. This process is closely associated with the phenomenon of entropy production, and the 2nd law of thermodynamics easily describes how this happens. Any such closed system automatically alters and reconfigures itself, moving through its state space on a trajectory of ever increasing entropy, until a configuration or state of maximal entropy is achieved. This state of maximal entropy is characterized by an excess of sameness, a lack of structures, shapes or spatial variations, and by characteristic distributions of energies among the parts. Once having achieved such a configuration, the system then remains in a state of maximal entropy forever after. However, when we look around ourselves, virtually everything we see is characterized by remarkable variety, a plethora of structures and shapes, and turbulent distributions of energy. Clearly, when a system is not isolated and left alone, there is another dynamic able to overpower the 2nd law and undo its nasty work. Such is the nature of the proposed 4th law of thermodynamics. A.J. Lotka and H.T. Odum called this the Maximum Power Principle (MPP). This model is a “laboratory” in which I can study the nature of the MPP.


MppLab can be downloaded from this site, from OpenABM, or from the NetLogo Modeling Commons.

MppLab_V1.09 from this site

From the OpenABM site

From the NetLogo Modeling Commons site

MAXIMUM POWER PRINCIPLE (MPP) - The purpose of these models is to be desktop laboratories for the study of the MPP using a marvelous gizmo called Atwood’s Machine (AM). This machine was invented in 1784 by the English mathematician George Atwood for the study of Newton’s laws of motion. It has since become a common device in the design of a variety of lifts which use counterwieghts. In 1955 H.T. Odum and R.C. Pinkerton used it as an example in a study of a phenomenon that came to be called the “Maximum Power Principle” (or MPP). H.T. Odum (1924-2002) went on, for over four decades, to argue that the MPP is the best candidate for the fourth law of thermodynamics, having explanatory value for such things as ecosystems, economies, and other autocatalytic (self-organizing) systems. However, in spite of the fact that there is plenty of anecdotal evidence in support of the MPP concept, it remains little understood, and little studied it seems. In its broadest interpretation, the MPP says (my words) that any self-organizing system that is open with respect to a flow of energy will configure itself to store/consume/use energy at the maximum rate possible. In a variety of diary notes that I have written in an attempt to understand the MPP, I have developed a rather arcane notation of AMs, OAMs, HOAMs and OAM chains. It is highly recommended that interested people read those notes (referenced below) prior to studying this model.

Conceptual Development - MppLab is being written as part of a personal study of the dynamics of sustainable economics. During the course of that study I have become aware that there are two principles that have been consistently proposed by scientists as candidates for the fourth law of thermodynamics. One is the MPP, as described above. The other is sometimes referred to as the Maximum Entropy Production Principle (or MEPP). It says (my words) that any self-organizing system that is open with respect to a flow of energy will configure itself to produce entropy at the maximum rate possible. Now, I have intentionally reworded the two principles to draw attention to the similarity. I believe I have not mangled either idea too badly. I am personally convinced of two things:

 -- The MPP and the MEPP are two sides of a single little-understood phenomenon, and in both cases the proponents argue that these laws play a significant role in the organization of both ecosystems and economic systems. In these days of daily news of ecological and economic perils, it seems we might want to put some effort into understanding such a phenomenon. And so, my study of economics has taken an unexpected turn towards the MPP and the MEPP for a while.

 -- The very same phenomenon that is actively shaping our ecological and economic destinies is also active in many agent-based models (ABMs). I am NOT saying that I believe they are simulated in ABMs. I believe they are the organizing phenomena that cause unexpected emergent behaviour in ABMs. These principles are exhibited, or can be exhibited, in ABMs. What better place to study them, then, than in ABMs? So, then, my “laboratories” become exactly that.

Brief Introduction to Atwood's Machine.

Atwood’s Machine - I will here provide a description of an AM that will help you understand the OamLab and MppLab applications. This differs only in mechanical design from other descriptions you will find, but not in function. An AM consists of two masses, one heavy and one light, coupled by a rope that is hung over a pair of non-leveraging simple pulleys. Most descriptions show a single pulley. I prefer to view it as a pair of pulleys, because I am going to split the AM into two halves, and each half has a mass, a pulley, an energy sink, a rope to couple masses together when needed, and a hold/release latch that can be used to pin the mass in place after it has been raised. In the AM, the heavy mass is raised a distance D off of the floor, and latched in place. It is then coupled, using the ropes, to the lighter mass that rests on the floor, as a counter-weight. When the heavy mass is released, it glides slowly to the floor as the lighter counterweight mass slowly rises. When the lighter mass has risen a distance of D, it is latched in place. At that point, the two masses may again be uncoupled.  

Some Admittedly Arcane Acronyms - With only mild apologies

I apologize for the use of a variety of acronyms in the following explanation, and in the interface of the model, and in the code, but without them I find I get really tangled up in my words. So, here is a list of the acronyms that are important. For more detail, read the notes mentioned below in the reference section:

AM - Atwood’s Machine in its original design - a mechanical system that is closed with respect to energy, in the sense that most analyses of the original system do not consider how the energy is first put into it. I use the AM as a metaphor for time-regulated transformation of energy. According to Odum, all energy-driven changes require time to unfold, and I am using the mechanics of a mechainical system to stand in as a time-based speed regulator for the biomechanical and biochemical changes that might happen as energy is passed from predator to prey in an ecosystem.

OAM - Open Atwood’s Machine - an imaginary version of the AM that is open with respect to energy, allowing a flow of energy into the system on the right, and out again on the left, as it runs its course.

HOAM - Half of an OAM - two of which remain when an OAM has its masses uncoupled and it is split in half. Each half consists of, as stated above, a pulley, a rope, a mass, an energy sink (the floor), and a hold-release latch that can be used to pin the mass up off of the floor.

RH-HOAM - An HOAM that has been linked to the right side of another HOAM to form an OAM. The RH-HOAM must have a mass larger than the mass in its counterpart.

LH-HOAM - An HOAM that has been linked to the left side of another HOAM to form an OAM. The LH-HOAM must have a mass lighter than the mass in its counterpart.

Chain of HOAMs - a series of HOAMs that are linkable in pairs to form OAMs such that each side-by-side pair of HOAMS can form a well-formed OAM. Energy can flow into the head of the chain, and, as OAMs are formed, and as the masses are coupled and uncoupled, the energy flows through the chain to the tail. Each HOAM may be uncoupled, coupled as an RH-HOAM, or coupled as an LH-HOAM. You can think of such a chain as a simulation of energy flow through a trophic web (along one chain in the web), of energy flow through the organic molecules that make up the cytoplasm in a cell, or, possibly, of capital flows through economic agents in an economy. [This is the crazy concept I am chasing in my study of sustainable economics.] In OamLab I present preformed chains of OAMs competing for survival. In MppLab there are free-swimming HOAMs that form OAMs at will and so make virtual chains of OAMs of fleeting existence as the HOAMs compete for survival.

Other variable names, short forms and acronyms are indicated in brackets at the moment when they are first used, as I did with the acronyms MPP and MEPP above.

I do not intend to imply, at all, that I think self-organizing systems contain explicit chains of HOAMs, as are exhibited in OamLab, or even free-floating HOAMs, as are exhibited in this model - MppLab. I think that, if this MPP concept contains any real useful insight, then HOAMs exist as organic molecules, organisms, and economic agents that link temporarily and exchange energy or capital via some time-regulated process. As the energy (or capital) flows through such systems from component to component, some is degraded and exhausted, while the rest is passed on down the chain. OamLab was a first simple laboratory. A more realistic model, say, of a trophic web, has taken some extra effort to set up. MppLab is the first such model of a trophic web. (See the “Omnivores” scenario.) Should I find the time and inspiration, I will take it one more step with MppLab II, in which the autotrophs will be a species in their own right, fighting for survival.

The Newtonian Dynamics (and Mathematics) of the AM

An AM starts with stored total gravitational potential energy (Wt) equal to the acceleration due to gravity (g) times the heavier mass (Mh) times the distance from the mass to the floor (D). We write that as Wt = g x D x Mh. After Mh is released, and as the AM runs to completion, this energy is transformed in two ways. The coupled mass assembly accelerates, and picks up kinetic energy. At the same time, the lighter mass (Ml) is raised off the floor by a distance D, gaining gravitational potential energy (Wu) according to the equation Wu = g x D x Ml. When Mh strikes the floor, the kinetic energy of both masses is dissipated into the heat sink. In my language, the energy is either transferred from the RH-HOAM to the LH-HOAM as stored high-grade gravitational potential energy, or exhausted as low-grade waste heat. No entropy is produced as Wu is transferred and stored. Entropy is produced as the waste energy (We) is exhausted. We = Wt - Wu. Odum defines the efficiency (Eu) of the AM in transferring and storing high-grade energy as Eu = Wu / Wt, which simplifies to Eu = Ml / Mh.

When Ml << Mh then Eu is close to zero, Mh falls quickly, and the time-to-drop is short. This baseline value of time-to-drop (Tb) is given by the formula Tb = (2 x D / g )^0.5. Most of the initial endowment of gravitational potential energy is transformed to waste heat, and cannot be passed on to other OAMs. When Mh is just slightly larger than Ml, then it descends very very slowly, the time-to-drop is long, and most of the endowment of energy is transformed into useful energy, stored in the LH-HOAM. Curiously, the fastest transfer of the endowment of energy to still useful energy in the LH-HOAM occurs when Eu has a value of 1/2. That is, maximum useful power happens when Mh = 2 x Ml.

For a more detailed description of the associated mathematics, download these diary notes:

150101 NTF Atwood's Machine R4.PDF - In this diary note I investigate the Newtonian mechanics associated with Atwood's machine.

150418 NTF Three Shapes of AM Revisited R2.PDF - In this diary note I investigate the nature of the Goldilocks curves associated with the Atwood's Machine.  It seems that there are two such Goldilocks curves.  One exhibits maximum power at efficiency of 0.5, while the other exhibits maximum power at efficiency of 0.62.  OamLab efficiency converges to an efficiency of 0.62.  A third potential curve is NOT a Goldilocks curve (with maximum that is not too hot, and not too cold), and does not seem to be associated with any persistent dynamics.

151224 NTF ICBT and PowEff R7.PDF - In this note I do a rather "brute force" review of all possible combinations of power and efficiency inputs to generate Goldilocks curves.  An example of a Goldilocks loop is shown to the right, in the two diagrams below.  The vast majority of Goldilocks curves form loops somewhat similar to this, rather than concave-downwards humps as originally shown in Odum's paper.  I suspect the difference arises when you include friction in the analysis, which I did not do when looking at the Newtonian mechanics of Atwood's Machine.  I should do that at some point.

170324 High-Level Design - MppLab R1.pdf - This is the only "user documentation" I have for this application.  It's a mix between a user document and a technical design document.

170324 NTF MppLab Change Diary R4.pdf - Some modelers might find this document to be of interest.

Goldilocks Curves

Original power-vs-efficiency curve as published by Odum and Pinkerton in 1955.  The power is zero when efficiency is close to zero or one, but at maximal value when efficiency is at some intermediate value - in this case - 1/2.

I now refer to all such concave-downwards curves as the one to the left, and the loop as shown above, as Goldilocks curves.  Power is at a maximum when the efficiency is "not too hot" and "not too cold", but "just right".


This is a work in progress.  I am in the process of finding a way to restate the MPP so it makes sense to me.  I strongly believe that it holds the key to so much of what happens in economic systems.  Here is the breakthrough idea I have been seeking for a couple of years now.

Operates simultaneously on two levels - Every system that captures and consumes energy can be viewed as functioning dynamically at two or more levels - at the level of the system as a whole, and at the level of the component parts. The dynamics that are encapsulated in this acronym MPP has two apparently contradictory effects. It both maximizes and minimizes the rate of entropy production, all at the same time. At the level of the system-as-a-whole, the rate of entropy production is maximized. But, at the level of the system components, as energy is transferred from component to component, average rate of entropy production is minimized during transfers. I believe that the interaction of these two opposing dynamics is the source of rising complexity.

Huh? - The MPP says that this model system (which consists of many generalized HOAMs) will configure itself in such a way that two things will happen. At the lower level, the temporary OAMs, as they form, will come to operate, on average, at maximum useful power, which is the same as at half efficiency. The rate of production of entropy at this level will be minimized. At the same time, the model as-a-whole will self-organize to capture and consume as much energy as possible. The number of consumers (population of heterotrophs) will rise to capture as much energy as possible. The lengths of the trophic chains will extend as long as possible to effectively consume, or degrade, as much of that energy as possible.

So, for example, when a frog (HOAM) eats a fly (HOAM), the process of capture and digestion (temporary formation of an OAM) will transfer the maximum amount of still useful energy from the fly to the frog. According to the expectations in this model, 50% of the energy will still be useful, while 50% of the energy in the fly will be degraded and discarded as waste heat. These two species will co-evolve such that there is a maximal power of the flow of non-degraded energy across this link of the trophic chain.

Um. OK, but? - Another vision of the MPP puts it this way. In every self-organizing system there are processes that gather and process energy. Through a kind of Darwinian process of natural selection, those processes that transfer the useful energy down the chain at the highest rate persist, and prevent the less effective processes from persisting. However, when the still useful energy at last reaches the end of the chain, it is all ultimately degraded and discarded. And so the system evolves (reconfigures itself) such that it is capturing and processing and degrading energy at maximum power.

So we get these two opposing dynamics. At the lower level, the production of entropy is minimized (maximum power of useful energy), while at the highest level, the production of entropy of the system itself is maximized (maximum power of consumption).

As species, and trophic webs, and ecosystems evolve, this oppositional dynamic gives rise to increasing power of both kinds. And it gives rise to increasing complexity.

MppLab, then, is a model in which I can study the free formation of OAMs within a caldron of freely associating but competing HOAMs. These chains of HOAMs compete for the right to survival in an environment that has a limited carrying capacity. In this model, unlike OamLab, I do not explicitly define any fitness criteria. The time-regulated and energy-regulated workings of the mechanical AM are used as a metaphor for biomechanical processes, and the AM embodies implicit fitness criteria with respect to time and energy. Those implicit fitness criteria cause exceedingly fast evolution of the system to a weighted average efficiency, in a Darwinian competition for survival.

My Research Questions

1. -- Under what conditions does such a self-organizing system of competing HOAMs converge to a system that has an average efficiency of Eu=1/2, as predicted by the MPP?

2. -- What system dynamics can be understood from the study of such evolving self-organizing systems?

Download the Software

MppLab_I_V1.09.nlogo  --  This is the NetLogo application.  NetLogo is an interpreted language (not a compiled language) so you need the interpreter to run it.  The interpreter can be downloaded from Northwestern University at this site.  I used version 5.0.5 for development, but it should run on later releases of the interpreter.

160510 NTF Code for MppLab V1.09 R1.pdf  --  If you just want to see the code, this file has it.

A YouTube Video produced Using MppLab.

Click here to see a trophic web of heterotrophs develop in minutes before your eyes.  I can't help it!   I think it is REALLY COOL!  Or, watch it right here.


<== APEX PREDATORS                              HERBIVORES ==>

This video displays three histograms that change over time: 

 - The top histogram displays number of predation events (OAMs) currently active, versus the efficiency of transfer of still-useful energy from prey to predator.  So if a predator digests its meal very slowly with high efficiency close to 1.0, it will add to the histogram at the far right, but if it digests quickly with low efficiency of 0.25, it will be added to those towards the left.

 - The bottom two display the number of organisms (HOAMs) versus the GETF factor.  GETF stands for "genetic energy transfer factor" as described in the user documentation, which was formerly called (when I made this video) the AM-gene.  The display on the right shows the entire domain, for 0 <= GETF <= 127, while the histogram on the left is an inset, magnifying only the left-most part, for 0 <= GETF <= 16.  That is where the fine detail of the apex predators appears.

Watch the "average efficiency" as recorded in the monitor in the lower right.  It's the average associated with the top histogram.  Using the MPP I predicted a value of 0.5 for stationary state operation.  I was right.

Last updated: April 2017.