Giter VIP home page Giter VIP logo

ricebph's Introduction

RiceBPH Model

We are cleaning up the code for this reporsitory. To reproduce the result from the paper, please use this branch:

https://github.com/ndgnuh/RiceBPH/tree/paper-replicate

This is a model to simulate the rice-brown plant hopper dynamic. The goal of this model is to research the effect of cultivated flower on the spread inside rice fields of brown plant hopper (a dangerous rice pest).

Setup

This model is implemented using the Julia language, please install it from this link. We recommend using version Julia 1.9.

After that, setup the project's dependencies:

julia --project -e 'using Pkg; Pkg.resolve(); Pkg.instantiate()'

[Optional] Build a "system image". A system image contains compiled code, so that Julia does not have to recompile everything everytime it runs. TLDR: this reduces latency.

julia --project scripts/build_system_image.jl

As far as I know, you need a working C compiler for this step. If not, try installing Julia 1.9. The 1.9 version has binary caching so it should have less latency than previous versions.

Running the model

Here we show some simple examples. The running scripts are placed in the scripts/ folder. If you wish to customize, all of the scripts have --help flags, which lists all the options.

Model exploration:

julia --project scripts/main.jl configs/exploration.toml

# If you built a system image when setting up
julia -J ricebph.sys.so --project scripts/main.jl configs/exploration.toml

Render a video:

julia --project scripts/main.jl configs/video.toml
julia -J ricebph.sys.so --project scripts/main.jl configs/video.toml

Reproduce our results

We setup tests to guarantee that our model is fully reproducible (see test/runtests.jl).

First replicate the data:

julia --project scripts/replicate_data.jl

Output data will be written to outputs.

And then replicate the figures:

julia --project scripts/replicate_figures.jl

The figures will be stored in figures.

If the replication is too slow, try using multi-processing. It's really simple:

# Eight processes
julia -p 8 --project scripts/replicate_data.jl

ricebph's People

Contributors

ndgnuh avatar

Watchers

 avatar  avatar

Forkers

pahung1999

ricebph's Issues

Enhance: pretty plot

  • Good colorscheme
  • Legends should not be top of the data
  • Plot everything in the same style

Replication tests

  • Works on Linux
  • Works on Windows (first install)
  • Reproduced data is the same

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.