Discrete Variables and Special Equations

Loops that Matter will work for all models, but some models include components and equations that require extensions of the basic theory behind Link Scores and Loop Scores. The foundations for these extensions are discussed in Schoenberg and Eberlein and entail approximations of discrete elements based on their dynamic character.

The most common example of something that needs to be treated specially is a conveyor. Link stores show how much a change in a cause impacts an effect. For conveyors, however, this impact is always zero because the outflow from a conveyor is determined by the inflow in the past. How can we change the amount of material in a conveyor to see its impact on the outflow (the computation at the heart of the Link Score)?

An intuitive solution to this dilemma is to treat a conveyor much like we would treat a regular stock for the purposes of computing Link Scores. If the amount of material in the conveyor doubles, then assume the outflow would also double. In practice, this solution works quite well. The exact timing of the influence is lost, but the magnitude of the impact is retained. The DELAY function is treated in the same way as conveyors. Ovens and Queues are also treated in this way.

Macros

Macros hide structure, and thereby potentially hide the impact of that structure. However, because of the way that Link Scores can be multiplied, the score through a Macro can be accurately reported as the product of the Link Scores with the macro as noted in Schoenberg and Eberlein. In this way the Loop Scores computed when a model uses a macro (such as SMTH3) are exactly the same as they would be if the macro had been built out explicitly.

Most special builting - SMTH1, DELAY1, SMTH3, DELAY3 and even DELAYN (as long as it is given a number as it's order), are implemented as macros and thus give accurate results when computing Link, and therefore Loop scores.

When SMTHN, DELAYN or DERIVN are called with an expression as the order argument, they are implemented as functions instead of macros. Since these functions have all the information about stocks embedded in this, it is not possible to use the normal methods to computer link scores. Currently, using these builtins in this way will prevent Loops that Matter from running.