# Allocator

> No-discretion deterministic clearing, constraint-authority inputs, federation announcements, withhold-on-stale, and whole-pool ramp sizing.

- Repository: g2tf-org/g2tf-standards
- GitHub: https://github.com/g2tf-org/g2tf-standards
- Human docs: https://grok-wiki.com/public/docs/g2tf-org-g2tf-standards-436ba3f3e0ff
- Complete Markdown: https://grok-wiki.com/public/docs/g2tf-org-g2tf-standards-436ba3f3e0ff/llms-full.txt

## Source Files

- `members/allocator.md`
- `specs/gcap/spec.md`
- `specs/g2p/spec.md`
- `architecture/allocation-domains.md`
- `architecture/federation.md`
- `architecture/failsafe-model.md`

---

---
title: "Allocator"
description: "No-discretion deterministic clearing, constraint-authority inputs, federation announcements, withhold-on-stale, and whole-pool ramp sizing."
---

The Allocator is the per-domain clearing agent in `members/allocator.md`. Each one-minute interval it executes [GCAP](/gcap-reference) over [G2P](/g2p-reference) messages: it listens for in-zone Member Service Descriptors and peer-Allocator federation announcements, then broadcasts per-class **commit-%** (plus **committed dispatch** / **committed take**) and federation announcements. It holds **no internal intelligence or discretion**. Any party with the same inputs MUST be able to reproduce the same allocations.

<Info>
**Status:** Draft — seeking input · **Editors:** TBD · **Source:** RFC #1 Protocol Interactions table. GCAP and G2P are independently versioned on the **26.0-draft** line. RFC 2119 / RFC 8174 keywords apply. Wire format, encoding, and per-element state machines are unspecified.
</Info>

## Role and scope

An Allocator represents one **Allocation Domain**: the Member Elements cleared against a common Grid 1 constraint set. Domains nest (local transmission congestion zone → utility / balancing authority → regional RTO/ISO). One Allocator's associated scope can sit at any of those levels: transmission line → utility load zone → RTO region.

It represents the zone's Grid 1 **power production capacity** and **transmission constraints**. It MAY incorporate power distribution factors and dynamics from Dynamic Line Ratings (DLR) and similar sources. It does **not** see or direct workloads inside a facility; it clears class-level positions only.

| Attribute | Value |
|---|---|
| Canonical spec | `members/allocator.md` |
| Clearing logic | `specs/gcap/spec.md` (GCAP 26.0-draft) |
| Message layer | `specs/g2p/spec.md` (G2P 26.0-draft) |
| Class order | DESP C → B → A; Grid 1 Firm is never curtailed |
| Interval | Whole one-minute window; allocations expire with the interval |
| v26.0 quantity | Units of energy in the interval |
| Identity | Stable element identifier bound to a provisioned Allocation Domain (identifier format open) |
| Prices | Out of scope — coordination without prices |

```mermaid
flowchart LR
  subgraph custodians [Grid 1 custodians]
    TO["Transmission owner<br/>MUST provision local + regional constraints"]
    RSO["Regional system operator<br/>MAY add capacity constraints"]
  end
  subgraph domain [Allocation Domain]
    ALLOC["Allocator<br/>GCAP, no discretion"]
    USE["Use Members"]
    BUF["Buffer Members"]
    SRC["Source Members"]
  end
  subgraph peers [Coupled zones]
    PEER["Peer Allocators"]
  end
  TO -->|constraint inputs| ALLOC
  RSO -.->|optional capacity| ALLOC
  USE -->|"Service Descriptor (+ consume)"| ALLOC
  BUF -->|"Service Descriptor (−/+ charge-discharge)"| ALLOC
  SRC -->|"Service Descriptor (− supply)"| ALLOC
  ALLOC -->|"Commitment: commit-%"| USE
  ALLOC -->|"Commitment: committed dispatch"| BUF
  ALLOC -->|"Commitment: committed take"| SRC
  ALLOC <-->|"Federation Announcement"| PEER
  USE -->|"Response / Telemetry"| ALLOC
  BUF -->|"Response / Telemetry"| ALLOC
  SRC -->|"Response / Telemetry"| ALLOC
```

Authority is **not** derived from the protocol. The utility transmission owner MUST provision the Allocator's local and regional constraints. A regional system operator MAY additionally provision capacity constraints to a regional Allocator. Commercial terms (class-mix limits, charging, enforcement of flex) stay in the domain agreement.

## Broadcasts and listens

Two interaction patterns exist: **Member ↔ Allocator** and **Allocator ↔ Allocator**. Both ride G2P. All four message families are per-interval unless noted.

| Direction | G2P family | Payload the Allocator handles |
|---|---|---|
| In | Service Descriptor (§3.1) | Signed in-zone requests/offers over a forward time vector |
| In | Federation Announcement (§3.3) | Coupled-boundary quantities from peer Allocators |
| In | Response / Telemetry (§3.4) | Verified self-dispatch vs. Commitment |
| Out | Commitment (§3.2) | Per-class commit-%; committed dispatch; committed take |
| Out | Federation Announcement (§3.3) | This domain's announce-and-listen export |

