Main

View or edit on GitHub

This page is synchronized from trase/models/indonesia/palm_oil/main.ipynb. Last modified on 2026-08-05 15:56 CEST by Harry Biddle. Please view or edit the original file there; changes should be reflected here after a midnight build (CET time), or manually triggering it with a GitHub action (link).

# %%timeit -n1 -r1

%configure_logging

from datetime import datetime

from sys import stderr

from trase.tools.sps import SupplyChain

from trase.models.indonesia.palm_oil.upload import upload_model_output

start = datetime.now()
print(f"Started running at: {datetime.now():%Y-%m-%d %H:%M:%S}", flush=True)

for year in [2018]:  # [2019, 2020, 2021, 2022, 2023, 2024]:
    supplychain = SupplyChain(
        "indonesia/palm_oil",
        year=year,
    )
    supplychain.preparation()
    supplychain.load()
    df = supplychain.run()
    upload_model_output(df, supplychain)

end = datetime.now()
print(f"Finished all runs at: {end:%Y-%m-%d %H:%M:%S}", flush=True)
print(f"Total elapsed time: {end - start}", flush=True)

open("done", "w")