Write the weekly critical-spares policy (buying, repairs, expediting, crane call-offs, issue priority) for an onshore wind O&M company, judged by simulating two years of failures under the contracts, finance policy and fleet changes in force.
harbor run -t reactive-labs/wind-spares-inventoryharbor download reactive-labs/wind-spares-inventoryYou are the new Spares and Logistics Planner at Brackenfell Wind Services LLC (BWS) in Wichita, the O&M company for four onshore wind farms in Kansas and Oklahoma (Nordhavn NH100, Aeolis AE116 and Tarrow T140 turbines). From Monday 5 July 2027 you own the policy for the twelve critical spares: main bearings, pitch drive motors, converter power modules and yaw drive gearmotors. Dana Okafor, Director of Operations & Maintenance, wrote:
From Monday 5 July the critical spares policy is yours. I want it as a policy SPM-3 can run week by week, file /app/output/policy.py, so we can stop arguing about min/max spreadsheets. Owen and Priya will run it through the FY28-29 scenario set (two years from 5 July, many failure histories) with the assumptions and contract terms that will actually be in force over those two years. It gets judged on total cost the way FIN-07 defines it. A run that breaks FIN-07 section 4 even once is a failed run, full stop.
/app/inputs: the email thread, the Halvorsen supply agreement and its Amendment No. 2, the Kessling parts and
repair agreement, the Bergmann crane framework, finance policy BWS-FIN-07 rev 4, the FY28 site revenue
workbook, the Coldwater Draw Phase 2 handover plan, Tarrow bulletin TSB-140-031, the current SOP
BWS-OPS-SP-02 rev B, and CMMS, SAP purchasing and Kessling RMA extracts./app/sim: SPM-3, BWS's spares planning model, with its README, its config, starter_policy.py (today's SOP
as a policy) and a runner. From /app: python -m sim.run --policy sim/starter_policy.py --seeds 1-20./app/output/policy.py, defining a class Policy that SPM-3 can run:
class Policy:
def __init__(self): ...
def act(self, obs: dict) -> dict: ...
A fresh Policy() is created for each scenario and act is called once per week, for weeks 0 to 103 (week 0
starts Monday 5 July 2027). The observation and the decision are exactly as in /app/sim/README.md ("Policy
interface"); in short:
obs has week, week_start, horizon_weeks, parts (per material: stock on hand, issued, cores, open PO
lines, units at repair), jobs (open work orders), turbines (turbines in service with their status and component ages in
weeks), cranes_on_site, cranes_waiting, spares_exposure_usd and last_week (events). Money is USD, times
are in planning weeks.orders ({material: qty}), repairs
({material: {"standard": n, "express": m}}), expedite (list of order_id), cranes (list of
{"job_id": ..., "mode": "standard" | "short_notice"}) and priority (list of job_id).The policy may load data files you put in /app/output (open them relative to os.path.dirname(__file__)). It
runs with Python 3.12 and the packages installed in this environment, in its own process, without network access
and must not rely on any file outside /app/output. Policy() must be ready within 20 seconds, each act call
must return within 1 second, and the 104 calls of one two-year run may take at most 2.5 seconds in total.
Your policy is run through many simulated two-year histories (the 104 weeks from 5 July 2027), drawn the way the FY28-29 plan expects them, under the assumptions, contract terms and fleet that the documents say will be in force in those weeks. The histories are scored in groups on the total cost of the spares policy as BWS-FIN-07 section 5 defines it. Each group's cost is set between two marks on the same histories: the cost of today's SOP, and the cost of a plan drawn up afterwards by someone who knew when every part would fail, when every delivery and repair would actually come back and which weeks had a lift window, and who kept to every contract term and to the Spares Exposure limit. A group at or above the SOP's cost gets no credit; credit rises in a straight line to full credit at the cost of that hindsight plan, which no policy run week by week can be expected to reach. A group gets no credit if, in any of its histories, a commitment takes Spares Exposure over the limit in force, a decision is invalid as described in the SPM-3 README, or the policy crashes, returns something other than a decision, or runs out of time.