You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function filters the streams based on the ports.
197
+
The function returns True if the inlet port is a splitter or the inlet and outlet ports are the discharge mixer and the sink, respectively, False otherwise.
198
+
199
+
Parameters
200
+
----------
201
+
m : Pyomo concrete model
202
+
GDP model for water network design
203
+
x : str
204
+
The source port
205
+
y : str
206
+
The sink port
207
+
208
+
Returns
209
+
-------
210
+
Boolean
211
+
True if the inlet port is a splitter or the inlet and outlet ports are the discharge mixer and the sink, respectively, False otherwise
# Setting inlet flowrate bounds for the active treatment units.
581
694
unit_exists.flow_bound=pyo.ConstraintList(
582
-
doc='Flowrate bounds to/from active RU'
695
+
doc='Flowrate bounds to/from active TU'
583
696
)
584
697
[
585
698
unit_exists.flow_bound.add(
@@ -786,10 +899,14 @@ def _func(model, i, j, xp):
786
899
@unit_exists.Constraint(doc='Cost active TU')
787
900
defcostTU(unit_exists):
788
901
"""Constraint: Cost of active treatment unit.
789
-
The constraint ensures that the cost of the active treatment unit is equal to the sum of an investment cost which is proportional to the total flow to 0.7 exponent and an operating cost which is proportional to the flow.
790
-
If approximation is quadratic, the investment cost is approximated by a quadratic function of the flow rate.
902
+
The constraint defines the cost of the active treatment unit as the sum of an investment cost and an operating cost.
903
+
The investment cost is proportional to the total flow raised to the power of 0.7 and the operating cost is proportional to the flow.
904
+
905
+
Based on the approximation given, the concave investment cost is calculated as follows:
906
+
If approximation is quadratic zero origin, the investment cost is approximated by a quadratic function of the flow rate with the origin at zero.
907
+
If approximation is quadratic nonzero origin, the investment cost is approximated by a quadratic function of the flow rate with origin different from zero. This approximation has a better fit than the quadratic zero origin.
791
908
If approximation is piecewise, the investment cost is approximated by a piecewise linear function of the flow rate.
792
-
If approximation is none, the investment cost is equal to the flow rate to the 0.7 exponent, the original concave function.
909
+
If approximation is none, the investment cost is equal to the flow rate raised to 0.7, the original concave function.
793
910
794
911
Parameters
795
912
----------
@@ -802,9 +919,9 @@ def costTU(unit_exists):
802
919
The constraint that the cost of the active treatment unit is equal to the sum of an investment cost and an operating cost.
0 commit comments