Share

Tips for Your Own Modeling Project

Since this is a methodology site I want to give some tips that may help when you want to work or develop models. I can not really give an outlined methodology, just share some experiences.

If you are working at an institute with less resources, simulation work can be cheap and awarding. All you need is a pc and the internet for looking up resources.

  1. Keep it simple. Scientists tend to add more and more processes to the model. But are they really necessary to test your hypothesis. And if you added something that does not make a big difference, can you remove it or turn it of? A simple model is easier to publish and more credible.
  2. Choose between mechanistic or predictive. Mechanistic models are good description of a system and a learning base for the scientist, but the predictive value may be low. Predictive models usually do better when they use known correlations, even though they doesn't simulate the processes that are behind the correlations.
  3. If you start with somebody elses' model, study it well. Don't assume it is a perfect working black box, it is not. Models are full of errors that usually only show up with specific parameter combinations. So while the model may have been good for one study it may not be good for another.
  4. Linking models is challenging, careful decide between linking and writing your own code. When linking you must think about numerics, units, and interpretation of variables.
  5. Design before hand, but allow design it so that you can add and remove components.
  6. Just using a model without knowing it's externals is risky. I do not favor friendly graphical user interfaces because they are meant to hide abstraction. Automation of runs and submitting jobs to a cluster (once you want to do for example a sensitivity analysis) is much easier if the model is not interactive.
  7. Use standard, open source tools. That way others can join you much easier and you will not be tight to some kind of commercial license.
  8. Choose your tools carefully. A spreadsheet can be great for a simple model, but is quickly limiting and a large spreadsheet is confusing. Besides you have few tools at hand to build in error checks. Rather start with a scripting language. Only use fortran or c++ if you think you model is going to be resource intensive. The statistical language R is actually quite nice for a small model, but python wouldn't be a bad choice either.
  9. Create a work flow. There are many tools that can be used for post processing of data, statistics, graphing and visualisation. You don't need to include that into your model. You model should be about simulation.
  10. Learn programming by going over a couple of tutorials. That way you not only learn the language, but also programming style.
  11. Make comments and build in lot's of error checks. Always think what happens to this line of code if a value is out of it's normal range. Stop simulation when an error occurs unless there is an obvious fix.
  12. Learn from others, look at other peoples code.
  13. enjoy it or start another project.