Write the daily supply, storage injection and withdrawal policy for a gas distribution utility's storage year under inventory ratchets, a regulator's fill and deliverability floors, a take-or-pay baseload contract and pipeline imbalance terms; it is scored by simulation over hidden years.
harbor run -t reactive-labs/gas-storage-injectionharbor download reactive-labs/gas-storage-injectionYou are Tobias Rehn, Senior Supply Planner at Northmarch Gas Company. Every morning the Gas Supply desk nominates the next gas day's Ardwell fixed-price baseload, its spot purchases at the Aldreth Hub, and the injection or withdrawal at the Harrowfield storage field, which Tamsett Storage operates for Northmarch; Corran Valley Pipeline carries the purchased gas to the Corby city gate and cashes out the daily imbalance. Today is Thursday 18 March 2027. Maren Solberg, Director of Gas Supply, wrote to you this morning:
I need the daily rule for the 2027-28 storage year (Gas Day 1 April 2027 to 31 March 2028) as a policy in Hana's StorPlan format before the year starts, so we can run it against the model and the desk can run it every morning. It will be judged on the GSP-04 section 8 cost, over many years like the one Boreal describes, and it must never breach the AEB order.
In /app/inputs:
RE_2027-28_storage_year_operating_rule_for_StorPlan.eml: the thread with Maren, Gas Control, Supply
Analytics, Regulatory Affairs and RatesTamsett_FSS_Storage_Service_Agreement_NGC-FSS-014.docx and Tamsett_FSS-014_Amendment_No2_eff_2027-04-01.pdf:
the storage contract and its amendmentAEB_Order_EB-2024-0117_Winter_Reliability.pdf and AEB_Supplemental_Order_EB-2026-0388.pdf: the regulator's
winter reliability orderCVP_FT-NGC-0091_terms_and_GTC14_balancing_excerpt.pdf and CVP_Planned_Maintenance_Notice_PMN-2027-14.pdf:
the transportation and balancing terms, and the pipeline's maintenance noticeArdwell_Baseload_Confirmation_FPB-2027-NGC-01.pdf: the 2027-28 fixed-price baseloadNGC_GSP-04_Gas_Supply_Operating_Procedure_Rev3.docx: the desk procedure, the cost definition and current
practiceBoreal_Long-Range_Outlook_2027-28.pdf: the consulting meteorologist's outlookAldreth_Hub_forward_strip_settle_2027-03-15.csv and the records: Corby Field daily weather since 1997, daily
system sendout and the Aldreth Hub daily index since April 2017, Harrowfield daily storage since April 2021 and
the CVP daily balancing statements since April 2024In /app/sim: StorPlan, the model the department uses to test supply rules (README.md explains it and the
policy interface), with starter_policy.py (current practice, GSP-04 Appendix A), the 2026-27 baseline config and
seeds 1-20. Run it from /app with python -m sim.run --policy <file> --seeds 1-20.
/app/output/policy.py, defining a class Policy exactly as in /app/sim/README.md:
Policy() is constructed once per storage year with no arguments; it may load data files that you put in
/app/output next to it (find them relative to __file__).decide(obs) is called for each gas day of the year with the observation described in the README: the date,
the inventory at the start of the day and the day's StorLink injection and withdrawal limits, the CVP firm
capacity for the day, yesterday's Aldreth Hub index, the Ardwell price and the baseload taken so far in the
month, the Corby Field HDD forecast for the day and the six days after it, whether CVP has declared a Critical
Day, and yesterday's actual HDD, sendout and imbalance. It returns
{"baseload": q, "spot": q, "inject": q, "withdraw": q} in MDth for the gas day.Your policy will be run, day by day, over many simulated 2027-28 storage years drawn as the Boreal outlook describes, under the contracts, the CVP terms and notice and the AEB order as they apply to 2027-28. Each year is scored on its GSP-04 section 8 supply cost as the share of the possible saving you capture: zero at what current practice (GSP-04 Appendix A) costs in the same year, full marks at what a plan costs that knew that year's weather, sendout and index in advance. No rule that has to nominate before the weather and the index are known can reach full marks; every dollar saved counts. A year in which the AEB fill requirement or deliverability floor is breached on any gas day, or in which the policy fails, returns an invalid decision or breaks the time limits, scores zero.