Reflections on Lubarsky’s Law of Cybernetic Entomology

Reflections on Lubarsky’s Law of Cybernetic Entomology

As modellers, we often have to deal with recalcitrant models that resist validation. One of the reasons for this is that models may contain errors or bugs that are yet to be uncovered and corrected. Enter Lubarsky and his Law of Cybernetic Entomology that simply stated says: “There is always one more bug”. This appears to be true in the case of most if not all transport models.

Transport models generally incorporate a well-developed software package like VISUM, EMME or CUBE that have been tested many times; however, it is not unknown that a particular release contains bugs that are only identified when used in earnest. Moreover, a model usually involves several thousand items of data from surveys, maps and sensors, several hundred parameters (some estimated and some borrowed from other sources), and well over thousand lines of scrip (macros/code) some of it specifically written for the project, other bits a legacy from earlier models. The opportunities for confirming Lubarsky’ Law are practically unlimited!

Errors in transport models

I have probably supervised and reviewed more that my fair share of models in different parts of the world. I have encountered numerous errors and bugs, most of them human errors. These are some real-life examples I have faced:

  • Input data errors. Some are simply mistakes: the street direction coded the wrong way even if extracted from a normally reliable (but slightly out of date) source. Some network data can be coded in slightly different ways by different modellers and inconsistences arise if the links are critical. For example, two-lane streets becoming a single wide lane before a merge; bus lanes that also accept motorcycles and taxis but are interrupted a few metres before the junction stopline.
  • Physiological errors; the correct formula was meant to be copied to all cells in a large excel model but a distraction (tiredness?) meant that the finger on the mouse was lift inadvertently half the way through so only some of the cells were changed; it had a hidden but important effect in the estimation of future demand.
  • Technical errors, often an overuse of an attractive model like Logit without fully understanding its limitations and the fact it always accepts a share of apparently “irrational behaviour”; this could be reasonable for mode choice but not for the choice between a tolled and a free route where logit will allow a proportion of trips to pay the toll for no time saving or even a time loss (there are good ways to avoid this).
  • Script coding errors. Python and script languages are not particularly good at communicating what is intended and programmers are not always explicit about intentions; a single bracket displaced by one character can mean gross under or over-estimation of future demand.
  • Interpretation errors. All models need good quality interpretation of outputs from somebody who understand the assumptions and the inevitable uncertainty of any future projection. That the “model says so” is a certain indicator of trouble ahead.

Debugging transport models

Modelling errors can be very costly. Even if we humbly accept that there may still be another bug we should try to eliminate all errors during the development and implementation of a model. Some general guidelines are obvious:

  • Never assume that input data, whoever collected it, is reliable and error free; check it and double check it.
  • Even if there are no obvious errors the data may still be wrong, for example as a result of the way the questions were posed in a Stated Preference survey.
  • Always get the model reviewed at different stages by somebody not involved in its development; this could be an internal audit but for an important project it is better to complement it with an external review; allow enough time and budget for this review.
  • Get all data normalized to the Base Year for calibration and validation; in other words, do not mix data, for example traffic counts, from different years without adjustments for growth and possible network changes.
  • Avoid spurious precision and detail as they are potential sources of error and make interpretation more difficult.
  • Sense check everything!

Other error avoidance techniques are more specific to certain aspects of the model, for example:

Networks are often a source of error, even when extracted from an apparently reliable source; they may be out of date or for a date different from that of, say, traffic counts and travel times. This is particularly important for public transport networks. I have found it useful to load a unitary matrix (with a one in each cell) to quickly identify problem areas. Building minimum cost trees will also help identify anomalous routes. Both techniques also help in reviewing the centroid connectors and their influence in route choice.

Trip Matrices usually require a lot of attention to refine them during calibration. Techniques to avoid distorting observations are well known like checking the Trip Length Distribution before and after any significant adjustment. Make sure the “observed” part of any trip matrix is really reliable and not just a feature of sampling.

Mode Choice. Beware of complex nested (logit) choice formulations with many levels and modes. They may be estimated after some effort but may also produce pathological results in forecasting if the nests and parameters are inconsistent with the underpinning theory (e.g. Random Utility Theory). Testing the proposed model on a simple spreadsheet where it can be exercised beyond its comfort zone may help avoiding future trouble.

Assignment. Using SUE (Stochastic User Equilibrium) models is sometimes helpful in dealing with sparse networks and low levels of congestion. However, its results are more difficult to interpret and may hide many network and matrix sins.

Growth. Given unavoidable future uncertainties one cannot get this right as one shot. Checking total traffic growth against simpler calculations is essential as a sense check. Recognise uncertainties and use scenario modelling to test the resilience of plans and schemes. Future trip matrices and networks always have a lot of noise as the future will not toe the line of our projections.

Reference forecast, that is running the model for future years without any change in the network and public transport supply; this will push the model away from the comfort zone of the base year and show where unreasonable results crop up helping to separate the impact of growth from errors. This is a critical test before any real forecasting on a “do minimum” and “do something” cases.

