Skip to content

Commit

Permalink
Add water_network instance
Browse files Browse the repository at this point in the history
  • Loading branch information
tristantc committed Sep 3, 2024
1 parent e2f5ede commit fffd81c
Show file tree
Hide file tree
Showing 5 changed files with 822 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gdplib/water_network/T.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cont,T
A,3
B,3
C,3
D,3
6 changes: 6 additions & 0 deletions gdplib/water_network/TU.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TU,A,B,C,D,L,theta,beta
t1,0.95,0.95,0.6,0.0,5,1500,8000
t2,0.08,0.8,0.6,0.0,3,1000,8000
t3,0.0,0.6,0.95,0.95,4,4000,8000
t4,0.0,0.6,0.8,0.85,3,3000,8000
t5,0.0,0.6,0.85,0.8,1,3000,8000
18 changes: 18 additions & 0 deletions gdplib/water_network/__init__ .py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# from .wn_pwl import build_model_Piecewise as _pwl
# from .wn_q import build_model_Quadratic as _q

# from .wn_minlp import build_model_MINLP as _original
from gdplib.water_network.wnd import build_model

# def build_model(case="quadratic"):
# if case == "quadratic":
# return _q()
# elif case == "piecewise":
# return _pwl()
# else:
# raise ValueError(f"Invalid case: {case}")


__all__ = ['build_model']
# if __name__ == "__main__":
# build_model
6 changes: 6 additions & 0 deletions gdplib/water_network/feed.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FSU,A,B,C,D,flow_rate
fs1,1.0,1.0,1.0,1.0,10
fs2,1.3333333333333333,0.0,0.0,0.6666666666666666,15
fs3,2.0,2.0,0.0,4.0,5
fs4,1.5,0.5,0.5,0.0,20
fs5,2.0,2.0,0.0,0.0,10
Loading

0 comments on commit fffd81c

Please sign in to comment.