Skip to content

zaucker/agrammon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agrammon

The simulation model

Ammonia volatilisation is a significant source of nitrogen (N) loss in agriculture. Almost one-third of the N load of farmyard manure is lost this way, resulting in both a financial loss as well as diminished productivity for the farmer. At the same time, ammonia emissions are detrimental to the environment, in particular to natural ecosystems.

The simulation model Agrammon allows ammonia emissions to be calculated, and shows how changes in structure and production methods at the farm level affect emissions.

The model was developed by the Swiss College of Agriculture (SHL) and the companies Bonjour Engineering GmbH and Oetiker+Partner AG, with support from the Federal Office for the Environment (FOEN).

Please see the Agrammon website for more details.

Port to Raku

This is a port of the existing Agrammon web application to Raku. It will be finished by Christmas.

Running tests

To only run unit tests, set AGRAMMON_UNIT_TEST=1 in the environment. The integration tests currently have quite some setup dependencies; this should be addressed in the future.

Database setup (PostgreSQL)

Install or use existing PostgreSQL database server:

CREATE GROUP agrammon_user; CREATE USER agrammon; ALTER GROUP agrammon_user ADD USER agrammon; CREATE DATABASE agrammon OWNER agrammon;

Load a database dump (auto creation not yet implemented)

Installation Web App

Install npm and jq from your distro and then run

mkdir -p public # first time only ./bootstrap ./configure ./make

Point your config file to the Agrammon database. Adapt runWeb.sh to point to your config file and model.

./runWeb.sh

and point your browser to the shown URL (defaults to localhost:20000)

REST Api

The Agrammon model can be accessed via a REST interface, for details see the online documentation

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 55.8%
  • Raku 36.3%
  • TeX 3.7%
  • HTML 2.8%
  • M4 0.6%
  • Shell 0.3%
  • Other 0.5%