210 likes | 336 Views
Network Flows and Linear Programming The Mathematical Madness behind the Magic. GoldSim Technology Group. 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 .
E N D
Network Flows and Linear ProgrammingThe Mathematical Madness behind the Magic GoldSim Technology Group
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 10.5: Solve using iteration Flow Solver
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
What do we mean by “Optimal”? • Meaning 1: Maximal Profit (e.g., commodity distribution) • If the network is controlled by a single operatorselling 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
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 incompressibleand 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).
Cells (Any Flow Network Elements) • Model elements that produce, consume, store, or route fluid. • Examples: • Pump • Evaporation • Detention pond • A city • Stockpile
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,
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.
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
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
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.
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)
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)
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 ).