Networks

The network class is a subclass of the ModelComponent class. All networks are modelled using this class, and there are no subclasses of specific network models. An overview of all networks that are currently modelled can be found below. A network is defined as the set of all arcs (i.e., connections between nodes) of a specific network type (e.g., “electricitySimple”). In addition to the performance and cost parameters in defined in the respective json file of the network, networks can generally be modelled as either bi- or uni-directional by modifying the parameter bidirectional_network and bidirectional_network_precise in the json file of the respective technology.

If bidirectional_network = 1 the following properties of the network are enforced:

  • The size of an arc in both direction needs to be equal.

  • The capex and the fixed opex are only counted once for each arc. As such a connection once build can be used in both directions.

  • In each time step the flow can only be in one of the two directions.

    • With bidirectional_network_precise = 1 this is enforced with a disjunction and a cut adding integers and thus computational complexity in the solving.

    • With bidirectional_network_precise = 0 this is enforced with a cut, thus not completly eliminating a flow in both directions at the same time.

List of Networks

All networks that are modelled are listed below.

Network name

electricityOffshore

hydrogenSimple

electricitySimple

CO2Railway

CO2PipelineOffshore

CO2Ship

heat

hydrogenPipelineOffshore

hydrogenShip

CO2Truck

electricityOnshore

hydrogenRailway

CO2PipelineOnshore

hydrogenTruck

hydrogenPipelineOnshore

class Network(netw_data: dict)

Class to read and manage data for networks

For each connection between nodes, an arc is created, with its respective cost, flows, losses and consumption at nodes.

Networks that can be used in two directions (e.g. electricity cables), are called bidirectional and are treated respectively with their size and costs. Other networks, e.g. pipelines, require two installations to be able to transport in two directions. As such their CAPEX is double and their size in both directions can be different.

Set declarations:

  • set_netw_carrier: Set of network carrier (i.e. only one carrier, that is transported in the network)

  • set_arcs: Set of all arcs (from_node, to_node)

  • set_arcs_unique: In case the network is bidirectional: Set of unique arcs (i.e. for each pair of arcs, one unique entry)

  • Furthermore for each node:

    • set_receives_from: A set of nodes the node receives from

    • set_sends_to: A set of nodes the node sends to

  • set_consumed_carriers: In case the network has an energy consumption

Parameter declarations:

  • para_size_min: Min Size (for each arc)

  • para_size_max: Max Size (for each arc)

  • para_size_initial, var_size, var_capex: for existing networks

  • para_capex_gamma: \({\gamma}_1, {\gamma}_2, {\gamma}_3, {\gamma}_4\) for CAPEX calculation (annualized from given data on up-front CAPEX, lifetime and discount rate)

  • para_opex_variable: Variable OPEX

  • para_opex_fixed: Fixed OPEX

  • para_decommissioning_cost: decommissioning costs for existing networks

  • para_send_kflow, para_send_kflowDistance, para_receive_kflow, para_receive_kflowDistance, Parameters for energy consumption at receiving and sending node

Variable declarations:

  • var_capex: CAPEX

  • var_opex_variable: Variable OPEX

  • var_opex_fixed: Fixed OPEX

  • Furthermore for each node:

    • var_netw_emissions_pos: positive emissins at node

    • var_inflow: Inflow to node (as a sum of all inflows from other nodes)

    • var_outflow: Outflow from node (as a sum of all outflows toother nodes)

    • var_consumption: Consumption of other carriers (e.g. electricity required for compression of a gas)

Arc Block declaration

