Skip to content

Commit 44cc823

Browse files
authored
Merge pull request #104 from lanl-ansi/documentation
DOC: Update quick start documentation to be accurate. FIX: Explicitly separate design pipes from non-design pipes.
2 parents 6136474 + 4beefac commit 44cc823

29 files changed

+513
-558
lines changed

LICENSE.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
Copyright (c) 2016, Triad National Security, LLC.
2-
3-
All rights reserved.
4-
5-
This program was produced under U.S. Government contract 89233218CNA000001 for Los Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC for the U.S. Department of Energy/National Nuclear Security Administration. The U.S. Government has rights to use, reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR TRIAD NATIONAL SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to produce derivative works, such modified software should be clearly marked, so as not to confuse it with the version available from LANL.
6-
7-
All rights in the program are reserved by Triad National Security, LLC, and the U.S. Department of Energy/National Nuclear Security Administration. The Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this material to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so.
8-
9-
Additionally, redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
10-
11-
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
12-
13-
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
14-
15-
3. Neither the name of Triad National Security, LLC, Los Alamos National Laboratory, LANL, the U.S. Government, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
16-
17-
THIS SOFTWARE IS PROVIDED BY TRIAD NATIONAL SECURITY, LLC AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TRIAD NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18-
19-
LICENSEE AGREES TO WAIVE ANY AND ALL CLAIMS AGAINST THE U.S. GOVERNMENT AND THE UNITED STATES GOVERNMENT'S CONTRACTORS AND SUBCONTRACTORS, AND SHALL INDEMNIFY AND HOLD HARMLESS THE U.S. GOVERNMENT AND THE UNITED STATES GOVERNMENT'S CONTRACTORS AND SUBCONTRACTORS FOR ANY LIABILITIES, DEMANDS, DAMAGES, EXPENSES, OR LOSSES THAT MAY ARISE FROM RECIPIENT'S USE OF THE NUFLOOD SOFTWARE OR PROVIDED DOCUMENTATION, INCLUDING ANY LIABILITIES OR DAMAGES FROM PRODUCTS BASED ON, OR RESULTING FROM, THE USE THEREOF.
1+
Copyright (c) 2016, Triad National Security, LLC.
2+
3+
All rights reserved.
4+
5+
This program was produced under U.S. Government contract 89233218CNA000001 for Los Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC for the U.S. Department of Energy/National Nuclear Security Administration. The U.S. Government has rights to use, reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR TRIAD NATIONAL SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to produce derivative works, such modified software should be clearly marked, so as not to confuse it with the version available from LANL.
6+
7+
All rights in the program are reserved by Triad National Security, LLC, and the U.S. Department of Energy/National Nuclear Security Administration. The Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this material to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so.
8+
9+
Additionally, redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
10+
11+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
12+
13+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
14+
15+
3. Neither the name of Triad National Security, LLC, Los Alamos National Laboratory, LANL, the U.S. Government, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY TRIAD NATIONAL SECURITY, LLC AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TRIAD NATIONAL SECURITY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18+
19+
LICENSEE AGREES TO WAIVE ANY AND ALL CLAIMS AGAINST THE U.S. GOVERNMENT AND THE UNITED STATES GOVERNMENT'S CONTRACTORS AND SUBCONTRACTORS, AND SHALL INDEMNIFY AND HOLD HARMLESS THE U.S. GOVERNMENT AND THE UNITED STATES GOVERNMENT'S CONTRACTORS AND SUBCONTRACTORS FOR ANY LIABILITIES, DEMANDS, DAMAGES, EXPENSES, OR LOSSES THAT MAY ARISE FROM RECIPIENT'S USE OF THE WATERMODELS SOFTWARE OR PROVIDED DOCUMENTATION, INCLUDING ANY LIABILITIES OR DAMAGES FROM PRODUCTS BASED ON, OR RESULTING FROM, THE USE THEREOF.

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ The code is engineered to decouple problem specifications (e.g., network design,
99
This decoupling enables the definition of a wide variety of optimization formulations and their comparison on common problem specifications.
1010

1111
**Core Problem Specifications**
12-
* Water Flow (wf) - obtain feasible flows for a fixed network
13-
* Optimal Water Flow (owf) - minimize the cost required for network operation
14-
* Network Design (des) - minimize the cost of network design
12+
* Water Flow (`wf` and `mn_wf`) - obtain feasible flows for a network
13+
* Optimal Water Flow (`owf` and `mn_owf`) - minimize the cost of network operation
14+
* Network Design (`des`) - minimize the cost of network design
1515

1616
**Core Network Formulations**
1717
* NLP - nonconvex nonlinear program
@@ -20,7 +20,8 @@ This decoupling enables the definition of a wide variety of optimization formula
2020
* MILP-R - relaxation-based mixed-integer linear program
2121

2222
## Documentation
23-
The package [documentation](https://lanl-ansi.github.io/WaterModels.jl/latest/) includes a [quick start guide](https://lanl-ansi.github.io/WaterModels.jl/latest/quickguide).
23+
The package [documentation](https://lanl-ansi.github.io/WaterModels.jl/latest) includes a [quick start guide](https://lanl-ansi.github.io/WaterModels.jl/latest/quickguide).
24+
Be advised that aside from the quick start guide, documentation is under development and may currently be inaccurate.
2425

2526
## Development
2627
Community-driven development and enhancement of WaterModels is welcomed and encouraged.
@@ -38,6 +39,7 @@ The primary developer is [Byron Tasseff](https://github.com/tasseff) with suppor
3839
- [Russell Bent](https://github.com/rb004f), Los Alamos National Laboratory
3940
- [Carleton Coffrin](https://github.com/ccoffrin), Los Alamos National Laboratory
4041
- Donatella Pasqualini, Los Alamos National Laboratory
42+
- [Jonathan Stickel](https://github.com/jjstickel), National Renewable Energy Laboratory
4143

4244
## License
4345
This code is provided under a [modified BSD license](https://github.com/lanl-ansi/WaterModels.jl/blob/master/LICENSE.md) as part of the Multi-Infrastructure Control and Optimization Toolkit (MICOT), LA-CC-13-108.

docs/make.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ using Documenter, WaterModels
22

33
makedocs(
44
modules = [WaterModels],
5-
format = Documenter.HTML(analytics="UA-367975-10", mathengine=Documenter.MathJax()),
5+
format = Documenter.HTML(analytics="UA-367975-10", mathengine=Documenter.MathJax(), prettyurls=false),
66
sitename = "WaterModels",
7-
authors = "Byron Tasseff, Russell Bent, Carleton Coffrin, Donatella Pasqualini, Clayton Barrows, Sai Krishna Kanth Hari, and contributors.",
7+
authors = "Byron Tasseff and contributors",
88
pages = [
99
"Home" => "index.md",
1010
"Manual" => [
@@ -26,7 +26,7 @@ makedocs(
2626
"File I/O" => "parser.md"
2727
],
2828
"Developer" => "developer.md",
29-
"Experiment Results" => "experiment-results.md"
29+
"Benchmarks" => "benchmarks.md"
3030
]
3131
)
3232

docs/src/benchmarks.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# WaterModels Benchmarks

docs/src/experiment-results.md

-1
This file was deleted.

docs/src/index.md

+25-11
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ CurrentModule = WaterModels
55
```
66

77
## Overview
8-
WaterModels.jl is a Julia/JuMP package for steady state water network optimization.
9-
It is designed to enable computational evaluation of historical and emerging water network formulations and algorithms using a common platform.
10-
The code is engineered to decouple [Problem Specifications](@ref) (e.g., water flow, optimal water flow, network design) from [Network Formulations](@ref) (e.g., mixed-integer linear, mixed-integer nonlinear).
11-
This decoupling enables the definition of a wide variety of water network optimization formulations and their comparison on common problem specifications.
8+
WaterModels.jl is a Julia/JuMP package for steady state potable water distribution network optimization.
9+
It is designed to enable the computational evaluation of historical and emerging water network optimization formulations and algorithms using a common platform.
10+
The code is specifically engineered to decouple [Problem Specifications](@ref) (e.g., water flow, optimal water flow, network design) from [Network Formulations](@ref) (e.g., mixed-integer linear, mixed-integer nonlinear).
11+
This decoupling enables the definition of a wide variety of water network optimization formulations and their comparison across several common problem specifications.
1212

1313
## Installation
1414
The latest stable release of WaterModels can be installed using the Julia package manager with
@@ -21,26 +21,40 @@ For the current development version, install the package using
2121
] add WaterModels#master
2222
```
2323

24-
Test that the package works by executing
24+
Finally, test that the package works as expected by executing
2525
```julia
2626
] test WaterModels
2727
```
2828

2929
## Usage at a Glance
3030
At least one optimization solver is required to run WaterModels.
3131
The solver selected typically depends on the type of problem formulation being employed.
32-
As an example, to solve a mixed-integer linear programming (MILP) formulation of the water flow feasibility problem, the open-source mixed-integer programming solver [CBC](https://github.com/coin-or/Cbc) can be used.
32+
As an example, to solve a mixed-integer linear programming (MILP) formulation of the feasible water flow (`wf`) problem, the open-source mixed-integer programming solver [CBC](https://github.com/coin-or/Cbc) can be used.
3333
Installation of the JuMP interface to CBC can be performed via the Julia package manager, i.e.,
3434

3535
```julia
3636
] add Cbc
3737
```
3838

39-
Then, as one example, an approximation of water flow physics for the well-known [shamir network](https://github.com/lanl-ansi/WaterModels.jl/blob/master/test/data/epanet/shamir.inp), using ten breakpoints to model each potential (or head) loss curve, can be obtained by executing
39+
Then, as one example, a piecewise-linear approximation of the physics for the well-known [Shamir (two-loop) network](https://github.com/lanl-ansi/WaterModels.jl/blob/master/examples/data/epanet/shamir.inp), using ten breakpoints to model each pipe's Hazen-Williams head loss curve, can be solved to feasibility using
4040

4141
```julia
42-
using Cbc
43-
using WaterModels
44-
ext = Dict(:pipe_breakpoints=>10)
45-
result = run_wf("shamir.inp", MILPWaterModel, Cbc.Optimizer, ext=ext)
42+
using WaterModels, Cbc
43+
ext = Dict(:pipe_breakpoints=>10) # Defines additional parameters used in model construction.
44+
result = run_wf("examples/data/epanet/shamir.inp", MILPWaterModel, Cbc.Optimizer; ext=ext)
45+
```
46+
47+
After solving the problem, its results can then be analyzed, e.g.,
48+
```julia
49+
# The termination status of the optimization solver.
50+
result["termination_status"]
51+
52+
# The flow along pipe 4, in cubic meters per second.
53+
result["solution"]["pipe"]["4"]["q"]
54+
55+
# The total hydraulic head at junction (node) 2, in meters.
56+
result["solution"]["node"]["2"]["h"]
57+
58+
# The pressure head at junction (node) 2, in meters.
59+
result["solution"]["node"]["2"]["p"]
4660
```

0 commit comments

Comments
 (0)