Sensitivity Tests are critical to check that the model performs reasonably beyond the comfort zone of the base year. Transport models are not linear so testing one variable at a time may be misleading.


Lubarsky reminds us that we can never be certain our model is error-free. Of course, we should strive to detect and correct all the errors we can find. Clients and modellers should allocate sufficient time and budget to this task. We should also be modest in any statements we make interpreting model outputs.

In my experience over-complexity and excessive granularity (to increase realism) not only make debugging the model more difficult but also generate an unreasonable confidence in the results, inconsistent with its limitations and future uncertainties. This is the realm of Zadeh’s Principle of Incompatibility that I hope to discuss in a subsequent post.

A most commendable contribution to the state of the art Pilo. Keep them coming! One of the really pertinent issues that you raise - amongst all the others - is that of forecasting reliabilty. A major problem, in my experience, is trying to get clients to accept the concept of scenario forecasting. None of us can "know" what the future can hold and present us with. Painting a picture of possible outcomes under well defined assumptions is probably the most sane approach in my view.

回复
Aaron A.

Principal Consultant at Veitch Lister Consulting

4 年

Pilo, a great article and comments. We can benefit from verifying the model inputs using detailed logging for each model run, visualising model inputs outside of the modelling package (eg in a GIS platform), using a network optimiser that checks for connectivity and coding consistency, and always have a separate pair of eyes review model inputs. Overall, my favourite is to check to PT loads and traffic volumes that equal zero :) We can also use a number of other resources to potentially avoid/ identify errors by doing base year sensitivity tests, model backcasting, monitoring assignment and demand convergence, Market capture analysis (using first principles, stepping away from the model and just looking at observed data), getting sensibility checks of model inputs and outputs by non-modelling PT operations and traffic engineering experts and above all, maintaining a healthy skepticism about your own work.

回复

First class article, very much should be basic reading for all transport planners (not just modellers).

回复
Alberto Brignone

Director at CitiEU | CitiME

4 年

Straight to the point, Pilo (as usual, I can add)! Your article should be translated into several languages and shared at many levels. Useful from students to expert modelers!

回复
Tom van Vuren MBE

Chartered Transport Planning Professional. Visiting Professor University of Leeds. Board Member at Transport Planning Society. Head of Digital Transport at Amey. Director at Van Vuren Analytics Ltd.

4 年

A lot of really good advice, Luis (Pilo) Willumsen, and for a long time I have tried to work out how we can capture the combined knowledge of all practitioners in this space to build a comprehensive checklist to support future model applications. I add two observations, based on my own experience: 1. Don't use outputs to check inputs. The checking process needs to commence the moment you start collecting data and coding. Waiting for outputs to drive input checks is very resource inefficient. 2. The importance of sense checks. If a result is very different to your expectations, you have either discovered something new (and you'll become famous) or there is an error in your model (and you'll risk becoming infamous). In my experience, the latter is true in almost all cases, and that's why I am still not famous.

要查看或添加评论,请登录

Luis Willumsen的更多文章

  • An important new book

    An important new book

    A major book on decarbonising transport in the light of real travel behaviour David Metz, Honorary Professor at…

    3 条评论
  • Activity Based Models

    Activity Based Models

    Improving realism Efforts have been made to base transport models on a deeper understanding of the reasons for…

    10 条评论
  • Population Synthesis and models

    Population Synthesis and models

    The need for more detailed population analysis Recent years have seen an increased interest in the distributional…

    4 条评论
  • Agent Based Modelling in Transport

    Agent Based Modelling in Transport

    The use of "agents" in models Agent-based modelling (AgBM) is a computational method that simulates the behaviour of…

    13 条评论
  • 5 The modelling challenge of shared mobility

    5 The modelling challenge of shared mobility

    There is plenty of hype about how these new technologies suggesting that some are “silver bullets” that will deliver a…

    9 条评论
  • 4. Modelling the impact of new technologies

    4. Modelling the impact of new technologies

    New technologies inevitably generate impacts on the transport system and I will focus here on two of the most important…

  • 3 Equity and Environment

    3 Equity and Environment

    I discuss here how we can use transport models to address the challenges of reducing inequality and protecting the…

    5 条评论
  • The future is now a foreign land

    The future is now a foreign land

    2. The future is now a foreign land It became apparent around 2008, and crystal clear a couple of years later, that the…

    2 条评论
  • When the future changes do I adapt or do I change my models?

    When the future changes do I adapt or do I change my models?

    1. Introduction When John Maynard Keynes was accused of advising one thing one day and the opposite a year later, he…

    16 条评论
  • Are we ready to deal with covid uncertainty in travel forecasting?

    Are we ready to deal with covid uncertainty in travel forecasting?

    The title of this note is slightly unfair. Uncertainty has been with us since the beginning of time, but it became…

    8 条评论

社区洞察

其他会员也浏览了