Each arc represents a connection between two nodes, and is thus indexed by ( node_from, node_to). For each arc, the following components are defined. Each variable is indexed by the timestep \(t\) (here left out for convenience).

  • Decision Variables:

    • var_size: Size \(S\)

    • var_flow: Flow \(flow\)

    • var_losses: Losses \(loss\)

    • var_capex, var_capex_aux CAPEX: \(CAPEX\)

    • var_opex_variable: Variable \(OPEXvariable\)

    • var_emissions: emissions from transport/losses

    • If consumption at nodes exists for network:

      • var_consumption_send: Consumption at sending node \(Consumption_{ nodeFrom}\)

      • var_consumption_receive: Consumption at receiving node \(Consumption_{nodeTo}\)

  • Constraint definitions

    • Flow losses:

      \[loss = flow * {\mu} * D\]
    • Flow constraints:

      \[S * minTransport \leq flow \leq S\]
    • Consumption at sending and receiving node:

      \[Consumption_{nodeFrom} = flow * k_{1, send} + flow * distance * k_{2, send}\]
      \[Consumption_{nodeTo} = flow * k_{1, receive} + flow * distance * k_{2, receive}\]
    • CAPEX of respective arc. The CAPEX is calculated as follows (for new networks). Note that for existing networks, the CAPEX is zero, but the fixed OPEX is calculated as a fraction of a hypothetical CAPEX based on the existing size.

      \[CAPEX_{arc} = {\gamma}_1 + {\gamma}_2 * S + {\gamma}_3 * distance + {\gamma}_4 * S * distance\]
    • Variable OPEX:

      \[OPEXvariable_{arc} = CAPEX_{arc} * opex_{variable}\]
    • Emissions:

      \[emissions = flow * f_{emissions} + loss * f_{loss2emission}\]

Network constraint declarations This part calculates variables for all respective nodes.

  • CAPEX calculation of the whole network as a sum of CAPEX of all arcs. If bidirectional_network is set to 1 for this network, the capex and fixed opex for an arc is only counted once.

  • OPEX fix, as fraction of total CAPEX

  • OPEX variable as a sum of variable OPEX for each arc

  • Total emissions as the sum of all arc emissions

  • Total inflow and outflow as a sum for each node:

    \[outflow_{node} = \sum_{nodeTo \in sendsto_{node}} flow_{node, nodeTo}\]
    \[inflow_{node} = \sum_{nodeFrom \in receivesFrom_{node}} flow_{nodeFrom, node} - losses_{nodeFrom, node}\]
  • Energy consumption of other carriers at each node.

  • If bidirectional_network is set to 1 for this network only additional constraints are enforced to ensure that at each time step a flow can only be in one direction. For bidirectional_network_precise = 0, only a cut and a cosntraint on the sizes of the two directions of an arc are formulated:

    \[S_{nodeFrom, nodeTo} = S_{nodeTo, nodeFrom}\]
    \[flow_{nodeFrom, nodeTo} + flow_{nodeTo, nodeFrom} \lor S_{nodeTo, nodeFrom}\]

    For bidirectional_network_precise = 1 additional disjunctions are formulated, thus adding binaries and complexity to the model:

    \[flow_{nodeFrom, nodeTo} = 0 \lor flow_{nodeTo, nodeFrom} = 0\]
construct_netw_model(b_netw, data: dict, set_nodes, set_t_full, set_t_clustered)

Constructs a network as model block.

Parameters:
  • b_netw – pyomo network block

  • data (dict) – dict containing model information

  • set_nodes – pyomo set containing all nodes

  • set_t_full – pyomo set containing timesteps

  • set_t_clustered – pyomo set containing clustered timesteps

Returns:

pyomo block with network model

fit_network_performance()

Fits network performance (bounds and coefficients).

scale_model(b_netw, model, config: dict)

Scales network model

Parameters:
  • b_netw – pyomo network block

  • model – pyomo model

  • config (dict) – config dict containing scaling factors

Returns:

pyomo model

write_results_netw_design(h5_group, model_block)

Function to report network design

Parameters:
  • model_block – pyomo network block

  • h5_group – h5 group to write to

write_results_netw_operation(h5_group, model_block)

Function to report network operation

Parameters:
  • model_block – pyomo network block

  • h5_group – h5 group to write to