200 likes | 216 Views
OASIS is a program for modeling the operations of water resources systems, simulating the routing of water through nodes, junctions, reservoirs, and arcs. It accounts for human control and physical constraints, using linear programming to optimize decision variables and meet operating goals.
E N D
OASIS BasicsComputer Aided Negotiations of Water Resources Disputes
What is OASIS ? • Operational Analysis and Simulation of Integrated Systems • Program for modeling the operations of water resources systems
Inflow Reservoir Arc Arc Arc Arc 110 120 140 100 130 Terminal Junction Junction Reservoir 135 Demand What does OASIS do ?…….. and How? • Simulates the routing of water through a system represented by: • Nodes (points of interest) • Demand • Junction • Reservoirs • Arcs (convey water from node to node) • Inflows (positive or negative, fixed by the user) • Routing accounts for human control and physical constraints
Examples of Human Control • Water is moved from node to node according to “operating criteria”. • Water is allocated to demand nodes based on pre-established criteria Examples of Physical Constraints • Storage Area Elevation (SAE) tables: Storage volume available at each water level in a reservoir • Maximum flow: restriction on the arc flow imposed by a maximum gate opening • Head - Flow relationships to describe the hydraulics of a canal or canal capacity • Evapotranspiration: “Demand” applied to each node to account for evapotranspiration losses in a reservoir • MASS BALANCE : Main constraint that is accounted for during each time step of the routing
What does OASIS do ?…….. and How? • Water is routed (moved) through the system by calculating: Flow through arcs (arcflows) , Volume stored in each node and Volume allocated to each demand node • these calculations are made for every time step during a pre-established period of simulation, • using a Linear Programming solver which is called every time step
Use of Linear Programming in OASIS • OASIS automatically constructs the LP each time step, solves it, and then turns that mathematical solution into a simulated record of flows and storages • The LP is internal – hidden, unless you request it • Every time step, flow, storage and delivery are decision variables whose values are solved by LP.
Constraints: rules that OASIS must obey Goal: rule that OASIS tries to meet Written to an objective function which the solver optimizes – determines the solution which best meets the goals within the constraints Routing with a linear program • You specify what to do but do not have to tell OASIS how to do it • Think of the solver as a “smart operator” who obeys the laws of physics (and other specified constraints)
Decision Variables and State Variables • Decision variable: A variable whose value is decided by the LP solver. • OCL Rules are written with the values of the decision variables unknown. • State variable: Any variable whose value is known. • Some state variables represent decision variables from previous time steps that the LP solver has already solved. • Other state variables represent external conditions (e.g. inflow, rainfall, date, time-step number)
Goals • Goal: a rule that OASIS tries to satisfy • In any time step, OASIS might not be able to satisfy all or any of a given operating goal • By their nature, operating goals are in competition with each other • OASIS chooses between competing goals by weights that you assign • Example: “Try to deliver 45 mgd to demand node 472”.
Balancing Goals • The modeler assigns a weightvalue to every operating goal in the model to construct the objective function • The LP solution scores pointsby multiplying the weight value by the value of the associated decision variable • In every time step, OASIS determines the values of the decision variables by solving the LP • The solution obeys every constraint • The solution is the set of decision variable values that gets the maximum number of points from the set of goals
Weights • Every goal should be assigned a weight value • Positive weights encourage actions while negative weights (penalties) discourage them. • Zero weight is the same as if the goal did not exist.
More About Weights • Assigning weights is usually simple—assign lowest to highest in hierarchical order • Weights do not represent a quantity that you can measure in the real-world system • Weights do represent the relative importance of the different priorities of the operators of the real-world system • It gets easier with experience
An analogy to money • Water is like money • Weights are your spending/saving priorities • The lp will allocate your money based on your spending/saving priorities • When money is scarce, which bills do you pay first (should you satisfy a minimum flow requirement or keep water in a lake)? • When money is plentiful, where should you put the extra (should you put it on the floodplain or in a lake)?
110 120 140 100 130 wt = 0 wt = 0 wt = 0 wt = 0 terminal wt = 200 wt = 100 Example of Using Weights - 1 No benefit for moving water downstream; storage remains in node 100 and node 130
110 120 140 100 130 wt = 0 wt = 0 wt = 0 wt = 150 terminal wt = 200 wt = 100 Example of Using Weights - 2 No benefit for moving water between reservoirs, but weight on terminal arc pulls from node 130 until it empties.
110 120 140 100 130 wt = 0 wt = 0 wt = 0 wt = 250 terminal wt = 200 wt = 100 Example of Using Weights - 3 No benefit for moving water between reservoirs, but weight on terminal arc pulls from node 130 until it empties, then pulls from node 100.
110 120 140 100 130 wt = 100 wt = 100 wt = 100 wt = 0 terminal wt = 200 wt = 100 Example of Using Weights - 4 Water released from node 100 gets 300 weight points, plus 100 points for being stored in node 130, so water is transferred from node 100 to node 130.
110 120 140 100 130 wt = 100 wt = 100 wt = 100 wt = 250 terminal wt = 200 wt = 100 Example of Using Weights - 5 Weight on terminal arc causes the system to be drained. Moral: use weights on arcs only where necessary.
110 120 140 100 130 wt = 0 wt = 0 wt = 0 wt = 0 terminal wt = 200 wt = 200 Example of Using Weights - 6 OASIS gets the same number of points whether it keeps water in the upstream reservoir or sends it to the downstream reservoir This is called alternate optima, and it should be avoided
Building an OASIS model • Basedata: timeseries data • GUI: much of what you need to specify can be done here • OCL (Operations Control Language): provides flexibility • “set” the value of a variable • Define new constraints and goals for the lp • Create new variables, enter new data, exchange information with other programs • Output: Quickview, Onevar, output.dss