This step computes water inflows to and outflows from every node and link in the system for a given month. This includes calculating withdrawals from supply sources to meet demand. A linear program (LP) is used to maximize satisfaction of requirements for demand sites, user-specified instream flows, and hydropower generation, subject to demand priorities, supply preferences, mass balance and other constraints. The LP solves the set of simultaneous equations explained below. For details of how demand priorities and supply preferences affect calculations, see Priorities for Water Allocation.
Mass balance equations are the foundation of WEAP's monthly water accounting: total inflows equal total outflows, net of any change in storage (in reservoirs, aquifers and catchment soil moisture). Every node and link in WEAP has a mass balance equation, and some have additional equations which constrain their flows (e.g., inflow to a demand site cannot exceed its supply requirement, outflows from an aquifer cannot exceed its maximum withdrawal, link losses are a fraction of flow, etc.).