©GoldSim Technology Group LLC., 2012
Network Flows and Linear ProgrammingThe Mathematical Madness behind the Magic
GoldSim Technology Group
©GoldSim Technology Group LLC., 2012
Objective of the Flow Module
Given a system of discrete locations connected by conduits of flowing material…
…determine the “optimal” flow of material through that network.
©GoldSim Technology Group LLC., 2012
©GoldSim Technology Group LLC., 2012
©GoldSim Technology Group LLC., 2012
©GoldSim Technology Group LLC., 2012
©GoldSim Technology Group LLC., 2012
Flow Solver GoldSim 10.5: Solve using iteration
©GoldSim Technology Group LLC., 2012
Benefits
Optimal allocation of material Mass conservation Integrates handling of flow and transport Built-in storage functions Integrated handling of priorities and costs Influence lines represent flows
©GoldSim Technology Group LLC., 2012
What do we mean by “Optimal”?
Meaning 1: Maximal Profit (e.g., commodity distribution)– If the network is controlled by a single operator selling to multiple customers,
then the goal is to maximize profit.– Example: Natural gas distributor (PSE)
Meaning 2: Prioritized Flow (e.g., water distribution)– In this case water is divided up based on various users’ priorities:
Priority 1 users get first dibs on water until all their demands are met… …and so on until the lowest priority (farmers) get what’s left over.
The prioritized flow method uses the same underlying functions as maximal profit
©GoldSim Technology Group LLC., 2012
Flowing “Media”
The quantity of liquids and/or solids that flow from one discrete location to another.
Examples: water, CO2, rocks, sediment in water.
Assume incompressible and volume is additive, taking porosity of any solid media into account.– For example, 1 gallon of water dumped into a tank containing 1
gallon of sediment whose porosity is 0.3 would consume a total volume of 1.7 gallons (1 gal of Water + (1 – 0.3)*1 gal of Sediment).
©GoldSim Technology Group LLC., 2012
Cells (Any Flow Network Elements)
Model elements that produce, consume, store, or route fluid.
Examples:– Pump– Evaporation– Detention pond– A city– Stockpile
Source Router Store Sink User_Spec_Media
©GoldSim Technology Group LLC., 2012
Flows (Influence Lines)
Flow links transport fluid from one cell to another.
We denote the value of a flow with Units of media volume (or mass) per unit time
(e.g., gal/day, kg/sec) Examples:
– A connection from one stretch of river (a reach) to another.
– A pipe leading from a lake to a farm– Deliveries to a customer
Flow,
©GoldSim Technology Group LLC., 2012
Flow Capacity and Costs
In most cases, a flux has a maximum capacity , so we have constraints of the form:
Sometimes it costs money to transport fluid along a particular flux.– This affects the net profit.
0≤𝑞1≤𝑞𝑚𝑎𝑥
©GoldSim Technology Group LLC., 2012
Source Cells
A source cell feeds fluid into the system.
Source cells have infinite supply, but their outflow rate(s) may be limited.
Examples:– Rainfall in a particular geographic area– CO2 from a power plant– Sediments from erosion
©GoldSim Technology Group LLC., 2012
Sink Cells
A sink cell removes fluid from the system.
The capacity of sink to absorb fluid is infinite, but the inflow rate may be limited.
Examples:– Evaporation– Outflow from a river (model boundary)– Consumers
©GoldSim Technology Group LLC., 2012
Zero-Volume Cells (Routers)
Fixed-volume cells have no ability to store fluid, so their net inflow rate must match their net outflow rate:
In other words, they must have flow balance.
In this example, the router would impose the constraint:.
Specified media cells are old-style cells that are used to upgrade old CT models.
𝑞1
𝑞2 𝑞3
©GoldSim Technology Group LLC., 2012
User-Specified Cells
Cells found in current GoldSim version (CT module)
Distinct from Routers, which have zero volume Implications on CT models (need volume for
concentration to make sense)
©GoldSim Technology Group LLC., 2012
Dynamic Volume Cells (Stores)
The rate of change of fluid volume in that cell is equal to the sum of all inflows minus the sum of outflows:
If a dynamic cell is empty, outflow must be <= inflow:
(nondecreasing volume)
If the cell is full, inflow <= outflow:
(nonincreasing volume)
©GoldSim Technology Group LLC., 2012
Store Cells Attributes
©GoldSim Technology Group LLC., 2012
Demand Priorities and Revenues Some cells (cities, farms) will pay for water.
– This counts as revenue in the operator’s profit function. Some users have priorities (water rights)
– Priorities converted to costs in the solver
For each flux , its net benefit is: = (revenue due to ) – (cost of ).
©GoldSim Technology Group LLC., 2012
Simple Example…