Stay Ahead, Stay ONMINE

Introduction to Minimum Cost Flow Optimization in Python

Minimum cost flow optimization minimizes the cost of moving flow through a network of nodes and edges. Nodes include sources (supply) and sinks (demand), with different costs and capacity limits. The aim is to find the least costly way to move volume from sources to sinks while adhering to all capacity limitations. Applications Applications of […]

Minimum cost flow optimization minimizes the cost of moving flow through a network of nodes and edges. Nodes include sources (supply) and sinks (demand), with different costs and capacity limits. The aim is to find the least costly way to move volume from sources to sinks while adhering to all capacity limitations.

Applications

Applications of minimum cost flow optimization are vast and varied, spanning multiple industries and sectors. This approach is crucial in logistics and supply chain management, where it is used to minimize transportation costs while ensuring timely delivery of goods. In telecommunications, it helps in optimizing the routing of data through networks to reduce latency and improve bandwidth utilization. The energy sector leverages minimum cost flow optimization to efficiently distribute electricity through power grids, reducing losses and operational costs. Urban planning and infrastructure development also benefit from this optimization technique, as it assists in designing efficient public transportation systems and water distribution networks.

Example

Below is a simple flow optimization example:

The image above illustrates a minimum cost flow optimization problem with six nodes and eight edges. Nodes A and B serve as sources, each with a supply of 50 units, while nodes E and F act as sinks, each with a demand of 40 units. Every edge has a maximum capacity of 25 units, with variable costs indicated in the image. The objective of the optimization is to allocate flow on each edge to move the required units from nodes A and B to nodes E and F, respecting the edge capacities at the lowest possible cost.

Node F can only receive supply from node B. There are two paths: directly or through node D. The direct path has a cost of 2, while the indirect path via D has a combined cost of 3. Thus, 25 units (the maximum edge capacity) are moved directly from B to F. The remaining 15 units are routed via B -D-F to meet the demand.

Currently, 40 out of 50 units have been transferred from node B, leaving a remaining supply of 10 units that can be moved to node E. The available pathways for supplying node E include: A-E and B-E with a cost of 3, A-C-E with a cost of 4, and B-C-E with a cost of 5. Consequently, 25 units are transported from A-E (limited by the edge capacity) and 10 units from B-E (limited by the remaining supply at node B). To meet the demand of 40 units at node E, an additional 5 units are moved via A-C-E, resulting in no flow being allocated to the B-C pathway.

Mathematical formulation

I introduce two mathematical formulations of minimum cost flow optimization:

1. LP (linear program) with continuous variables only

2. MILP (mixed integer linear program) with continuous and discrete variables

I am using following definitions:

Definitions

LP formulation

This formulation only contains decision variables that are continuous, meaning they can have any value as long as all constraints are fulfilled. Decision variables are in this case the flow variables x(u, v) of all edges.

The objective function describes how the costs that are supposed to be minimized are calculated. In this case it is defined as the flow multiplied with the variable cost summed up over all edges:

Constraints are conditions that must be satisfied for the solution to be valid, ensuring that the flow does not exceed capacity limitations.

First, all flows must be non-negative and not exceed to edge capacities:

Flow conservation constraints ensure that the same amount of flow that goes into a node has to come out of the node. These constraints are applied to all nodes that are neither sources nor sinks:

For source and sink nodes the difference of out flow and in flow is smaller or equal the supply of the node:

If v is a source the difference of outflow minus inflow must not exceed the supply s(v). In case v is a sink node we do not allow that more than -s(v) can flow into the node than out of the node (for sinks s(v) is negative).

MILP

Additionally, to the continuous variables of the LP formulation, the MILP formulation also contains discreate variables that can only have specific values. Discrete variables allow to restrict the number of used nodes or edges to certain values. It can also be used to introduce fixed costs for using nodes or edges. In this article I show how to add fixed costs. It is important to note that adding discrete decision variables makes it much more difficult to find an optimal solution, hence this formulation should only be used if a LP formulation is not possible.

The objective function is defined as:

With three terms: variable cost of all edges, fixed cost of all edges, and fixed cost of all nodes.

The maximum flow that can be allocated to an edge depends on the edge’s capacity, the edge selection variable, and the origin node selection variable:

This equation ensures that flow can only be assigned to edges if the edge selection variable and the origin node selection variable are 1.

The flow conservation constraints are equivalent to the LP problem.

Implementation

In this section I explain how to implement a MILP optimization in Python. You can find the code in this repo.

Libraries

