Skip to content

Commit 9694230

Browse files
authored
Merge pull request #59 from SECQUOIA/water_network
Add water_network instance
2 parents 774ede2 + 6b68964 commit 9694230

File tree

10 files changed

+927
-0
lines changed

10 files changed

+927
-0
lines changed

.github/workflows/typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
hda = "hda"
44
HDA = "HDA"
55
equil = "equil"
6+
ue = "ue"

benchmark.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def benchmark(model, strategy, timelimit, result_dir, subsolver="scip"):
8787
# "modprodnet",
8888
# "stranded_gas",
8989
# "syngas",
90+
# "water_network",
9091
]
9192
strategy_list = [
9293
"gdp.bigm",

gdplib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import gdplib.disease_model
1414
import gdplib.med_term_purchasing
1515
import gdplib.syngas
16+
import gdplib.water_network
1617
import gdplib.ex1_linan_2023
1718
import gdplib.small_batch
1819
import gdplib.cstr

gdplib/water_network/README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
## Water Network Design
2+
3+
In the Water Treatment Network (WTN) design problem, given is a set of water streams with known concentrations of contaminants and flow rate.
4+
The objective is to find the set of treatment units and interconnections that minimize the cost of the WTN while satisfying maximum concentrations of contaminants in the reclaimed outlet stream.
5+
The WTN superstructure consists of a set of treatment units, contaminated feed streams carrying a set of contaminants, and a discharge unit.
6+
The fouled feed waters can be allocated to one or more treatment units or disposed of in the sink unit. Upon treatment, the reclaimed streams can be recycled, forwarded to other treatment units, or discharged into the sink unit.
7+
8+
The mass balances are defined in terms of total flows and contaminants concentration.
9+
Nonconvexities arise from bilinear terms “flows times concentration” in the mixers mass balances and concave investment cost functions of treatment units.
10+
11+
The instance incorporates three approximations of the concave cost term when the treatment unit exist, including one piecewise linear and two quadratic approximations, to reformulate the original GDP model into a bilinear quadratic problem [1].
12+
13+
14+
The quadratic reformulations are as follows:
15+
16+
* `quadratic_zero_origin` which reads as $f(x) = a \ x + b \ x^2$. Absence of flow leads to no costs for the pump, which is what we expect. Optimal solution: $346,654 with a relative error with respect to the best known objective value of 0.5%
17+
* `quadratic_nonzero_origin` takes the form of $f(x) = a + b \ x + b \ x^2$. This constraint leads to a non-zero pump expense in the absence of flow. Optimal solution: $349,521 with a relative error with respect to the best known objective value of 0.3%.
18+
19+
The two quadratic approximations are both effective in capturing pump costs, but `quadratic_nonzero_origin` provides a better fit for the active treatment unit's flowrate range.
20+
21+
The user can create each instance like this:
22+
23+
```
24+
build_model(approximation='none')
25+
build_model(approximation='quadratic_zero_origin')
26+
build_model(approximation='quadratic_nonzero_origin')
27+
build_model(approximation='piecewise')
28+
```
29+
30+
The general model description can be summarized as follows:
31+
Min Cost of Treatment Units
32+
s.t.
33+
Physical Constraints:
34+
(a) Mass balance around each splitter
35+
(b) Mass balance around each mixer
36+
(c) Mass balance around each treatment unit
37+
Performance Constraints:
38+
(d) Contaminant composition of the purified stream less or equal than a given limit
39+
for each contaminant.
40+
Logic Constraints:
41+
(e) Treatment units not chosen have their inlet flow set to zero
42+
(f) Every treatment unit chosen must have a minimum flow
43+
44+
Assumptions:
45+
(i) The performance of the treatment units only depends on the total flow entering the unit and its composition.
46+
(ii) The flow of contaminants leaving the unit is a linear function of the inlet flow of contaminants.
47+
48+
### Case Study
49+
50+
The WTN comprises five inlet streams with four contaminants and four treatment units.
51+
The contaminant concentration and flow rate of the feed streams, contaminant recovery rates, minimum flow rate and cost coefficients of the treatment units, and the upper limit on the molar flow of contaminant in the purified stream, are reported in [2].
52+
53+
### Solution
54+
55+
Best known objective value: $348,340
56+
57+
### Size
58+
59+
| Component | original | pwl | quadratic |
60+
| :-------------------- | -------- | :--: | :-------: |
61+
| variables | 395 | 1405 | 420 |
62+
| binary_variables | 10 | 510 | 10 |
63+
| integer_variables | 0 | 0 | 0 |
64+
| continuous_variables | 385 | 895 | 410 |
65+
| disjunctions | 5 | 5 | 5 |
66+
| disjuncts | 10 | 10 | 10 |
67+
| constraints | 329 | 1339 | 334 |
68+
| nonlinear_constraints | 33 | 28 | 33 |
69+
70+
### References
71+
72+
> [1] Tristán C., Fallanza M., Ibáñez R., Grossmann I. E., and Bernal Neira D. E. (2024). Global Optimization via Quadratic Disjunctive Programming for Water Networks Design with Energy Recovery. Computer Aided Chemical Engineering, 53, 2161–2166. https://doi.org/10.1016/B978-0-443-28824-1.50361-6
73+
>
74+
> [2] Ruiz J., and Grossmann I. E. Water Treatment Network Design. 2009 Available from CyberInfrastructure for [MINLP](www.minlp.org), a collaboration of Carnegie Mellon University and IBM at: www.minlp.org/library/problem/index.php?i=24
75+
>
76+
> [3] Ruiz, J., and Grossmann, I. E. (2011). Using redundancy to strengthen the relaxation for the global optimization of MINLP problems. Computers & Chemical Engineering, 35(12), 2729–2740. https://doi.org/10.1016/J.COMPCHEMENG.2011.01.035

gdplib/water_network/T.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cont,T
2+
A,3
3+
B,3
4+
C,3
5+
D,3

gdplib/water_network/TU.csv

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
TU,A,B,C,D,L,theta,beta
2+
t1,0.95,0.95,0.6,0.0,5,1500,8000
3+
t2,0.08,0.8,0.6,0.0,3,1000,8000
4+
t3,0.0,0.6,0.95,0.95,4,4000,8000
5+
t4,0.0,0.6,0.8,0.85,3,3000,8000
6+
t5,0.0,0.6,0.85,0.8,1,3000,8000

gdplib/water_network/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .wnd import build_model
2+
3+
__all__ = ['build_model']

gdplib/water_network/feed.csv

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FSU,A,B,C,D,flow_rate
2+
fs1,1.0,1.0,1.0,1.0,10
3+
fs2,1.3333333333333333,0.0,0.0,0.6666666666666666,15
4+
fs3,2.0,2.0,0.0,4.0,5
5+
fs4,1.5,0.5,0.5,0.0,20
6+
fs5,2.0,2.0,0.0,0.0,10

0 commit comments

Comments
 (0)