A Shiny-Based Decision-Support Tool for Rainwater Harvesting, Tank Storage, and Crop Allocation Planning in Small-Scale Horticultural Gardens
Abstract
Harvested rainwater can support small-scale horticulture, but its value depends on the joint timing of rainfall, crop demand, capture area, and finite storage. We developed RainHarvest Garden Optimizer, an open-source R/Shiny decision-support application that couples crop phenology and crop-water requirements with rainwater capture, monthly tank storage, and linear-programming crop allocation. The revised formulation explicitly represents pre-irrigation storage, end-of-month storage, overflow, and non-negative water availability, and was evaluated through spatial climatologies, observed interannual variability, factorial climatic perturbations, and one-at-a-time sensitivity analysis. Across ten climatic cells, annual precipitation ranged from 384.7 to 951.4 mm and the annual P/ET0 ratio from 0.20 to 0.61. Under the driest climatology, reaching 95% cultivated area required substantially greater catchment and storage infrastructure than under the wettest climate, while an exceptionally dry 2023 realization at T01 reduced maximum cultivated area to 61.7% even at the largest evaluated infrastructure combination. One-at-a-time analysis identified precipitation and tank capacity as the dominant physical drivers of response: a 20% reduction in precipitation decreased cultivated area by 17.7% and the gross-revenue (GR) objective by 23.0% on average. The application is intended for strategic, pre-season planning and identifies fully irrigated feasible crop plans rather than simulating yield loss under deficit irrigation.