Entity Reference
This page is the complete reference for every entity class in CESM. Each section covers the entity’s purpose, attributes, applicable mixins, relationships to other entities, and an example drawn from the sample dataset.
For the conceptual overview and design rationale, see Overview. For physical units and the currency convention, see Unit Conventions. For method enumerations and their required parameters, see Methods Reference.
Base Classes
Entity (abstract)
Entity is the abstract root of the class hierarchy. Every concrete entity inherits these attributes.
| Attribute | Type | Description |
|---|---|---|
|
string (identifier) |
User-facing unique name. Acts as the primary key. |
|
URI or CURIE |
Optional identifier for semantic web integration. |
|
string[] |
List of alternative names and aliases. |
|
string |
Free-text description of the entity. |
Node (abstract)
Node extends Entity and is the abstract parent of all node types.
| Attribute | Type | Description |
|---|---|---|
|
NodeType enum |
Discriminator that limits allowed subtypes: |
Three concrete classes inherit from Node: Balance, Storage, and Commodity.
Nodes
Balance
Balance nodes maintain an input/output balance in every time step. They do not have a storage state variable. Balance nodes are the workhorse of energy system models — they represent buses where supply must equal demand, plus any slack penalties.
Mixins: HasFlow, HasPenalty
| Attribute | Type | Description |
|---|---|---|
Inherited from Entity |
||
|
string |
Unique identifier. |
From HasFlow mixin |
||
|
float (MWh) |
Annual flow used to scale |
|
float[] (unitless) |
Time series profile. Positive values are inflow, negative values are outflow from the node. |
|
FlowScalingMethod enum |
How to combine |
From HasPenalty mixin |
||
|
float or PeriodFloat (currency/MWh) |
Cost per MWh of slack created (unserved energy). |
|
float or PeriodFloat (currency/MWh) |
Cost per MWh of slack destroyed (excess energy). |
Relationships:
-
Connected to Units via Unit_to_node and Node_to_unit ports.
-
Connected to other nodes via Links.
-
Can be a member of a Group (via Group_entity).
west- name: west
flow_scaling_method: scale_to_annual
flow_annual: 20000000.0
flow_profile: [-602.1, -780.7, -802, -769.1, -1171.9, -1357.8, -1475.2, -1575.1, -1673.2, -1500]
penalty_upward: 1000
Storage
Storage nodes include a state variable that tracks stored energy across time steps. They maintain the same input/output balance as a Balance node, but also model charging and discharging of the state. Storage capacity can receive investments.
Mixins: HasFlow, HasPenalty, HasInvestments
| Attribute | Type | Description |
|---|---|---|
Own attributes |
||
|
float (MWh) |
Capacity of a single storage asset. |
|
float or PeriodFloat (unitless) |
Number of pre-existing storage assets at model start. |
|
float (currency/kWh) |
Overnight investment cost per kWh of storage capacity. |
|
float (currency/kWh/year) |
Annual maintenance cost per kWh of storage capacity. |
|
float (%) |
Fraction of stored energy lost per hour. |
|
float or float[] (%) |
Time series for forced outage representation. |
From HasFlow mixin |
||
|
float (MWh) |
Annual flow for scaling. |
|
float[] (unitless) |
Flow profile time series. |
|
FlowScalingMethod enum |
Profile scaling method. |
From HasPenalty mixin |
||
|
float or PeriodFloat (currency/MWh) |
Slack creation penalty. |
|
float or PeriodFloat (currency/MWh) |
Slack destruction penalty. |
From HasInvestments mixin |
||
|
InvestmentMethod enum |
Investment method: |
|
float or PeriodFloat (%) |
Discount rate for the investment. |
|
float or PeriodFloat (years) |
Economic payback time used to annualise investments. |
Relationships:
battery- name: battery
storage_capacity: 750
storages_existing: 2
investment_method: no_limits
investment_cost: 600.0
discount_rate: 7.0
payback_time: 12
flow_scaling_method: use_profile_directly
flow_profile: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
penalty_upward: 10000
Commodity
Commodity nodes represent exogenous markets where the model can buy or sell commodities at a given price.
| Attribute | Type | Description |
|---|---|---|
|
CommodityType enum (required) |
Type of commodity: |
|
float or PeriodFloat (currency/MWh) |
Price per unit of the product bought or sold. |
Relationships:
-
Connected to Units via Node_to_unit ports (fuel supply) or Unit_to_node ports (emission output).
natural_gas- name: natural_gas
commodity_type: fuel
price_per_unit: 25
Unit
Unit
Unit entities convert one or more input flows into one or more output flows.
The conversion_method determines the mathematical relationship between inputs and outputs.
Units connect to nodes exclusively through ports.
Mixin: HasInvestments
| Attribute | Type | Description |
|---|---|---|
Own attributes |
||
|
ConversionMethod enum |
How inputs convert to outputs: |
|
StartupMethod enum |
How startups are treated: |
|
float or PeriodFloat (unitless) |
Number of pre-existing conversion units at model start. |
|
float (currency/unit) |
Cost of one full startup for one unit. |
|
float or ConversionRatesFloatFloat[] |
Efficiency multiplier(s). A single float for constant efficiency, or a list of operating-point/conversion-rate tuples for piecewise efficiency curves. |
|
float or float[] (%) |
Time series for forced outage representation. |
From HasInvestments mixin |
||
|
InvestmentMethod enum |
Investment method: |
|
float or PeriodFloat (%) |
Discount rate for the investment. |
|
float or PeriodFloat (years) |
Economic payback time. |
Relationships:
-
Receives input from Nodes via Node_to_unit ports.
-
Sends output to Nodes via Unit_to_node ports.
ocgt- name: ocgt
conversion_method: constant_efficiency
units_existing: 2
efficiency: 38.0
investment_method: no_limits
discount_rate: 6.0
payback_time: 25
Ports
Port (abstract)
Port is the abstract base for directed connections between units and nodes.
Every port has a source and a sink.
Port capacity, investment cost, and operational cost are defined here.
Mixin: HasProfiles
| Attribute | Type | Description |
|---|---|---|
Own attributes |
||
|
Entity reference (required) |
Name of the source entity (Unit or Node, depending on subclass). |
|
Entity reference (required) |
Name of the sink entity (Unit or Node, depending on subclass). |
|
float (MW) |
Capacity of the port for a single unit. |
|
float or PeriodFloat (currency/kW) |
Overnight investment cost per kW. |
|
float or PeriodFloat (currency/kW/year) |
Annual maintenance cost per kW. |
|
float or PeriodFloat (currency/MWh) |
Variable cost per MWh of flow through the port. |
|
ConstraintFloat (unitless) |
Multiplier between constraints and the flow. Maps constraints to their coefficients. |
|
float (MWs/MW) |
Inertia constant for a synchronously connected unit to this node. |
|
float or float[] (%) |
Time series for forced outage representation. |
From HasProfiles mixin |
||
|
float[] (unitless) |
Upper bound time series on flow as a fraction of capacity. |
|
float[] (unitless) |
Lower bound time series on flow as a fraction of capacity. |
Unit_to_node
Unit_to_node is an output port — flow leaves a Unit and enters a Node.
| Attribute | Type | Description |
|---|---|---|
|
Unit reference (required) |
The unit producing the output. |
|
Node reference (required) |
The node receiving the output. |
All other attributes are inherited from Port.
ocgt.west- name: ocgt.west
source: ocgt
sink: west
capacity: 50
investment_cost: 500
Node_to_unit
Node_to_unit is an input port — flow leaves a Node and enters a Unit.
| Attribute | Type | Description |
|---|---|---|
|
Node reference (required) |
The node supplying the input. |
|
Unit reference (required) |
The unit consuming the input. |
All other attributes are inherited from Port.
natural_gas.ocgt- name: natural_gas.ocgt
source: natural_gas
sink: ocgt
Link
Link
Link connects two nodes (node_A and node_B) and models energy transfer between them — a transmission line, a pipeline, or any bidirectional flow path.
Mixin: HasInvestments
| Attribute | Type | Description |
|---|---|---|
Own attributes |
||
|
Node reference (required) |
First node of the bidirectional link. |
|
Node reference (required) |
Second node of the bidirectional link. |
|
TransferMethod enum |
How to model the transfer: |
|
float (MW) |
Capacity of a single link asset. |
|
float or PeriodFloat (unitless) |
Number of pre-existing links at model start. |
|
float (currency/kW) |
Overnight investment cost per kW. |
|
float (currency/kW/year) |
Annual maintenance cost per kW. |
|
float (currency/MWh) |
Variable cost per MWh of flow. |
|
float or ConversionRatesFloatFloat[] |
Efficiency/conversion multiplier(s) for the link. |
|
float or float[] (%) |
Time series for forced outage representation. |
From HasInvestments mixin |
||
|
InvestmentMethod enum |
Investment method: |
|
float or PeriodFloat (%) |
Discount rate for the investment. |
|
float or PeriodFloat (years) |
Economic payback time. |
The efficiency attribute on a Link can be a single float (symmetric), a float array, or a DirectionalValue with separate forward (A to B) and reverse (B to A) values.
Relationships:
pony1- name: pony1
node_A: east
node_B: west
transfer_method: regular_linear
capacity: 500
links_existing: 1
efficiency: 98.0
investment_method: no_limits
investment_cost: 1600
discount_rate: 4.0
payback_time: 50
Supporting Entities
Period
Period defines an investment period and how many years it represents in the model. Periods are used for discounting and for associating period-dependent parameter values (via the PeriodFloat helper type).
| Attribute | Type | Description |
|---|---|---|
|
float |
How many years the period represents before the next period. Used for discounting. Can be below one (multiple periods in one year). |
y2030- name: y2030
years_represented: 5.0
Group
Group defines constraints that apply across multiple entities at once.
| Attribute | Type | Description |
|---|---|---|
|
GroupType enum (required) |
Type of group: |
|
float (MW) |
Maximum aggregated investment capacity across all group members, summed over all periods. |
Relationships:
-
Members are added via Group_entity records.
elec_nodes- name: elec_nodes
group_type: power_grid
Group_entity
Group_entity assigns an entity as a member of a group.
| Attribute | Type | Description |
|---|---|---|
|
Group reference (required) |
The group to which the entity belongs. |
|
Entity reference (required) |
The entity being added to the group. |
elec_nodes.west- name: elec_nodes.west
group: elec_nodes
entity: west
Constraint
Constraint defines user-defined constraints on decision variables.
The constraint binds to entity flows through the constraint_flow_coefficient attribute on ports.
| Attribute | Type | Description |
|---|---|---|
|
float[] (multivalued) |
Right-hand side of the constraint equation. |
|
Equality enum |
Sense of the constraint: |
Solve_pattern
Solve_pattern defines the properties of each solve — single-solve versus rolling-horizon, temporal scope, look-ahead parameters, and time resolution. See Temporal Model for a detailed discussion.
| Attribute | Type | Description |
|---|---|---|
|
SolveMode enum |
Solve process: |
|
Period[] (ordered) |
Periods from which operational results are reported. |
|
Period[] (ordered) |
Periods from which investment results are reported. |
|
Period[] (ordered) |
Periods from which storage level information is passed to subsequent solves. |
|
Period[] (ordered) |
Additional periods included in dispatch optimisation but not reported. |
|
Period[] (ordered) |
Additional periods included in investment optimisation but not reported. |
|
Timeset[] (ordered) |
Pairs of start time and duration defining what part of the timeline to solve. Can be a list for representative periods. |
|
Duration (ISO 8601) |
How far each rolling window jumps forward. |
|
Duration (ISO 8601) |
Additional look-ahead beyond |
|
Duration (ISO 8601) |
Time resolution the model should use. Must be an integer multiple of the original data resolution. |
|
Solve_pattern reference |
A child solve pattern to be executed inside the parent. |
solve_2030- name: solve_2030
solve_mode: single_solve
start_time_durations:
- start_time: '2023-01-01T00:00'
duration: PT10H
periods_realise_operations: ['y2030']
periods_realise_investments: ['y2030']
periods_additional_investments_horizon: ['y2035']
System
System holds parameters that apply to the whole system being modelled.
| Attribute | Type | Description |
|---|---|---|
|
Solve_pattern[] (ordered) |
Ordered list of solve patterns that define the sequence of solves. |
|
float or PeriodFloat (%) |
Rate of inflation for the currency year of the dataset. |
Relationships:
-
References Solve_pattern entities via
solve_order.
test_system- name: test_system
solve_order: ['solve_2030', 'solve_2035_invest', 'solve_2035_rolling_dispatch']
inflation_rate: 3.0
Dataset
Dataset
Dataset is the tree root of a CESM data file. It holds global metadata and collections of all entity types.
| Attribute | Type | Description |
|---|---|---|
|
integer (identifier) |
Dataset-level identifier to distinguish between dataset versions. |
|
datetime[] (ordered) |
Time steps for which data can be entered. Used to validate input time series. |
|
string (ISO 4217, required) |
Currency code for all monetary values in the dataset (e.g. |
|
string (four-digit year, required) |
All monetary values are expressed in real terms for this year. |
|
Balance[] |
Collection of Balance nodes. |
|
Storage[] |
Collection of Storage nodes. |
|
Commodity[] |
Collection of Commodity nodes. |
|
Unit[] |
Collection of Units. |
|
Node_to_unit[] |
Collection of input ports. |
|
Unit_to_node[] |
Collection of output ports. |
|
Link[] |
Collection of Links. |
|
Group[] |
Collection of Groups. |
|
Constraint[] |
Collection of Constraints. |
|
Group_entity[] |
Collection of Group memberships. |
|
Solve_pattern[] |
Collection of Solve patterns. |
|
Period[] |
Collection of Periods. |
|
System[] |
Collection of System configurations. |
Mixins
Mixins attach reusable parameter groups to entity classes without deep inheritance. An entity that includes a mixin gains all of its attributes.
HasFlow
| Attribute | Type | Description |
|---|---|---|
|
float (MWh) |
Annual flow used to scale the flow profile. Always positive. |
|
float[] (unitless) |
Flow profile time series. Positive values are inflow, negative values are outflow from the node. |
|
FlowScalingMethod enum |
How to combine profile and annual flow: |
HasPenalty
| Attribute | Type | Description |
|---|---|---|
|
float or PeriodFloat (currency/MWh) |
Penalty for creating slack (unserved energy). |
|
float or PeriodFloat (currency/MWh) |
Penalty for destroying slack (excess energy). |
HasInvestments
| Attribute | Type | Description |
|---|---|---|
|
InvestmentMethod enum |
Investment method: |
|
float or PeriodFloat (%) |
Discount rate for the investment. |
|
float or PeriodFloat (years) |
Economic payback time used to annualise investments. |
HasProfiles
Applied to: Unit_to_node, Node_to_unit
| Attribute | Type | Description |
|---|---|---|
|
float[] (unitless) |
Upper bound on flow as a fraction of capacity. |
|
float[] (unitless) |
Lower bound on flow as a fraction of capacity. |
Helper Types
Several structured types support complex parameter values. These are not entities themselves but are used as attribute types within entities.
DirectionalValue
DirectionalValue holds separate values for each direction of a bidirectional link.
| Field | Type | Description |
|---|---|---|
|
float[] |
Value applied in the forward direction (Node_A to Node_B). |
|
float[] |
Value applied in the reverse direction (Node_B to Node_A). |
PeriodFloat
PeriodFloat represents period-dependent parameter values.
| Field | Type | Description |
|---|---|---|
|
Period[] |
List of period references. |
|
float[] |
Corresponding numeric values. |
ConstraintFloat
ConstraintFloat maps constraints to coefficients.
| Field | Type | Description |
|---|---|---|
|
Constraint[] |
List of constraint references. |
|
float[] |
Corresponding coefficient values. |
ConversionRatesFloatFloat
ConversionRatesFloatFloat defines operating-point/conversion-rate pairs for piecewise efficiency curves.
| Field | Type | Description |
|---|---|---|
|
float |
Operating point (starting from 100%, decreasing). |
|
float |
Conversion rate (efficiency) at this operating point. |
Timeset
Timeset pairs a start time with a duration to define temporal windows for solve patterns.
| Field | Type | Description |
|---|---|---|
|
datetime |
Start of the time window. Must match a value in the dataset timeline. |
|
Duration (ISO 8601) |
Length of the time window (e.g. |