{"id":46487385,"url":"https://github.com/fire2a/growth","last_synced_at":"2026-03-06T09:38:27.731Z","repository":{"id":228714440,"uuid":"774726863","full_name":"fire2a/growth","owner":"fire2a","description":"A timber plantation growth simulator, with stands and management policies options.","archived":false,"fork":false,"pushed_at":"2025-05-16T23:15:36.000Z","size":2035,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-17T00:21:53.799Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fire2a.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-20T04:13:09.000Z","updated_at":"2025-04-03T21:46:27.000Z","dependencies_parsed_at":"2024-11-28T18:28:10.403Z","dependency_job_id":"cf5a44e8-9297-41ae-90c4-881b6cfb7c9d","html_url":"https://github.com/fire2a/growth","commit_stats":null,"previous_names":["fire2a/growth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fire2a/growth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire2a%2Fgrowth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire2a%2Fgrowth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire2a%2Fgrowth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire2a%2Fgrowth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fire2a","download_url":"https://codeload.github.com/fire2a/growth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fire2a%2Fgrowth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30169276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-06T09:38:26.994Z","updated_at":"2026-03-06T09:38:27.719Z","avatar_url":"https://github.com/fire2a.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GROWTH SIMULATOR\n\nA timber plantation growth simulator, with stands and management policies options.\n\nBased on ![\"Modelos de predicción de biomasa a nivel de rodal en plantaciones de Eucalyptus globulus y Pinus radiata en Zona centro sur de en Chile\"](Modelos%20de%20predicción%20de%20biomasa%20a%20nivel%20de%20rodal%20en%20plantaciones%20de%20Eucalyptus%20globulus%20en%20Chile.pdf). By: Alejandro Miranda, Blas Mola and Víctor Hinojosa\n\n1. For 34 types of eucalyptus and pinus plantations in the central-south of Chile, a statistical study fitted the following power law (tabla.csv):\n   \n$$\nbiomass(t) = \\alpha \\cdot t^\\beta + \\gamma\n$$\n\n1. To extrapolate to earlier years; due to the formula yielding negative values (for a few types of pinus). A linear adjustment was made:\n\n$$\n\\text{biomass}(t) = \n\\begin{cases} \n\\left(\\alpha \\cdot \\text{stableyear}^\\beta + \\gamma \\right) \\cdot \\frac{t}{\\text{stableyear}} \u0026 \\text{if } t \u003c \\text{stableyear} \\\\\n\\alpha \\cdot t^\\beta + \\gamma \u0026 \\text{if } t \u003e= \\text{stableyear}\n\\end{cases}\n$$\n\n_Stable year is the year when the formula begins to yield stable results (it depends on the type of pinus)._\n\n1. A template for generating a timber plantation and different management policies was made (config.toml)\n    ```toml\n    horizonte = 10 # number of years to generate\n    rodales = 36 # number of stands to generate, choosing one model at random\n\n    [random]\n    # random number generator seed: omit or comment for different results each run\n    seed = 5\n    # `low` (inclusive) to `high` (exclusive)\n    # n, n+1 for getting a single value: n\n    # see np.random.randint\n    edades = [1, 18] # min, max age of generated stands\n    has = [5, 15] #  min, max hectares of generated stands\n\n    # ranges: start, stop, step\n    # n, n+1 for getting a single value range: [n]\n    # see np.arange\n    [eucalyptus]\n    cosechas = [10, 20, 3] # for each Eucalyptus stand, generate different biomass histories harvesting in the year 10, 13, 16 and 19 (4 histories) \n    \n    [pino]\n    raleos = [6, 11, 2] # thinning policies in the years 6, 8, 10.\n    cosechas = [18, 29, 3] # harvesting policies in the years 18, 21, 24, ... (every 3 years)\n    # all feasible histories combining thinning and harvesting policies will be generated\n    min_ral = 6 #lower bound to tree thinning actions\n    ```\n\n1. For a real instance, the numbers of stands and its characteristics can be passed instead of generated at random. For this a `.csv` or `.shp` file is used, the data must include the following fields:\n\n- **fid**: Stand or feature ID of the polygon in the  `.csv` or `.shp` file  \n- **mid**: Unique identifier for the model to which the stand belongs, must match the `id` field in `tabla.csv`\n- **age**: Age of the stand  \n- **hectare (ha)**: Area in hectares  \n\nSee `auxiliary.py` for GIS extraction or creation of this attributes table `bosque_data.csv` using the methods `get_data` and `create_bosque`.\n\n### quick start\n\n0. Clone, download or just get `simulator.py`, `tabla.csv` and `config.toml`\n1. Have numpy installed (and toml if python version \u003c 3.11)\n2. Console run: `python simulator.py` to generate at random or `python simulator.py -f bosque_data.csv` to use a real instance\n3. Scripting/Interactive use:\n    ```python\n    import simulator\n    rodales = simulator.main(['-s']) # rodales is a list of dictionaries each representing a stand with its biomass history, harvesting and thinning policies\n    ```\n4. Done! The output is a list of several csv files: biomass.csv, events.csv, vendible.csv, codigo_kitral.csv \u0026 bosque.csv\n\n### more info\n\n1. `python simulator.py --help`\n2. See `example` folder\n3. Read ![`simulator.py`](simulator.py) `__doc__`s\n4. Read `config.toml`\n5. Read Methodoly section of ![\"Modelos de predicción de biomasa a nivel de rodal en plantaciones de Eucalyptus globulus y Pinus radiata en Zona centro sur de en Chile\"](Modelos%20de%20predicción%20de%20biomasa%20a%20nivel%20de%20rodal%20en%20plantaciones%20de%20Eucalyptus%20globulus%20en%20Chile.pdf)\n\n### models plots\n\n![models](models.png)\n![tabla](tabla.png)\n### example of new formula of biomass in model whith id 30\n![1_id](model_30_id.png)  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffire2a%2Fgrowth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffire2a%2Fgrowth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffire2a%2Fgrowth/lists"}