<ParamField body="Service Descriptor" type="Member → Allocator" required>
Signed positions in energy-in-the-interval units. Use: one consume (+) position per DESP class. Buffer: − discharge / + charge. Source: supply (−). MAY be reissued each interval; classes MAY change per interval.
</ParamField>

<ParamField body="Commitment" type="Allocator → Member" required>
MUST identify the **interval**, the **domain**, and the **clearing inputs version**. Use receives per-class **commit-%**. Buffer receives **committed dispatch** (cleared before any load is curtailed). Source receives **committed take**.
</ParamField>

<ParamField body="Federation Announcement" type="Allocator ↔ Allocator" required>
MUST identify announcing **domain**, **interval**, and **coupled-boundary quantities**. Message schema is still to be specified in G2P.
</ParamField>

<ParamField body="Response / Telemetry" type="Member → Allocator" required>
Members MUST report actual per-class dispatch against the Commitment. Verification granularity, metering source of truth, and attestation are open.
</ParamField>

Descriptors and Commitments MUST be authenticated; message integrity MUST be verifiable end-to-end. Transmission-level deployments are expected on private networks. PKI, NERC CIP mapping, and replay protection are open (Discussion: Engineering).

## Interval cycle

Clearing MUST finish so Members receive commit-% with time to self-dispatch **before the interval opens**. Descriptor, clearing, and publication deadlines, plus clock sync, are open. Where a Grid 1 dispatch instruction conflicts with a Grid 2 allocation, **Grid 1 prevails**.

<Steps>
<Step title="Collect local constraint inputs">
Take the Grid 1 set provisioned by the domain's custodians: zone power production capacity, transmission constraints, target reserves; optionally DLR and distribution factors. If those inputs are stale, or the **local domain** is partitioned from its constraint authority, **do not clear**.
</Step>
<Step title="Collect G2P interval inputs">
Ingest signed Member Service Descriptors. Ingest peer-Allocator announcements. Missing required peer announcements do **not** stop local clearing — treat the coupled boundary as contributing **no additional headroom**.
</Step>
<Step title="Run GCAP or withhold">
If inputs are fresh, run the headroom → buffers → C-B-A algorithm. Identical inputs MUST yield identical allocations. SHOULD publish (inside the domain) the input digest the Commitment was computed against.
</Step>
<Step title="Publish and bound ramps">
Emit Commitments and federation announcements. Bound total cleared participation so simultaneous member fallback stays inside domain ramp limits. Per-member allocation deltas MUST respect each member's agreed ramp rates.
</Step>
</Steps>

```mermaid
sequenceDiagram
  participant TO as Grid 1 custodians
  participant A as Allocator
  participant M as Members
  participant P as Peer Allocators
  TO->>A: Provision constraints (capacity, transmission, reserves; optional DLR)
  M->>A: Service Descriptor (signed positions)
  P->>A: Federation Announcement (boundary quantities)
  alt Stale local constraints or local domain partition
    A--xM: Withhold Commitment
    M->>M: Fallback to Grid 1 baseline
  else Fresh local constraints
    A->>A: GCAP: headroom, then Buffers, then C→B→A
    A->>M: Commitment (interval, domain, inputs version)
    A->>P: Federation Announcement
    M->>M: Self-dispatch before interval open
    M->>A: Response / Telemetry
  end
```

## Constraint inputs

Each interval the Allocator clears **only** against:

1. **Grid 1 constraints** from this domain's custodians.
2. **Member Service Descriptors** in-zone.
3. **Peer-Allocator announcements**, which MAY add boundary headroom but **MUST NOT relax local constraints**.

Which existing transmission-owner signals are the right inputs, and how to standardize them, is a headline Engineering discussion. Input-digest publication is an Allocator open item even though GCAP already says Allocators SHOULD publish the digest.

<Warning>
Peer announcements inform; they never override local custodians. An Allocator MUST clear only against constraints provisioned by **its own** domain's Grid 1 custodians.
</Warning>

## Clearing algorithm

GCAP redispatches deterministically and proportionally, in this **strict** order:

| Step | Name | Rule |
|---|---|---|
| 1 | Headroom | Compute surplus network capability for the interval. |
| 2 | Buffers | Clear Buffer committed dispatch to absorb shortfall or surplus. **Buffers clear before any load is curtailed.** |
| 3 | Tiered ramp-down | If relief is still required, reduce Use allocations C (Best Efforts) → B (Preferred) → A (Assured). Never touch traditional Firm (Grid 1). |

Within a class, curtailment MUST be **proportional** to connection size and differential request size. The exact weighting, indivisible loads, nodal vs. single-zone headroom, and cross-interval fairness (whether deferred Class C accrues priority) are GCAP open items.