To build the flow network, I used NetworkX which is an excellent library (https://networkx.org/) for working with graphs. There are many interesting articles that demonstrate how powerful and easy to use NetworkX is to work with graphs, i.a. customizing NetworkX Graphs, NetworkX: Code Demo for Manipulating Subgraphs, Social Network Analysis with NetworkX: A Gentle Introduction.

One important aspect when building an optimization is to make sure that the input is correctly defined. Even one small error can make the problem infeasible or can lead to an unexpected solution. To avoid this, I used Pydantic to validate the user input and raise any issues at the earliest possible stage. This article gives an easy to understand introduction to Pydantic.

To transform the defined network into a mathematical optimization problem I used PuLP. Which allows to define all variables and constraint in an intuitive way. This library also has the advantage that it can use many different solvers in a simple pug-and-play fashion. This article provides good introduction to this library.

Defining nodes and edges

The code below shows how nodes are defined:

from pydantic import BaseModel, model_validator
from typing import Optional

# node and edge definitions
class Node(BaseModel, frozen=True):
    """
    class of network node with attributes:
    name: str - name of node
    demand: float - demand of node (if node is sink)
    supply: float - supply of node (if node is source)
    capacity: float - maximum flow out of node
    type: str - type of node
    x: float - x-coordinate of node
    y: float - y-coordinate of node
    fixed_cost: float - cost of selecting node
    """
    name: str
    demand: Optional[float] = 0.0
    supply: Optional[float] = 0.0
    capacity: Optional[float] = float('inf')
    type: Optional[str] = None
    x: Optional[float] = 0.0
    y: Optional[float] = 0.0
    fixed_cost: Optional[float] = 0.0

    @model_validator(mode='after')
    def validate(self):
        """
        validate if node definition are correct
        """
        # check that demand is non-negative
        if self.demand < 0 or self.demand == float('inf'): raise ValueError('demand must be non-negative and finite')
        # check that supply is non-negative
        if self.supply < 0: raise ValueError('supply must be non-negative')
        # check that capacity is non-negative
        if self.capacity < 0: raise ValueError('capacity must be non-negative')
        # check that fixed_cost is non-negative
        if self.fixed_cost < 0: raise ValueError('fixed_cost must be non-negative')
        return self

Nodes are defined through the Node class which is inherited from Pydantic’s BaseModel. This enables an automatic validation that ensures that all properties are defined with the correct datatype whenever a new object is created. In this case only the name is a required input, all other properties are optional, if they are not provided the specified default value is assigned to them. By setting the “frozen” parameter to True I made all properties immutable, meaning they cannot be changed after the object has been initialized.

The validate method is executed after the object has been initialized and applies more checks to ensure the provided values are as expected. Specifically it checks that demand, supply, capacity, variable cost and fixed cost are not negative. Furthermore, it also does not allow infinite demand as this would lead to an infeasible optimization problem.

These checks look trivial, however their main benefit is that they will trigger an error at the earliest possible stage when an input is incorrect. Thus, they prevent creating a optimization model that is incorrect. Exploring why a model cannot be solved would be much more time consuming as there are many factors that would need to be analyzed, while such “trivial” input error may not be the first aspect to investigate.

Edges are implemented as follows:

class Edge(BaseModel, frozen=True):
"""
class of edge between two nodes with attributes:
origin: 'Node' - origin node of edge
destination: 'Node' - destination node of edge
capacity: float - maximum flow through edge
variable_cost: float - cost per unit flow through edge
fixed_cost: float - cost of selecting edge
"""
origin: Node
destination: Node
capacity: Optional[float] = float('inf')
variable_cost: Optional[float] = 0.0
fixed_cost: Optional[float] = 0.0

@model_validator(mode='after')
def validate(self):
"""
validate of edge definition is correct
"""
# check that node names are different
if self.origin.name == self.destination.name: raise ValueError('origin and destination names must be different')
# check that capacity is non-negative
if self.capacity < 0: raise ValueError('capacity must be non-negative')
# check that variable_cost is non-negative
if self.variable_cost < 0: raise ValueError('variable_cost must be non-negative')
# check that fixed_cost is non-negative
if self.fixed_cost < 0: raise ValueError('fixed_cost must be non-negative')
return self

The required inputs are an origin node and a destination node object. Additionally, capacity, variable cost and fixed cost can be provided. The default value for capacity is infinity which means if no capacity value is provided it is assumed the edge does not have a capacity limitation. The validation ensures that the provided values are non-negative and that origin node name and the destination node name are different.

Initialization of flowgraph object

To define the flowgraph and optimize the flow I created a new class called FlowGraph that is inherited from NetworkX’s DiGraph class. By doing this I can add my own methods that are specific to the flow optimization and at the same time use all methods DiGraph provides:

from networkx import DiGraph
from pulp import LpProblem, LpVariable, LpMinimize, LpStatus

class FlowGraph(DiGraph):
    """
    class to define and solve minimum cost flow problems
    """
    def __init__(self, nodes=[], edges=[]):
        """
        initialize FlowGraph object
        :param nodes: list of nodes
        :param edges: list of edges
        """
        # initialialize digraph
        super().__init__(None)

        # add nodes and edges
        for node in nodes: self.add_node(node)
        for edge in edges: self.add_edge(edge)


    def add_node(self, node):
        """
        add node to graph
        :param node: Node object
        """
        # check if node is a Node object
        if not isinstance(node, Node): raise ValueError('node must be a Node object')
        # add node to graph
        super().add_node(node.name, demand=node.demand, supply=node.supply, capacity=node.capacity, type=node.type, 
                         fixed_cost=node.fixed_cost, x=node.x, y=node.y)
        
    
    def add_edge(self, edge):    
        """
        add edge to graph
        @param edge: Edge object
        """   
        # check if edge is an Edge object
        if not isinstance(edge, Edge): raise ValueError('edge must be an Edge object')
        # check if nodes exist
        if not edge.origin.name in super().nodes: self.add_node(edge.origin)
        if not edge.destination.name in super().nodes: self.add_node(edge.destination)

        # add edge to graph
        super().add_edge(edge.origin.name, edge.destination.name, capacity=edge.capacity, 
                         variable_cost=edge.variable_cost, fixed_cost=edge.fixed_cost)

FlowGraph is initialized by providing a list of nodes and edges. The first step is to initialize the parent class as an empty graph. Next, nodes and edges are added via the methods add_node and add_edge. These methods first check if the provided element is a Node or Edge object. If this is not the case an error will be raised. This ensures that all elements added to the graph have passed the validation of the previous section. Next, the values of these objects are added to the Digraph object. Note that the Digraph class also uses add_node and add_edge methods to do so. By using the same method name I am overwriting these methods to ensure that whenever a new element is added to the graph it must be added through the FlowGraph methods which validate the object type. Thus, it is not possible to build a graph with any element that has not passed the validation tests.

Initializing the optimization problem

The method below converts the network into an optimization model, solves it, and retrieves the optimized values.

  def min_cost_flow(self, verbose=True):
        """
        run minimum cost flow optimization
        @param verbose: bool - print optimization status (default: True)
        @return: status of optimization
        """
        self.verbose = verbose

        # get maximum flow
        self.max_flow = sum(node['demand'] for _, node in super().nodes.data() if node['demand'] > 0)

        start_time = time.time()
        # create LP problem
        self.prob = LpProblem("FlowGraph.min_cost_flow", LpMinimize)
        # assign decision variables
        self._assign_decision_variables()
        # assign objective function
        self._assign_objective_function()
        # assign constraints
        self._assign_constraints()
        if self.verbose: print(f"Model creation time: {time.time() - start_time:.2f} s")

        start_time = time.time()
        # solve LP problem
        self.prob.solve()
        solve_time = time.time() - start_time

        # get status
        status = LpStatus[self.prob.status]

        if verbose:
            # print optimization status
            if status == 'Optimal':
                # get objective value
                objective = self.prob.objective.value()
                print(f"Optimal solution found: {objective:.2f} in {solve_time:.2f} s")
            else:
                print(f"Optimization status: {status} in {solve_time:.2f} s")
        
        # assign variable values
        self._assign_variable_values(status=='Optimal')

        return status

Pulp’s LpProblem is initialized, the constant LpMinimize defines it as a minimization problem — meaning it is supposed to minimize the value of the objective function. In the following lines all decision variables are initialized, the objective function as well as all constraints are defined. These methods will be explained in the following sections.

Next, the problem is solved, in this step the optimal value of all decision variables is determined. Following the status of the optimization is retrieved. When the status is “Optimal” an optimal solution could be found other statuses are “Infeasible” (it is not possible to fulfill all constraints), “Unbounded” (the objective function can have an arbitrary low values), and “Undefined” meaning the problem definition is not complete. In case no optimal solution was found the problem definition needs to be reviewed.

Finally, the optimized values of all variables are retrieved and assigned to the respective nodes and edges.

Defining decision variables

All decision variables are initialized in the method below:

   def _assign_variable_values(self, opt_found):
        """
        assign decision variable values if optimal solution found, otherwise set to None
        @param opt_found: bool - if optimal solution was found
        """
        # assign edge values        
        for _, _, edge in super().edges.data():
            # initialize values
            edge['flow'] = None
            edge['selected'] = None
            # check if optimal solution found
            if opt_found and edge['flow_var'] is not None:                    
                edge['flow'] = edge['flow_var'].varValue                    

                if edge['selection_var'] is not None: 
                    edge['selected'] = edge['selection_var'].varValue

        # assign node values
        for _, node in super().nodes.data():
            # initialize values
            node['selected'] = None
            if opt_found:                
                # check if node has selection variable
                if node['selection_var'] is not None: 
                    node['selected'] = node['selection_var'].varValue

First it iterates through all edges and assigns continuous decision variables if the edge capacity is greater than 0. Furthermore, if fixed costs of the edge are greater than 0 a binary decision variable is defined as well. Next, it iterates through all nodes and assigns binary decision variables to nodes with fixed costs. The total number of continuous and binary decision variables is counted and printed at the end of the method.

Defining objective

After all decision variables have been initialized the objective function can be defined:

    def _assign_objective_function(self):
        """
        define objective function
        """
        objective = 0
 
        # add edge costs
        for _, _, edge in super().edges.data():
            if edge['selection_var'] is not None: objective += edge['selection_var'] * edge['fixed_cost']
            if edge['flow_var'] is not None: objective += edge['flow_var'] * edge['variable_cost']
        
        # add node costs
        for _, node in super().nodes.data():
            # add node selection costs
            if node['selection_var'] is not None: objective += node['selection_var'] * node['fixed_cost']

        self.prob += objective, 'Objective',

The objective is initialized as 0. Then for each edge fixed costs are added if the edge has a selection variable, and variable costs are added if the edge has a flow variable. For all nodes with selection variables fixed costs are added to the objective as well. At the end of the method the objective is added to the LP object.

Defining constraints

All constraints are defined in the method below:

  def _assign_constraints(self):
        """
        define constraints
        """
        # count of contraints
        constr_count = 0
        # add capacity constraints for edges with fixed costs
        for origin_name, destination_name, edge in super().edges.data():
            # get capacity
            capacity = edge['capacity'] if edge['capacity'] < float('inf') else self.max_flow
            rhs = capacity
            if edge['selection_var'] is not None: rhs *= edge['selection_var']
            self.prob += edge['flow_var'] <= rhs, f"capacity_{origin_name}-{destination_name}",
            constr_count += 1
            
            # get origin node
            origin_node = super().nodes[origin_name]
            # check if origin node has a selection variable
            if origin_node['selection_var'] is not None:
                rhs = capacity * origin_node['selection_var'] 
                self.prob += (edge['flow_var'] <= rhs, f"node_selection_{origin_name}-{destination_name}",)
                constr_count += 1

        total_demand = total_supply = 0
        # add flow conservation constraints
        for node_name, node in super().nodes.data():
            # aggregate in and out flows
            in_flow = 0
            for _, _, edge in super().in_edges(node_name, data=True):
                if edge['flow_var'] is not None: in_flow += edge['flow_var']
            
            out_flow = 0
            for _, _, edge in super().out_edges(node_name, data=True):
                if edge['flow_var'] is not None: out_flow += edge['flow_var']

            # add node capacity contraint
            if node['capacity'] < float('inf'):
                self.prob += out_flow = demand - supply
                rhs = node['demand'] - node['supply']
                self.prob += in_flow - out_flow >= rhs, f"flow_balance_{node_name}",
            constr_count += 1

            # update total demand and supply
            total_demand += node['demand']
            total_supply += node['supply']

        if self.verbose:
            print(f"Constraints: {constr_count}")
            print(f"Total supply: {total_supply}, Total demand: {total_demand}")

First, capacity constraints are defined for each edge. If the edge has a selection variable the capacity is multiplied with this variable. In case there is no capacity limitation (capacity is set to infinity) but there is a selection variable, the selection variable is multiplied with the maximum flow that has been calculated by aggregating the demand of all nodes. An additional constraint is added in case the edge’s origin node has a selection variable. This constraint means that flow can only come out of this node if the selection variable is set to 1.

Following, the flow conservation constraints for all nodes are defined. To do so the total in and outflow of the node is calculated. Getting all in and outgoing edges can easily be done by using the in_edges and out_edges methods of the DiGraph class. If the node has a capacity limitation the maximum outflow will be constraint by that value. For the flow conservation it is necessary to check if the node is either a source or sink node or a transshipment node (demand equals supply). In the first case the difference between inflow and outflow must be greater or equal the difference between demand and supply while in the latter case in and outflow must be equal.

The total number of constraints is counted and printed at the end of the method.

Retrieving optimized values

After running the optimization, the optimized variable values can be retrieved with the following method:

    def _assign_variable_values(self, opt_found):
        """
        assign decision variable values if optimal solution found, otherwise set to None
        @param opt_found: bool - if optimal solution was found
        """
        # assign edge values        
        for _, _, edge in super().edges.data():
            # initialize values
            edge['flow'] = None
            edge['selected'] = None
            # check if optimal solution found
            if opt_found and edge['flow_var'] is not None:                    
                edge['flow'] = edge['flow_var'].varValue                    

                if edge['selection_var'] is not None: 
                    edge['selected'] = edge['selection_var'].varValue

        # assign node values
        for _, node in super().nodes.data():
            # initialize values
            node['selected'] = None
            if opt_found:                
                # check if node has selection variable
                if node['selection_var'] is not None: 
                    node['selected'] = node['selection_var'].varValue 

This method iterates through all edges and nodes, checks if decision variables have been assigned and adds the decision variable value via varValue to the respective edge or node.

Demo

To demonstrate how to apply the flow optimization I created a supply chain network consisting of 2 factories, 4 distribution centers (DC), and 15 markets. All goods produced by the factories have to flow through one distribution center until they can be delivered to the markets.

Supply chain problem

Node properties were defined:

Node definitions

Ranges mean that uniformly distributed random numbers were generated to assign these properties. Since Factories and DCs have fixed costs the optimization also needs to decide which of these entities should be selected.

Edges are generated between all Factories and DCs, as well as all DCs and Markets. The variable cost of edges is calculated as the Euclidian distance between origin and destination node. Capacities of edges from Factories to DCs are set to 350 while from DCs to Markets are set to 100.

The code below shows how the network is defined and how the optimization is run:

# Define nodes
factories = [Node(name=f'Factory {i}', supply=700, type='Factory', fixed_cost=100, x=random.uniform(0, 2),
                  y=random.uniform(0, 1)) for i in range(2)]
dcs = [Node(name=f'DC {i}', fixed_cost=25, capacity=500, type='DC', x=random.uniform(0, 2), 
            y=random.uniform(0, 1)) for i in range(4)]
markets = [Node(name=f'Market {i}', demand=random.randint(1, 100), type='Market', x=random.uniform(0, 2), 
                y=random.uniform(0, 1)) for i in range(15)]

# Define edges
edges = []
# Factories to DCs
for factory in factories:
    for dc in dcs:
        distance = ((factory.x - dc.x)**2 + (factory.y - dc.y)**2)**0.5
        edges.append(Edge(origin=factory, destination=dc, capacity=350, variable_cost=distance))

# DCs to Markets
for dc in dcs:
    for market in markets:
        distance = ((dc.x - market.x)**2 + (dc.y - market.y)**2)**0.5
        edges.append(Edge(origin=dc, destination=market, capacity=100, variable_cost=distance))

# Create FlowGraph
G = FlowGraph(edges=edges)

G.min_cost_flow()

The output of flow optimization is as follows:

Variable types: 68 continuous, 6 binary
Constraints: 161
Total supply: 1400.0, Total demand: 909.0
Model creation time: 0.00 s
Optimal solution found: 1334.88 in 0.23 s

The problem consists of 68 continuous variables which are the edges’ flow variables and 6 binary decision variables which are the selection variables of the Factories and DCs. There are 161 constraints in total which consist of edge and node capacity constraints, node selection constraints (edges can only have flow if the origin node is selected), and flow conservation constraints. The next line shows that the total supply is 1400 which is higher than the total demand of 909 (if the demand was higher than the supply the problem would be infeasible). Since this is a small optimization problem, the time to define the optimization model was less than 0.01 seconds. The last line shows that an optimal solution with an objective value of 1335 could be found in 0.23 seconds.

Additionally, to the code I described in this post I also added two methods that visualize the optimized solution. The code of these methods can also be found in the repo.

Flow graph

All nodes are located by their respective x and y coordinates. The node and edge size is relative to the total volume that is flowing through. The edge color refers to its utilization (flow over capacity). Dashed lines show edges without flow allocation.

In the optimal solution both Factories were selected which is inevitable as the maximum supply of one Factory is 700 and the total demand is 909. However, only 3 of the 4 DCs are used (DC 0 has not been selected).

In general the plot shows the Factories are supplying the nearest DCs and DCs the nearest Markets. However, there are a few exceptions to this observation: Factory 0 also supplies DC 3 although Factory 1 is nearer. This is due to the capacity constraints of the edges which only allow to move at most 350 units per edge. However, the closest Markets to DC 3 have a slightly higher demand, hence Factory 0 is moving additional units to DC 3 to meet that demand. Although Market 9 is closest to DC 3 it is supplied by DC 2. This is because DC 3 would require an additional supply from Factory 0 to supply this market and since the total distance from Factory 0 over DC 3 is longer than the distance from Factory 0 through DC 2, Market 9 is supplied via the latter route.

Another way to visualize the results is via a Sankey diagram which focuses on visualizing the flows of the edges:

Sankey flow diagram

The colors represent the edges’ utilizations with lowest utilizations in green changing to yellow and red for the highest utilizations. This diagram shows very well how much flow goes through each node and edge. It highlights the flow from Factory 0 to DC 3 and also that Market 13 is supplied by DC 2 and DC 1.

Summary

Minimum cost flow optimizations can be a very helpful tool in many domains like logistics, transportation, telecommunication, energy sector and many more. To apply this optimization it is important to translate a physical system into a mathematical graph consisting of nodes and edges. This should be done in a way to have as few discrete (e.g. binary) decision variables as necessary as those make it significantly more difficult to find an optimal solution. By combining Python’s NetworkX, Pulp and Pydantic libraries I built an flow optimization class that is intuitive to initialize and at the same time follows a generalized formulation which allows to apply it in many different use cases. Graph and flow diagrams are very helpful to understand the solution found by the optimizer.

If not otherwise stated all images were created by the author.

Shape
Shape
Stay Ahead

Explore More Insights

Stay ahead with more perspectives on cutting-edge power, infrastructure, energy,  bitcoin and AI solutions. Explore these articles to uncover strategies and insights shaping the future of industries.

Shape

Dell gives AI agents a broader view of enterprise data

The Unified Semantic Layer establishes a common business vocabulary across structured and unstructured data. Dell also plans to incorporate Nvidia’s open-source Auto-Ontology technology, which can help construct knowledge graphs from enterprise data. The Enterprise Knowledge Graph goes a step further by mapping relationships between data, including metadata, lineage, query history

Read More »

HPE supercharges ProLiant servers with AMD’s EPYC 9006 processors

One important attribute is that HPE iLO 8 delivers auto-SED (Self-Encrypting Drive) server capabilities, automatically protecting data at rest from the moment the server is first powered on, according to Aaron Lamond, product marketing manager, HPE Compute. “No external key manager, additional configuration, or manual activation is required. Encryption stops

Read More »

LNG market tightens into winter as Europe pulls US cargoes, China reopens contract talks

Global LNG markets are entering winter with limited supply cushion, even as a growing carrier fleet and shorter Atlantic voyages keep shipping rates subdued. Meanwhile China is showing signs of returning to long-term US contracting. New liquefaction capacity and higher utilization outside Qatar and the UAE have offset about 60% of Middle East LNG supply losses since March, according to a recent analysis from Morgan Stanley. Weaker demand outside Europe and European storage withdrawals have helped offset the remaining supply loss, but left inventories unusually low heading into winter. EU storage was about 70% full in late September, compared with 82% a year earlier and a 10-year average of 87%. Morgan Stanley raised its fourth-quarter JKM forecast to $27.50/MMbtu from $25/MMbtu, citing a slower Qatari restart and continued winter upside risk. Europe is drawing more flexible US supply. About 57% of US LNG exports were headed to Europe in September, up from 53% in August, while US feedgas rose about 6% month over month as Freeport recovered from an outage. Strong European demand is supporting vessel demand, but shorter US-Europe voyages and rapid fleet growth are more than offsetting that pressure. Atlantic spot rates for modern two-stroke LNG carriers stood at about $25,750/day on Oct. 6, while Pacific rates were about $39,000/day, according to Spark Commodities data. About 55 new LNG carriers were delivered in the first 7 months of 2026, with more expected by yearend. Morgan Stanley similarly noted that Asia LNG carrier rates had fallen about 80% from early-March highs and returned near pre-conflict levels, although route costs remain above levels immediately before the conflict. Meantime, the investment bank expects more than 30 million tpy of non-Middle East capacity to start by end-2027, before additional volumes from Qatar’s North Field expansion. China contracting returns China is adding another

Read More »

EIA: US crude oil inventories down 3.2 million bbl

US crude oil inventories for the week ended Oct. 2, excluding the Strategic Petroleum Reserve, decreased by 3.2 million bbl from the previous week, according to data from the US Energy Information Administration (EIA). At 424.1 million bbl, US crude oil inventories are 1% above the 5-year average for this time of year, the EIA report indicated. Gasoline inventories increased 0.4 million bbl, 6% below the 5-year average. Propane-propylene inventories decreased 1.8 million bbl, 18% above the 5-year average. Total commercial petroleum inventories decreased by 6.9 million bbl for the week. Distillate inventories remained unchanged, 12% below the 5-year average. US crude oil refinery inputs averaged 16.5 million b/d for the week ended Oct. 2, which was 223,000 b/d more than the previous week’s average. Refineries operated at 92.7% of capacity. Gasoline output averaged 9.3 million b/d, and distillate production increased to 5.3 million b/d. Crude oil imports increased 1.1 million b/d to 6.8 million b/d. The 4-week average of 6.4 million b/d is 4.3% above the year-ago level. Gasoline imports averaged 512,000 b/d; distillate imports averaged 118,000 b/d. Over the past four weeks, total product supplied averaged 21.1 million b/d, up 0.7% year over year. The 4-week average for gasoline product supplied dereased 0.3% year over year to 8.8 million b/d, while the 4-week average for distillate product supplied decreased 1.6% to 3.8 million b/d. The 4-week average for jet fuel product supplied increased 6.0% year over year.

Read More »

Chevron restructures Bakken midstream agreements, transfers Hess Midstream stake

The restructuring follows Chevron’s acquisition of Hess Corp. in July 2025. Chevron inherited Hess Corp.’s 37.8% interest in Hess Midstream, which provides midstream services to Chevron’s Bakken operations. Hess Midstream subsequently adjusted its outlook after Chevron reduced its Bakken drilling program to 3 rigs from 4 in late 2025. The lower activity led Hess Midstream to suspend its planned Capa gas plant project and lower its throughput and capital-spending expectations. Chevron is now expected to reduce its Bakken drilling program to 2 rigs in December, with Hess Midstream’s minimum revenue commitments for 2027-29 based on the 2-rig program, Hess noted. Bakken agreements Hess Midstream and Chevron will reduce the tariff rates Chevron pays for crude oil and natural gas gathering and processing services in the Bakken for 2027-33 and extend the agreements through 2045. Bakken agreements currently structured on a cost-of-service basis will convert to fixed-fee arrangements with inflation escalators. The revised agreements will include a minimum revenue commitment equal to 80% of Hess Midstream’s expected Bakken revenues attributable to Chevron through 2033. The minimum revenue commitment will be established 3 years in advance and, once established for a given year, can only increase based on updated annual development plans provided by Chevron. Minimum commitments for 2027-29 have been established on the basis of a 2-rig program, Hess Midstream said in a separate release. Hess Midstream said the revised commercial arrangements are expected to support Chevron’s investment in the Bakken. Chevron expects to sustain Bakken production through continued technology deployment and operational improvements drawn from its global shale and tight-oil portfolio. Hess Midstream expects Bakken throughput volumes to decline about 5% in 2027 as a result of reduced Chevron activity and then generally plateau beginning in 2028. DJ Basin assets Hess Midstream will acquire Chevron’s crude oil and natural gas

Read More »

DNV: Energy-importing countries scaling clean energy 3x faster than exporters

OGJ: Energy security is becoming a major driver of the energy transition. The DNV outlook found that energy-importing countries are scaling clean energy three times faster than energy-exporting countries. From the perspective of an oil and gas operator, what is the most important implication of that divergence? Alvik: I think it’s important to realize that the customers of the oil and gas business are, longer term, trying to avoid being dependent on that commodity. If you’re exporting oil like the US or Norway or Canada or Brazil or Saudi, your key strategy is to meet the shortfall of Middle East oil and gas as much as possible. But for the importer, both the vulnerability of the supply chains and the price hikes, as well as the attacks on the infrastructure, are demonstrating how vulnerable you are when you are importing any sort of critical commodity to your country, like energy is. And on top of that, you have the industry. If you have a large renewable industry, you would like that to grow. China is the best example. If you have a large oil and gas industry, you would like [that] to grow. The US is a major example of that. So, there are diverging interests leading to diverging results between importers and exporters, and this is clearer than ever. OGJ: Definitely. The Strait of Hormuz is a big part of what’s put energy security back at the center of the conversation. Do you think the current disruption represents a temporary shock to energy markets, or could it fundamentally change how governments and companies think about their exposure to imported oil and gas? Alvik: I think it could fundamentally change. The same way as the Russian attack on Ukraine dramatically changed how Germany, or Poland, or other countries were looking

Read More »

Cenovus to build oil sands business via Athabasca acquisition

“These are long-life assets located in an area where Cenovus already has a deep operating experience and strong understanding of the resource,” McKenzie said on a conference call with analysts. “They also represent one of the only remaining large-scale opportunities to add meaningful thermal reserves, resource and future development inventory within the core of the oil sands.” Among Cenovus’ growth plans is accelerating production from Athabasca’s Corner project northwest of Christina Lake by consolidating two planned expansion phases. Doing so would let Corner’s output grow to 40,000 boe/d by 2032, 3 years faster than today’s forecast. Also in the cards are efficiency projects at Athabasca’s Leismer assets that would grow production by half to about 60,000 boe/d by 2032. Michael Berger, a senior analyst at Enverus Intelligence Research, said buying Athabasca “refills Cenovus’ growth pipeline” as it relates to future production growth. The deal, he added, also “represents an escalation in oil sands deal valuations” that reflects the energy sector’s changing global dynamics. “The higher price paid by Cenovus compared to historical deals reflects a rerating of Canadian oil sands producers higher as the industry’s critical position in providing long-term oil resource in a resource-constrained world grows sharper,” Berger wrote in a commentary analyzing the acquisition plan. “While U.S. plays offer up to a decade of core inventory, the oil sands hold multiple decades. Additionally, scarcity always demands a premium and logical large-scale oil sands acquisition targets have been significantly drawn down.” The planned transaction is expected to be roughly 70% funded by cash and 30% by Cenovus shares and should close by the end of this year. It also will consolidate ownership of Duvernay Energy Corp., an oil-weighted joint venture the two companies created nearly 3 years ago that today operates more than 170 locations on roughly 90,000 net

Read More »

Energy Transfer expands Delaware basin footprint with $2.625 billion deal

@import url(‘https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap’); .ebm-page__main h1, .ebm-page__main h2, .ebm-page__main h3, .ebm-page__main h4, .ebm-page__main h5, .ebm-page__main h6 { font-family: Inter; } body { line-height: 150%; letter-spacing: 0.025em; } button, .ebm-button-wrapper { font-family: Inter; } .label-style { text-transform: uppercase; color: var(–color-grey); font-weight: 600; font-size: 0.75rem; } .caption-style { font-size: 0.75rem; color: color-mix(in srgb, currentColor 60%, transparent); } #onetrust-pc-sdk [id*=btn-handler], #onetrust-pc-sdk [class*=btn-handler] { background-color: #c19a06 !important; border-color: #c19a06 !important; } #onetrust-policy a, #onetrust-pc-sdk a, #ot-pc-content a { color: #c19a06 !important; } #onetrust-consent-sdk #onetrust-pc-sdk .ot-active-menu { border-color: #c19a06 !important; } #onetrust-consent-sdk #onetrust-accept-btn-handler, #onetrust-banner-sdk #onetrust-reject-all-handler, #onetrust-consent-sdk #onetrust-pc-btn-handler.cookie-setting-link { background-color: #c19a06 !important; border-color: #c19a06 !important; } #onetrust-consent-sdk .onetrust-pc-btn-handler { color: #c19a06 !important; border-color: #c19a06 !important; } Energy Transfer LP has agreed to acquire Vaquero Midstream LLC in a $2.625-billion bolt-on deal to add natural gas gathering and processing assets in the southern Delaware basin of the Texas Permian.   Vaquero holds a 300-mile pipeline network that serves operators across the basin, including in Loving, Reeves, Ward, and Winkler Counties, Tex., and operates the Caymus processing complex in Coyanosa, Pecos County, Tex., near Waha, which includes three processing trains with 675 MMcfd capacity. The company owns acreage to support construction of two additional trains that could increase total processing capacity at the site to about 1.2 bcfd. <!–> –> <!–> April 29, 2025 ]–> <!–> The Vaquero assets are interconnected with Energy Transfer’s downstream natural gas and NGL infrastructure, which Energy Transfer said could generate incremental revenue opportunities through pipeline transportation, fractionation, terminalling, and export services. Vaquero is supported by long-term, fee-based contracts with average remaining life of 10 years, and 100,000 dedicated acres. Consideration for the deal, which is expected to close in this year’s fourth quarter subject to customary conditions, consists of $1.95 billion in cash and about 33.3 million newly issued Energy Transfer common units. ]–>

Read More »

Brookfield’s AREP Deal Extends the AI Infrastructure Stack to Powered Land

The transaction goes beyond Brookfield investing in another portfolio of buildings. It is investing in a developer whose principal product increasingly begins before the building, with land, entitlements, substations, transmission access and utility capacity. PowerHouse Has Become a Gigawatt-Scale Development Platform PowerHouse was founded with a strong Northern Virginia orientation, but its development map now stretches well beyond Data Center Alley as its current portfolio includes projects in Virginia, Texas, Pennsylvania, North Carolina, Nevada, Indiana, Illinois and Kentucky. The company lists 515 MW across its Northern VA Ashburn properties, another 900 MW at its PH 95 development in Spotsylvania, 1.35 GW in Carlisle, Pennsylvania, 1.8 GW at Joliet, Illinois, and substantial campuses across multiple Texas and Indiana locations. The various projects do a good job of illustrating how the definition of a hyperscale development site is changing. At PowerHouse Arcola in Loudoun County, Virginia, PowerHouse announced a long-term hyperscale lease earlier this year. The 37-acre campus includes two planned data center buildings totaling approximately 615,000 square feet and is designed for up to 120 MW of utility capacity. PowerHouse emphasizes not only the buildings but the campus’s on-site substation, fiber access, power security and support for high-density GPU and liquid-cooled deployments. In Texas, it might be that everything really is bigger, and PowerHouse’s Grand Prairie development covers approximately 810 acres and 8.5 million developable square feet. Its project page cites maximum utility power of 1.8 GW and a development schedule extending through 2029 and beyond. The Texas development plans also include a proposed Circle T campus in Westlake outside Fort Worth, which calls for as many as four roughly 300,000-square-foot facilities totaling approximately 300 MW. According to reporting on local filings, PowerHouse has funded a 350-MW Oncor substation intended to serve the campus and the town’s pump station. The company’s development in

Read More »

AI Is Turning Energy Storage Into Active Power Infrastructure

AI Turns the Power Problem Into a Transient Problem At the heart of the issue is the changing behavior of the IT load. In a conventional data center, DeLattre said, large numbers of independent loads create a relatively predictable electrical profile. AI clusters introduce much greater synchronization. As GPUs begin processing a common workload, large numbers of accelerators can increase their power consumption simultaneously. Instead of asking the electrical infrastructure to serve a relatively smooth load, the facility can experience fast power pulses moving through the system. Hybrid supercapacitors are intended to act as a buffer between that dynamic compute load and the infrastructure supplying it. During an upward transient, storage provides some of the incremental power demanded by the IT load. When demand falls, the storage system recharges. The objective is not to create additional energy. It is to keep every upstream component — from the UPS to generators and ultimately the utility connection — from having to respond directly to every rapid change taking place inside the AI cluster. From the perspective of the upstream power source, DeLattre said, the goal is to make a highly dynamic AI load appear significantly smoother. That distinction between energy and power is central to Musashi’s argument for hybrid supercapacitors. A conventional supercapacitor, also known as an electric double-layer capacitor, can deliver very high power almost instantly but stores relatively little energy. A lithium-ion battery can store considerably more energy, but DeLattre argues that it is less suited to being aggressively charged and discharged tens or hundreds of thousands of times. Musashi’s hybrid technology uses a capacitor architecture with a lithium-doped graphite electrode intended to increase energy density while preserving the fast response and high cycling capability associated with capacitors. DeLattre reduces the distinction to a simple formulation. “Batteries are very good

Read More »

AI Infrastructure’s Next Phase: Capital, Power and the Right to Build

Capital Is Becoming Infrastructure Samsung’s $1 billion commitment to Helix Digital Infrastructure offered one of the clearest examples yet of how the capital structure surrounding AI data centers is changing. Helix was formed by KKR as an AI infrastructure platform with more than $10 billion already committed by founding investors including KKR, the Kuwait Investment Authority, NVIDIA and Vistra. Samsung’s new commitment pushes that capital base still higher. But the composition of the partnership may be more significant than another billion dollars being added to the AI infrastructure ledger. Helix is intended to invest across hyperscale data centers, power generation and transmission, fiber and other connectivity infrastructure. Samsung, meanwhile, brings capabilities extending across advanced technology, construction, energy storage and cooling. This is not simply capital chasing data center returns. It increasingly resembles an attempt to assemble the data center, energy and technology supply chain inside a single investment ecosystem. That distinction is important, because one of the defining problems of the current buildout is that capital by itself does not produce capacity. Billions of dollars can be committed long before transformers arrive, transmission is constructed, generation is secured or a campus is commissioned. The increasingly valuable infrastructure platform is therefore the one capable of controlling more of those dependencies. Lambda demonstrated another side of that evolution last week with the closing of a $1.008 billion delayed-draw term loan supporting three committed customer deployments across multiple data centers. The financing received investment-grade ratings from Morningstar DBRS and Moody’s and carries a 6.78% fixed interest rate. More importantly, it is secured by both the GPU infrastructure being financed and contracted cash flows from two investment-grade customers. Capital is drawn as infrastructure reaches commissioning milestones rather than simply being handed to Lambda upfront. That begins to make AI compute look less like speculative

Read More »

Micro data center company rolls out stackable data center for edge and AI

Stack runs on Zella Sense, a monitoring, control, and automation layer built into every Zella DC cabinet. It tracks power, cooling, servers, and suspicious activity, while monitoring things like temperature, humidity, smoke, motion, water, and doors through sensors. The system runs over SNMP, Modbus, and a full API, with email alerting and local, LDAP, RADIUS, or TACACS+ authentication. That means an edge location can be remotely monitored without requiring local staff. It also comes with access control and fire protection. Zella Stack is an indoor-only offering. Zella DC sells Zella Outback as its standalone, ruggedized outdoor micro data center, and the company says an outdoor version of Stack is planned for the second half of 2027.

Read More »

Data Center Jobs: Engineering, Construction, Commissioning, Sales, Field Service and Facility Tech Jobs Available in Major Data Center Hotspots

Each month Data Center Frontier, in partnership with Pkaza, posts some of the hottest data center career opportunities in the market. Here’s a look at some of the latest data center jobs posted on the Data Center Frontier jobs board, powered by Pkaza Critical Facilities Recruiting. Looking for Data Center Candidates? Check out Pkaza’s Active Candidate / Featured Candidate Hotlist  Lead Mechanical Engineer – Data Center DesignNew York, NY/Remote This position is also available in: Denver, CO; Indianapolis, IN; Cedar Rapids, IA; Austin, TX; White Plains, NY; Dallas, TX; Richmond, VA; Ashburn, VA; Charlotte, NC; Atlanta, GA; Phoenix, AZ; Salt Lake City, UT; Kansas City, MO; Chicago, IL; Los Angeles, CA or San Jose, CA. Our client is a leading engineering design and commissioning company that is a subject matter expert in the data center space. They will provide design coordination and construction administration, consulting and management support for the data center / mission critical facilities space with the mindset to provide reliability, energy efficiency, and sustainable design expertise when providing these consulting services for enterprise, colocation and hyperscale companies. This career-growth minded opportunity offers exciting projects with leading-edge technology and innovation as well as competitive salaries and benefits. Electrical Commissioning Agent – Data Centers Austin, TX (limited travel) Non-Traveling CxA positions available in: Indianapolis, IN; Cedar Rapids, IA; Phoenix, AZ and Columbus, OH. Traveling CxA based near any major airport, otherwise traveling to: New York, NY; White Plains, NY; Dallas, TX; Richmond, VA; Montvale, NJ; Charlotte, NC; Salt Lake City, UT; Kansas City, MO; Chesterton, IN or Chicago, IL. ***Also looking for a Lead EE and ME CxA Agents and CxA PMs. *** This opportunity is with a leading EPC company of data center design / build / commissioning solutions. This company provides a complete life cycle of solutions that are custom-fit

Read More »

Startup doxx.net hands the network controls to AI

“The whole thing is run completely by AI, so behind the scenes, I mean, it’s a network with 31 locations around the world, and internally there’s a mesh network, and I can’t, as a human being, manage all of this by myself,” Lyon said. Lyon said the team modeled every site, down to the wire and the optic, in a virtual model before building. An infrastructure management system running the company’s own AI on its own hardware then ordered the installation. It orchestrated shipping and delivery through data center APIs. Human technicians performed the remote smart hands installations. The company also built tools for agents to work with users and with the network. An agent gateway gives an AI agent an identity in the doxx.net chat app. The user pastes a credential into the agent. The agent obtains its certificate and appears in the user’s chat. Users can create group chats with several agents. In one example, Lyon said one agent runs BGP while others handle other tasks.

Read More »

Microsoft will invest $80B in AI data centers in fiscal 2025

And Microsoft isn’t the only one that is ramping up its investments into AI-enabled data centers. Rival cloud service providers are all investing in either upgrading or opening new data centers to capture a larger chunk of business from developers and users of large language models (LLMs).  In a report published in October 2024, Bloomberg Intelligence estimated that demand for generative AI would push Microsoft, AWS, Google, Oracle, Meta, and Apple would between them devote $200 billion to capex in 2025, up from $110 billion in 2023. Microsoft is one of the biggest spenders, followed closely by Google and AWS, Bloomberg Intelligence said. Its estimate of Microsoft’s capital spending on AI, at $62.4 billion for calendar 2025, is lower than Smith’s claim that the company will invest $80 billion in the fiscal year to June 30, 2025. Both figures, though, are way higher than Microsoft’s 2020 capital expenditure of “just” $17.6 billion. The majority of the increased spending is tied to cloud services and the expansion of AI infrastructure needed to provide compute capacity for OpenAI workloads. Separately, last October Amazon CEO Andy Jassy said his company planned total capex spend of $75 billion in 2024 and even more in 2025, with much of it going to AWS, its cloud computing division.

Read More »

John Deere unveils more autonomous farm machines to address skill labor shortage

Join our daily and weekly newsletters for the latest updates and exclusive content on industry-leading AI coverage. Learn More Self-driving tractors might be the path to self-driving cars. John Deere has revealed a new line of autonomous machines and tech across agriculture, construction and commercial landscaping. The Moline, Illinois-based John Deere has been in business for 187 years, yet it’s been a regular as a non-tech company showing off technology at the big tech trade show in Las Vegas and is back at CES 2025 with more autonomous tractors and other vehicles. This is not something we usually cover, but John Deere has a lot of data that is interesting in the big picture of tech. The message from the company is that there aren’t enough skilled farm laborers to do the work that its customers need. It’s been a challenge for most of the last two decades, said Jahmy Hindman, CTO at John Deere, in a briefing. Much of the tech will come this fall and after that. He noted that the average farmer in the U.S. is over 58 and works 12 to 18 hours a day to grow food for us. And he said the American Farm Bureau Federation estimates there are roughly 2.4 million farm jobs that need to be filled annually; and the agricultural work force continues to shrink. (This is my hint to the anti-immigration crowd). John Deere’s autonomous 9RX Tractor. Farmers can oversee it using an app. While each of these industries experiences their own set of challenges, a commonality across all is skilled labor availability. In construction, about 80% percent of contractors struggle to find skilled labor. And in commercial landscaping, 86% of landscaping business owners can’t find labor to fill open positions, he said. “They have to figure out how to do

Read More »

2025 playbook for enterprise AI success, from agents to evals

Join our daily and weekly newsletters for the latest updates and exclusive content on industry-leading AI coverage. Learn More 2025 is poised to be a pivotal year for enterprise AI. The past year has seen rapid innovation, and this year will see the same. This has made it more critical than ever to revisit your AI strategy to stay competitive and create value for your customers. From scaling AI agents to optimizing costs, here are the five critical areas enterprises should prioritize for their AI strategy this year. 1. Agents: the next generation of automation AI agents are no longer theoretical. In 2025, they’re indispensable tools for enterprises looking to streamline operations and enhance customer interactions. Unlike traditional software, agents powered by large language models (LLMs) can make nuanced decisions, navigate complex multi-step tasks, and integrate seamlessly with tools and APIs. At the start of 2024, agents were not ready for prime time, making frustrating mistakes like hallucinating URLs. They started getting better as frontier large language models themselves improved. “Let me put it this way,” said Sam Witteveen, cofounder of Red Dragon, a company that develops agents for companies, and that recently reviewed the 48 agents it built last year. “Interestingly, the ones that we built at the start of the year, a lot of those worked way better at the end of the year just because the models got better.” Witteveen shared this in the video podcast we filmed to discuss these five big trends in detail. Models are getting better and hallucinating less, and they’re also being trained to do agentic tasks. Another feature that the model providers are researching is a way to use the LLM as a judge, and as models get cheaper (something we’ll cover below), companies can use three or more models to

Read More »

OpenAI’s red teaming innovations define new essentials for security leaders in the AI era

Join our daily and weekly newsletters for the latest updates and exclusive content on industry-leading AI coverage. Learn More OpenAI has taken a more aggressive approach to red teaming than its AI competitors, demonstrating its security teams’ advanced capabilities in two areas: multi-step reinforcement and external red teaming. OpenAI recently released two papers that set a new competitive standard for improving the quality, reliability and safety of AI models in these two techniques and more. The first paper, “OpenAI’s Approach to External Red Teaming for AI Models and Systems,” reports that specialized teams outside the company have proven effective in uncovering vulnerabilities that might otherwise have made it into a released model because in-house testing techniques may have missed them. In the second paper, “Diverse and Effective Red Teaming with Auto-Generated Rewards and Multi-Step Reinforcement Learning,” OpenAI introduces an automated framework that relies on iterative reinforcement learning to generate a broad spectrum of novel, wide-ranging attacks. Going all-in on red teaming pays practical, competitive dividends It’s encouraging to see competitive intensity in red teaming growing among AI companies. When Anthropic released its AI red team guidelines in June of last year, it joined AI providers including Google, Microsoft, Nvidia, OpenAI, and even the U.S.’s National Institute of Standards and Technology (NIST), which all had released red teaming frameworks. Investing heavily in red teaming yields tangible benefits for security leaders in any organization. OpenAI’s paper on external red teaming provides a detailed analysis of how the company strives to create specialized external teams that include cybersecurity and subject matter experts. The goal is to see if knowledgeable external teams can defeat models’ security perimeters and find gaps in their security, biases and controls that prompt-based testing couldn’t find. What makes OpenAI’s recent papers noteworthy is how well they define using human-in-the-middle

Read More »