Contact  |   Impressum  


You are here: ILREconomic Modeling of Agricultural SystemsResearch FARMDYN - A dynamic mixed-integer single farm bio-economic model

FARMDYN - a dynamic mixed integer bio-economic farm scale model


FARMDYN provides a flexible, modular template to simulate different farming systems (dairy, mother cows, pig fattening, piglet production, arable farming, biogas plants) at single farm scale. Main characteristics of the model are:

  • Fully dynamic, simulations typically cover several decades, alternatively comparative-static or short run version
  • Integer variables capture indivisibilities in investments (machinery, buildings) and labour use
  • Selected farm management decisions (e.g. feeding, manure management, labour use) depicted with a sub-annual temporal resolution, partially bi-weekly
  • Deterministic or stochastic programming version. The latter treats all variables as state dependent, allows for sceneario tree reduction and covers different risk measures (value at risk, MOTAD ...)
  • Farm labour, machinery and stable use are modelled in rich detail
  • Arable cropping can be differentiated by tillage type and intensity Different intensities are also available for grassland management
  • For dairy farming, the model distinguishes several herds by milk yield potential and lactation phase
  • The machinery park is available in different mechanization levels
  • Highly differentiated modules for nitrogen fate, while covering German legislation on fertilizer use


The model is currently parameterized for German conditions using highly detailed farm planning data provided by KTBL in combination with farm structural statistics. It offers a complementary approach to other farm scale models used in the institute such as the farm group models integrated in CAPRI or FADN based farm-scale progamming models which both are comparative-static, calibrated against observed farm programs with Positive Mathematical Programming while being far less detailed with regard to technology, and not comprising explicit investement decisions.

The model is realized in GAMS, solved with the industry MIP solver CPLEX, linked to a Graphical User Interface realized in GGIG and hosted on a Software Versioning System. Design of experiments, building on R routines directly called from GAMS, can be used in combination with farm structural statistics to systematically simulate different farm realizations (assets, farm branches) and boundary conditions such as input and output prices or emisisons ceilings using a computing server to solve several instances in parallel. That approach has e.g. been used to estimate a statistical meta model for Marginal Abatement Costs of Green House Gases from dairy farms. Code development and testing follows agreed upon guidelines.


The application and extension of FARMDYN is part of several ongoing research activities at ILR, in cooperation with international and national partners.

The original model version was developed in the project "The relation between indicators for the crediting of emission rights and abatement costs - a systematic modeling approach for dairy farms", financed by the German Science Foundation and carried out by Karin Holm-Müller, Wolfgang Britz, Bernd Lengers and David Schäfer. In the context of the pdh-thesis of Johanna Budde, a first version of the pig module was developed (2012-2013).

Model documentation:

There is a detailed model documentation available. The documentation refers to a stable release of FARMDYN which represents a properly tested and documented version of the model (launched in September 2016, model revision 500):

Britz W., Lengers, B,. Kuhn, T. and Schäfer, D. (2014): A highly detailed template model for dynamic optimization of farms - FARMDYN, University of Bonn, Institute for Food and Resource Economics, Version September 2016, 129 pages.

FARMDYN contains several features that are currently developed (flagged in documentation as prototype) or not used anymore (flagged as deprecated). These features have not been subject to the intensive testing for the stable release. They are only visible in the developer mode of FARMDYN and listed here.

Staff at ILR working on the model:

  • Wolfgang Britz, overall model design, solution algorithm, interface, stochastic programming extension
  • Till Kuhn, work on fertilization, related environmental indicators and regulations such as the German Fertilizer Directive
  • David Schäfer, biogas module, improved pig module, link to ABM
  • Thomas Böcker, plant protection strategies
  • Bernd Lengers (2011-2014), main contributor of original model version, GHG indicators
  • Johanna Budde (2012-2013), first version of pig module

Publications and conference contributions related to the model

PhD Theses:

Budde, Johanna: Ökonomische Auswirkungen von Poltiken zur Umsetzung der Wasserrahmenrichtlinie auf die Schweinehaltung im Münsterland; 2013

Lengers, Bernd: The relation between indicators for the crediting of emission rights and abatement costs - a systematic modeling approach for dairy farms; 2013

Journal publications:

Lengers, B., Britz, W., Holm-Müller, K. (2014): What drives marginal abatement costs of greenhouse gases on dairy farms? A meta-modeling approach, Journal of Agricultural Economics 65(3): 579–599 , Link.

Lengers, B., Schiefler, I. & W. Büscher (2013): A comparison of emission calculations using different modeled indicators with 1-year online measurements. Journal of Environmental Monitoring and Assessment, 185:9751-9762. doi:10.1007/s10661-013-3288-y

Lengers, B., Britz, W. and Holm-Müller, K. (2013): Comparison of GHG-emission indicators for dairy farms with respect to induced abatement costs, accuracy and feasibility, Applied Economic Perspectives and Policy, 35(3):451-475. doi:10.1093/aepp/ppt013

Lengers, B. and Britz, W. (2012).
The choice of emission indicators in environmental policy design: an analysis of GHG abatement in different dairy farms based on a bio-economic model approach. Review of Agricultural and Environmental Studies, 93(2), 117-144.

Contributions to conferences and lecture series:

Remble, A., Britz, W., Keeney, R. (2013): Farm Level Tradeoffs in the Regulation of Greenhouse Gas Emissions, selected paper presented at the Agricultural and Applied Economics Association, 2013 Annual Meeting, August 4-6, 2013, Washington, D.C (USA).

Lengers, B., Britz, W. & K. Holm-Müller (2013): What drives marginal abatement costs of greenhouse gases on dairy farms -a meta-modeling approach. Paper presented at the 2012 AURÖ-Workshop, Frankfurt (Oder), Germany, February 18-19.

Britz, W. and Lengers, B. (2012):
Abatement options for GHG emissions in a dynamic bio-economic model for dairy farms - DAIRYDYN -. Presentation contributed to the CIDRe lecture series “modeling across scales and disciplines”. University of Bonn, 09.10.2012, Bonn. Download

Lengers, B. and Britz, W. (2011):
Farm specific marginal abatement costs for dairy GHG emissions which base upon different emission indicators - a bio-economic model approach , selected paper presented at the 2011 EAAE PhD Workshop, April 27-29, 2011, Nitra (Slovak Republic)

Discussion and technical papers:

Lengers, B., Britz, W. and Holm-Müller, K. (2013): Trade-off of feasibility against accuracy and cost efficiency in choosing indicators for the abatement of GHG-emissions in dairy farming, Discussion Paper 2013: Download

Lengers, B.(2012): Construction of different GHG accounting schemes for approximation of dairy farm emissions. Technical paper referring to DFG-project HO 3780/2-1. Download

Lengers, B. (2012): Up to date relevant GHG abatement options in German agricultural dairy production systems. Technical Paper referring to DFG-project HO 3780/2-1. Institute for Food and Resource Economics, University of Bonn. Download

Lengers, B. (2011): GHG survey of German agriculture -specific view on dairy production systems. Technical paper referring to DFG-project HO 3780/2-1. Download


Last updated: Friday, April 07, 2017