Determinism is the trust model: the Allocator is not an operator. Edge Members own forecasting, workload-to-class mapping, charge/discharge timing, and self-dispatch.

<Note>
v26.0 Source offers are a single supply class. Buffer SoC visibility needed for step 2 is unspecified.
</Note>

## Outputs

Allocations apply to the **coming interval only** and expire with it.

| Recipient | Output | Member obligation |
|---|---|---|
| Use | Per-class **commit-%** | MUST self-dispatch within commit-% and agreed ramp rates; MUST report verified self-dispatch |
| Buffer | **Committed dispatch** | MUST honor dispatch within ramp rates; no Grid 2 support commitment while in fallback |
| Source | **Committed take** | MUST self-dispatch to committed take within ramp rates |
| Peer Allocators | Federation announcement | Listeners import boundary quantities; they MUST NOT use them to loosen local limits |

A Member that has not received a commit-% for the current interval MUST treat itself as in fallback. Explicit staleness timers are still to be specified in G2P.

## Withhold-on-stale vs conservative federation

`members/allocator.md` and GCAP say: on stale inputs or partition, **no clearing**. `architecture/federation.md` says: partition between **peer** Allocators MUST NOT prevent local clearing and MUST NOT trip Members in unaffected domains.

Treat those as two different failures:

| Condition | Allocator action | Member effect |
|---|---|---|
| Stale **constraint inputs**, invalid clearing inputs, or **local domain** partition from custodians / Members | MUST **withhold** clearing | Missed Commitment → Grid 1 fallback |
| Missing required **peer** announcements on a coupled boundary | MUST still clear, **conservatively**, as if the boundary adds **zero** headroom | Local Members keep receiving Commitments |
| Partition between peer Allocators only | Independent local operation | MUST NOT trigger fallback in unrelated domains |

<Warning>
Do not implement "any missing announcement ⇒ withhold." That would trip local Members on a peer-zone partition, which federation forbids. Withhold when **local Grid 1 constraint inputs** are stale or the **local** clearing context is partitioned.
</Warning>

Fallback at the edge is locally determinable from the Member's own state. It MUST NOT depend on reaching the Allocator.

| Element | On missed / stale Commitment |
|---|---|
| Use | Grid 1 baseline (firm load limit) or manual curtailment; follow ramp rates |
| Buffer | Standalone Grid 1 schedule; no Grid 2 support commitment |
| Source | Grid 1 interconnection behavior; follow ramp rates |

## Pool and ramp sizing

The Allocator MUST bound total cleared participation so **simultaneous fallback of all Members** produces aggregate ramps within manageable Grid 1 system ramp limits. That bound is the binding constraint on domain growth; the sizing methodology is open.

Per-member allocation deltas between consecutive intervals MUST respect each member's agreed ramp rates. All transitions — into fallback, out of fallback, and between interval allocations — MUST respect host-utility ramp rates.

## Hosting, redundancy, and Phase 0

Hosting (utility-operated vs. third-party under utility authority) and the redundancy model (active/standby Allocators per domain?) are open. Federation diagrams already allow **Allocator(s)** per nested domain.

There is no reference implementation or wire codec in this repository. Phase 0 is shadow mode: exchange and track commitments, execute only the Grid 1 baseline, then graduate to Phase 1 local integration and Phase 2 regional federation. Implementation reports belong in Discussions.

## Open items owned here

<AccordionGroup>
<Accordion title="Allocator-owned">
Redundancy (active/standby per domain). Clearing-inputs digest publication. Hosting and operational responsibility. Standardization of transmission-owner input signals (Discussion: Engineering).
</Accordion>
<Accordion title="Carried on G2P / GCAP / federation">
Wire format. Intra-interval deadlines and clock sync. Staleness-timer values. Federation announcement schema (boundary headroom only vs. per-class aggregates). Loop prevention and inter-domain import policy. Exact proportionality formula. Overlapping-domain membership (local + regional).
</Accordion>
</AccordionGroup>

## Next

<CardGroup>
<Card title="GCAP reference" href="/gcap-reference">
Headroom, then buffers, then C-B-A; identical-input determinism; pool and ramp-safety bounds.
</Card>
<Card title="G2P reference" href="/g2p-reference">
Four message families, commit-before-open timing, authenticated descriptors, stale-commitment faults.
</Card>
<Card title="Federation" href="/federation">
Announce-and-listen, conservative missing-announcement clearing, peer partition that does not trip local Members.
</Card>
<Card title="Provision constraint inputs" href="/provision-constraint-inputs">
Required Grid 1 set, optional DLR and distribution factors, digests, peers MUST NOT relax local limits.
</Card>
<Card title="Failsafe model" href="/failsafe-model">
Withhold-on-stale, interval-only commitments, locally determinable fallback.
</Card>
<Card title="Allocation domains" href="/allocation-domains">
Nested domains, transmission-owner authority, membership by spec compliance.
</Card>
</CardGroup>
