Skip to content

Commit

Permalink
Begin consolidating building parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
tarnold17 committed Sep 19, 2024
1 parent 0446248 commit 2405b4e
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 598 deletions.
8 changes: 8 additions & 0 deletions docs/model_library/strategic_water_management/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ Strategic Model Mathematical Notation

:math:`\textcolor{blue}{(r,s) \in RSA}` Treatment-to-storage pipeline arcs

:math:`\textcolor{blue}{(r,o) \in ROA}` Treatment-to-reuse pipeline arcs

:math:`\textcolor{blue}{(s,n) \in SNA}` Storage-to-node pipeline arcs

:math:`\textcolor{blue}{(s,p) \in SCA}` Storage-to-completions pipeline arcs
Expand Down Expand Up @@ -156,8 +158,14 @@ Strategic Model Mathematical Notation

:math:`\textcolor{blue}{(s,k) \in SKT}` Storage-to-disposal trucking arcs

:math:`\textcolor{blue}{(s,o) \in SOT}` Storage-to-reuse trucking arcs

:math:`\textcolor{blue}{(r,k) \in RKT}` Treatment-to-disposal trucking arcs

:math:`\textcolor{blue}{(r,s) \in RST}` Treatment-to-storage trucking arcs

:math:`\textcolor{blue}{(r,o) \in ROT}` Treatment-to-reuse trucking arcs

:math:`\textcolor{blue}{(l,\tilde{l}) \in LLT}` All valid trucking arcs


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from enum import Enum

from pareto.utilities.units_support import units_setup
from pareto.utilities.build_utils import define_sets
from pareto.utilities.build_utils import build_sets, build_params


class ProdTank(Enum):
Expand Down Expand Up @@ -111,241 +111,11 @@ def create_model(df_sets, df_parameters, default={}):

model.proprietary_data = df_parameters["proprietary_data"][0]

# Define sets #
define_sets(model)
# Build sets #
build_sets(model)

# Define model parameters #
model.p_PCA = Param(
model.s_PP,
model.s_CP,
default=0,
initialize={},
doc="Valid production-to-completions pipeline arcs [-]",
)
model.p_PNA = Param(
model.s_PP,
model.s_N,
default=0,
initialize={},
doc="Valid production-to-node pipeline arcs [-]",
)
model.p_PPA = Param(
model.s_PP,
model.s_PP,
default=0,
initialize={},
doc="Valid production-to-production pipeline arcs [-]",
)
model.p_CNA = Param(
model.s_CP,
model.s_N,
default=0,
initialize={},
doc="Valid completion-to-node pipeline arcs [-]",
)
model.p_CCA = Param(
model.s_CP,
model.s_CP,
default=0,
initialize={},
doc="Valid completion-to-completion pipeline arcs [-]",
)
model.p_NNA = Param(
model.s_N,
model.s_N,
default=0,
initialize={},
doc="Valid node-to-node pipeline arcs [-]",
)
model.p_NCA = Param(
model.s_N,
model.s_CP,
default=0,
initialize={},
doc="Valid node-to-completions pipeline arcs [-]",
)
model.p_NKA = Param(
model.s_N,
model.s_K,
default=0,
initialize={},
doc="Valid node-to-disposal pipeline arcs [-]",
)
model.p_NSA = Param(
model.s_N,
model.s_S,
default=0,
initialize={},
doc="Valid node-to-storage pipeline arcs [-]",
)
model.p_NRA = Param(
model.s_N,
model.s_R,
default=0,
initialize={},
doc="Valid node-to-treatment pipeline arcs [-]",
)
model.p_NOA = Param(
model.s_N,
model.s_O,
default=0,
initialize={},
doc="Valid node-to-reuse pipeline arcs [-]",
)
model.p_RCA = Param(
model.s_R,
model.s_CP,
default=0,
initialize=df_parameters["RCA"],
doc="Valid treatment-to-completions pipeline arcs [-]",
)
model.p_FCA = Param(
model.s_F,
model.s_CP,
default=0,
initialize=df_parameters["FCA"],
doc="Valid externally sourced water-to-completions pipeline arcs [-]",
)
model.p_RNA = Param(
model.s_R,
model.s_N,
default=0,
initialize={},
doc="Valid treatment-to-node pipeline arcs [-]",
)
model.p_RKA = Param(
model.s_R,
model.s_K,
default=0,
initialize={},
doc="Valid treatment-to-disposal pipeline arcs [-]",
)
model.p_SNA = Param(
model.s_S,
model.s_N,
default=0,
initialize={},
doc="Valid storage-to-node pipeline arcs [-]",
)
model.p_SCA = Param(
model.s_S,
model.s_CP,
default=0,
initialize={},
doc="Valid storage-to-completions pipeline arcs [-]",
)
model.p_SKA = Param(
model.s_S,
model.s_K,
default=0,
initialize={},
doc="Valid storage-to-disposal pipeline arcs [-]",
)
model.p_SRA = Param(
model.s_S,
model.s_R,
default=0,
initialize={},
doc="Valid storage-to-treatment pipeline arcs [-]",
)
model.p_SOA = Param(
model.s_S,
model.s_O,
default=0,
initialize={},
doc="Valid storage-to-reuse pipeline arcs [-]",
)
model.p_PCT = Param(
model.s_PP,
model.s_CP,
default=0,
initialize=df_parameters["PCT"],
doc="Valid production-to-completions trucking arcs [-]",
)
model.p_FCT = Param(
model.s_F,
model.s_CP,
default=0,
initialize=df_parameters["FCT"],
doc="Valid externally sourced water-to-completions trucking arcs [-]",
)
model.p_PKT = Param(
model.s_PP,
model.s_K,
default=0,
initialize=df_parameters["PKT"],
doc="Valid production-to-disposal trucking arcs [-]",
)
model.p_PST = Param(
model.s_PP,
model.s_S,
default=0,
initialize={},
doc="Valid production-to-storage trucking arcs [-]",
)
model.p_PRT = Param(
model.s_PP,
model.s_R,
default=0,
initialize=df_parameters["PRT"],
doc="Valid production-to-treatment trucking arcs [-]",
)
model.p_POT = Param(
model.s_PP,
model.s_O,
default=0,
initialize={},
doc="Valid production-to-reuse trucking arcs [-]",
)
model.p_CKT = Param(
model.s_CP,
model.s_K,
default=0,
initialize=df_parameters["CKT"],
doc="Valid completions-to-disposal trucking arcs [-]",
)
model.p_CST = Param(
model.s_CP,
model.s_S,
default=0,
initialize={},
doc="Valid completions-to-storage trucking arcs [-]",
)
model.p_CRT = Param(
model.s_CP,
model.s_R,
default=0,
initialize=df_parameters["CRT"],
doc="Valid completions-to-treatment trucking arcs [-]",
)
model.p_CCT = Param(
model.s_CP,
model.s_CP,
default=0,
initialize=df_parameters["CCT"],
doc="Valid completions-to-completions trucking arcs [-]",
)
model.p_SCT = Param(
model.s_S,
model.s_CP,
default=0,
initialize={},
doc="Valid storage-to-completions trucking arcs [-]",
)
model.p_SKT = Param(
model.s_S,
model.s_K,
default=0,
initialize={},
doc="Valid storage-to-disposal trucking arcs [-]",
)
model.p_RKT = Param(
model.s_R,
model.s_K,
default=0,
initialize={},
doc="Valid treatment-to-disposal trucking arcs [-]",
)
# Build parameters #
build_params(model)

model.p_LLT = Param(
model.s_L,
Expand Down
Loading

0 comments on commit 2405b4e

Please sign in to comment.