npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fruchtfolge-model

v2.0.3

Published

Base model for the Fruchtfolge application

Downloads

44

Readme

Fruchtfolge Model

This repo contains the simulation model used in the Fruchtfolge application.

The mixed-integer linear programming model returns a cropping (and catch crop) recommendation for each given plot.
Overall farm profits are maximised, considering restrictions such as:

  • German Fertilizer Ordinance (2017/2020)
  • Greening directive
  • rotational breaks
  • maximum allowed crop shares in the crop rotation
  • available labour endowments
  • soil quality
  • crop rotational effects
  • effects of field-to-farm distance on costs and labour requirements
  • other user defined constraints

are implemented in the model.

Infeasibilities are avoided by slack variables accompanied with high penalties. In case of an infeasible constraint, users are presented with the closest feasible solution to their problem.

The model is written in GAMS language. You need a valid GAMS license in order to run the model.

Fruchtfolge is a decision support model aimed to be operated by practitioners. If you are a researcher interested in single farm modeling, please have a look at our dynamic mixed integer bio-economic model FarmDyn

Overview

The Fruchtfolge optimisation model comprises of two main parts:

  1. The so called include file, which is generated by the Fruchtfolge application. This file includes all farm specific data, which currently comprises of the individual farms
  • Historical plots
  • Current plots (planning horizon)
  • Plot information, as soil quality, type, distance
  • Historical crops
  • Current crops (planning horizon)
  • Botanical crop groups, linked to the crops (for compliance with the greening directive)
  • maximum crop shares (rotational shares)
  • other constraints defined by the user (e.g. labour constraints, maximum crop shares)

Plot and crop names are obfuscated in order to ensure privacy. Examples of such an include file can be found in the test/include subdirectory.

  1. The main optimisation model logic, which is stored in this repository. The main model logic is farm agnostic, which ensures that the model is capable of solving any possible combination of farm endowments.

fruchtfolge.gms

The main model logic is joined in this file. Here, the objective function is specified and additional constraints are included from the model folder.

model/

Constraints as defined by the Greening directive, or general crop rotational constraints, are stored in the model folder.

Tests

In order to test the model, execute

npm test

The test/include/ folder contains so called include files generated by the Fruchtfolge main application from different test farms. For every farm, a corresponding expected model result with the same file base name needs to be specified in the include/results folder.

Build

In order to build the model, execute

npm run build

Note that only $include statements in the form of $include '%WORKDIR%path/to/file.gms' are correctly concatenated into the final model. Other statements, as $batinclude etc. are currently not supported.