From 00b8e324b4e9c16166c958dfa3d5fd88b726f045 Mon Sep 17 00:00:00 2001 From: Cameron Wade Date: Tue, 11 Aug 2026 10:46:09 -0300 Subject: [PATCH] Add oeo_9r_8d_base v2: fix one-way capacity_to_activity on inter-regional ties Temoa stores each inter-regional link as two one-way pseudo-regions and indexes capacity_to_activity by pseudo-region. Only one direction of each electricity tie carried a c2a row, so Temoa's Param default of 1 applied to the other direction instead of 31.536 PJ/(GW*year), while capacity is forced equal both ways. That direction could therefore carry ~3% of its rated capacity. Verified in the generated LP (constraint coefficient -3.9425 with the row present, -0.125 without) and by a controlled solve on temoa's test_system. The defect is inherited from the v3.1 source, where the rows are tagged "from PowerGenome", so it predates the v4 migration and is present in earlier published results. It does not bind in the no-carbon-price case, where the affected directions run under 5% of even their throttled ceiling. It binds under a carbon price: on N_CEN-MID_AT in 2050, flow sits at the artificial ceiling in 53 of 171 timeslices, and seven other ties run at 53-90% of theirs. v2 adds the 22 missing rows, each taking the value from its tie's populated direction. H2_TRANS_N is deliberately untouched: its capacity is denominated in PJ/year, so the default of 1 is correct there. Diff is 22 insertions, 0 deletions. Also sets latestVersion to v2, which the publish workflow does not update itself. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01R5cg33nm9YtJQ37NVW3Xop --- .../oeo_9r_8d_base.sqlite/diff-v1-to-v2.diff | 32 +++++++++++++++++++ manifest.json | 13 +++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 diffs/oeo_9r_8d_base.sqlite/diff-v1-to-v2.diff diff --git a/diffs/oeo_9r_8d_base.sqlite/diff-v1-to-v2.diff b/diffs/oeo_9r_8d_base.sqlite/diff-v1-to-v2.diff new file mode 100644 index 0000000..101e381 --- /dev/null +++ b/diffs/oeo_9r_8d_base.sqlite/diff-v1-to-v2.diff @@ -0,0 +1,32 @@ +# summary: 22 additions, 0 deletions +--- prev.sqlite ++++ oeo_9r_8d_base.sqlite +@@ -69506,6 +69506,28 @@ + INSERT INTO "capacity_to_activity" VALUES('TX','E_COALSTM_R_1_2030',31.536,'PJ / (GW * year)','added as part of Oct 2025 updates'); + INSERT INTO "capacity_to_activity" VALUES('TX','E_COALSTM_R_3_2030',31.536,'PJ / (GW * year)','added as part of Oct 2025 updates'); + INSERT INTO "capacity_to_activity" VALUES('TX','E_COALSTM_R_4_2025',31.536,'PJ / (GW * year)','added as part of Oct 2025 updates'); ++INSERT INTO "capacity_to_activity" VALUES('CA-NW','E_TRANS_N',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('CA-SW','E_TRANS_N',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('CEN-SE','E_TRANS_N',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('MID_AT-NE','E_TRANS_N',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('NW-SW','E_TRANS_N',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('N_CEN-CEN','E_TRANS_N',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('N_CEN-MID_AT','E_TRANS_N',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('N_CEN-SE','E_TRANS_N',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('SE-MID_AT','E_TRANS_N',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('SW-CEN','E_TRANS_N',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('TX-CEN','E_TRANS_N',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('CA-NW','E_TRANS_R',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('CA-SW','E_TRANS_R',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('CEN-SE','E_TRANS_R',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('MID_AT-NE','E_TRANS_R',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('NW-SW','E_TRANS_R',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('N_CEN-CEN','E_TRANS_R',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('N_CEN-MID_AT','E_TRANS_R',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('N_CEN-SE','E_TRANS_R',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('SE-MID_AT','E_TRANS_R',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('SW-CEN','E_TRANS_R',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); ++INSERT INTO "capacity_to_activity" VALUES('TX-CEN','E_TRANS_R',31.536,'PJ / (GW * year)','added by fix_exchange_c2a.py: reverse direction of this tie had no c2a row, so Temoa defaulted it to 1 instead of the tie value, throttling flow in this direction to ~1/c2a of its rated capacity. Value copied from the populated direction.'); + CREATE TABLE commodity + ( + name TEXT diff --git a/manifest.json b/manifest.json index 1b14c9a..64d99c4 100644 --- a/manifest.json +++ b/manifest.json @@ -69,8 +69,19 @@ }, { "fileName": "oeo_9r_8d_base.sqlite", - "latestVersion": "v1", + "latestVersion": "v2", "history": [ + { + "version": "v2", + "timestamp": "2026-08-11T13:44:42.828048Z", + "sha256": "a9ea341356ad160ea4886fe6ca6599439cbedd8766aca94a10cf68bdf18b08b1", + "r2_object_key": "oeo_9r_8d_base/v2-a9ea341356ad160ea4886fe6ca6599439cbedd8766aca94a10cf68bdf18b08b1.sqlite", + "staging_key": "staging-uploads/a9ea341356ad160ea4886fe6ca6599439cbedd8766aca94a10cf68bdf18b08b1.sqlite", + "diffFromPrevious": "diffs/oeo_9r_8d_base.sqlite/diff-v1-to-v2.diff", + "commit": "pending-merge", + "temoaRepoHash": "9d26bd57b81abec5c2632ba2a9d591d91472a99a", + "description": "pending-merge" + }, { "version": "v1", "timestamp": "2026-07-16T12:28:03.466538Z",