GithubHelp home page GithubHelp logo

mars0i / bali Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 24.04 MB

Extended Lansing-Kremer model of Balinese crop/water management with added religious transmission

NetLogo 97.09% Shell 1.88% R 1.03%

bali's People

Contributors

cbhelms avatar hydejackson avatar mars0i avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mjstoroz

bali's Issues

display of cropplans uses arbitrary numbers

There are two numbering systems for cropplans. The original one, that represents indexes in all-cropplans, and indexes in cropplans. But cropplans can be reduced or shuffled, so indexes into it aren't canonical. But the numbers displayed in the UI are indexes into cropplans. The switches for what crop plans to include, however, are based on indexes into all-cropplans.

Bias toward first cropplan, first startmonth

There seems to be a bias toward crop plan 0 and start month 0. This seems to happen even when the crop plans are shuffled, though it's most apparent when the 333033303330 plan exists and is crop plan 0.

LKJ model: Why is the SCC=0, sd=0 cropping pattern what becomes most common?

Cropping plan 0 and start month 0 seems to be what the majority of subaks end up with on every run. Is this because it's really the best pattern, or is it an artifact--because it's the first plan and the first month, for example? What is the effect on yield and pests of varying this?

One way to experiment with this is to swap variable names in procedure cropplans.

Difference between new and original versions of growpest?

10/2/2014 I rewrote Janssen's original growpest procedure, first by making incremental changes, then by taking out what seemed to be a mathematically irrelevant feature. (See source code: All three versions are still there.) Quick tests make it seem that Janssen's version produces marginally but significantly higher harvests than either of my versions. Is this right? Is it just a sampling problem? The behaviors should be identical.

A bad subak?

There's a subak, kind of lower middle right on the right end of a plus sign or equilateral triangle that's connected above and below to other stuff. It's turtle number 164 in the run I'm looking at--not sure if it always gets that number.

It's displayed as connected to two other subaks, to its left and lower-left, but it behaves as if it's isolated. It always takes its own values, and doesn't appear to participate when a cropping pattern is sweeping through the group.

LKJ model: If the black cropping plans are the same, what happens if they're all made black?

If you set the model to show subak's cropping plans using colors, most but not all of them turn black. If you make them all black, are the yields worse?

More specifically, nearly all but not all of the black subaks have cropping plan 0 and start month 0. If you set every subak to this pattern, is the yield worse than the usual outcome, in which there are a few subaks here and there with alternative patterns?

Instead of collecting binned data, consider storing raw data

At present I collect pre-binned avgharvestha and mean relig-type for each year. Consider just storing the raw values--not binned. I can still plot them binned in the UI, and then can bin them later during analysis. Note that lattice graphics' histogram in R assumes that the data is not binned.

60,000 ticks of data is only 5000 years, i.e. 5000 data points. That's not so much to store during a run.

Add historical data on harvest

At least the mean and stddev or variance of harvest since burn-in. Maybe something more detailed like a distribution across bins.

Waterstress plot not in sync with other plots

Beginning with the second run after loading the model, the Waterstress plot seems to go at about half speed relative to the other two plots. i.e. when they're at timestep (year) 20, Waterstress is at about 10.

But if I use only one cropplan, then the waterstress plot races ahead, going about 10x faster.

cropplan-a (3/3/3) with single startmonth has no waterstress

If you select a single cropplan only, and it's cropplan-a (3/0/3/0/3/0), and use a single global startmonth, the waterstress plot goes to zero. This is not what's supposed to happen. (I've tried this with a few other cropplans, the result isn't so clear, but more experimentation may be needed.)

pestdispersal-rate was wrong

I discovered that at some point the pestdispersal-rate slider had been changed to be extreme. The original version goes from 0.6 to 1.5, but I had it going up to 100. Crazy. This was producing a few subaks with enormous pest loads--6, 7 digits to the left of the decimal point. Now fixed.

However, I'm puzzled that the low end is 0.6, since Janssen p. 180 says that the original Lansing-Kremer model used dispersal rates between 0.18 and 0.45.

LKJ model: Why are crop plans initialized twice?

In the setup routine, there are three instances of ask subaks [...]. The first is very brief. The other two take up several lines, and both randomly choose a crop plan number and a starting month number. In both cases, the procedure cropplan is then called.

In between the two ask subaks some variables in each dam are set to calculated values.

Is there a reason for randomly initializing the cropping plans after they've been randomly initialized??

Also note that it's in the first of the two long ask subaks calls that the cropping plan colors of the subak turtles are set, which seems to mean that these colors are incorrect after the next ask subaks call.

Rationalized version of growpest behaves irrationally

10/2/2014 I rewrote Janssen's original growpest procedure, first by making incremental changes, then by taking out what seemed to be a mathematically irrelevant feature. (See source code: All three versions are still there.)

However, the incrementally modified version seems to have a lower average harvest (but maybe that's just sampling?), and the new, mathematically simplified version produces horrible harvest and pest behavior that's completely unlike Janssen's version. So there's something wrong with my reasoning.

(e.g. with pestgrowth-rate = 2.2, pestdispersal-rate = 30.0.)

subak damneighbors var is wrong

The subaks-own damneighbors var just contains a bunch of references to the containing subak. Whatever this variable is supposed to be doing, it's not doing it. Maybe it's not needed?

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.