Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Introducing and updating config options #29

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
11 changes: 6 additions & 5 deletions gtep/config_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def _get_model_config():
CONFIG = ConfigBlock("GTEPModelConfig")

CONFIG.declare(
"include_planning",
"include_investment",
ConfigValue(
default=True,
domain=Bool,
Expand All @@ -39,11 +39,11 @@ def _get_model_config():
)

CONFIG.declare(
"include_dispatch",
"include_redispatch",
ConfigValue(
default=True,
domain=Bool,
description="Include economic dispatch formulation (i.e., OPF).",
description="Include economic redispatch formulation (i.e., >1 dispatch period per commitment period).",
),
)

Expand All @@ -66,7 +66,7 @@ def _get_model_config():
CONFIG.declare(
"time_period_dict",
ConfigDict(
description=r"Time period dict, specified as \{(investment period #, length): \{(commitment period #, length): \{dispatch period #: length\}\}\}"
description="Time period dict, specified as \{(investment period #, length): \{(representative period #, length): \{(commitment period #, length): \{dispatch period #: length\}\}\}"
),
)

Expand All @@ -86,7 +86,7 @@ def _add_common_configs(CONFIG):
CONFIG.declare(
"scale_loads",
ConfigValue(
default=False,
default=True,
domain=Bool,
description="Allow scaling of load values into future years; i.e., load scaling is represented in the model but not the data.",
),
Expand Down Expand Up @@ -124,6 +124,7 @@ def _add_investment_configs(CONFIG):
description="Include transmission investment options",
),
)
CONFIG.declare("transmission_switching", ConfigValue(default=False, domain=Bool, description="Allow transmission switching during dispatch"))


def _add_solver_configs(CONFIG):
Expand Down
27 changes: 12 additions & 15 deletions gtep/driver_config_work.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@
for k, v in mod_object.config.items():
print(f"k: {k}", f"v: {v}")


exit()

mod_object.config["include_investment"] = False
mod_object.create_model()

ic(mod_object)
exit()


quit()
TransformationFactory("gdp.bound_pretransformation").apply_to(mod_object.model)
TransformationFactory("gdp.bigm").apply_to(mod_object.model)
# opt = SolverFactory("gurobi")
Expand All @@ -36,18 +33,18 @@
# # mod_object.results = opt.solve(mod_object.model, tee=True)
mod_object.results = opt.solve(mod_object.model)

sol_object = ExpansionPlanningSolution()
sol_object.load_from_model(mod_object)
sol_object.dump_json("./gtep_solution.json")
# sol_object = ExpansionPlanningSolution()
# sol_object.load_from_model(mod_object)
# sol_object.dump_json("./gtep_solution.json")

sol_object.import_data_object(data_object)
# sol_object.import_data_object(data_object)

# sol_object.read_json("./gtep_lots_of_buses_solution.json") # "./gtep/data/WECC_USAEE"
# sol_object.read_json("./gtep_11bus_solution.json") # "./gtep/data/WECC_Reduced_USAEE"
# sol_object.read_json("./gtep_solution.json")
# sol_object.read_json("./updated_gtep_solution_test.json")
# sol_object.read_json("./gtep_wiggles.json")
sol_object.plot_levels(save_dir="./plots/")
# # sol_object.read_json("./gtep_lots_of_buses_solution.json") # "./gtep/data/WECC_USAEE"
# # sol_object.read_json("./gtep_11bus_solution.json") # "./gtep/data/WECC_Reduced_USAEE"
# # sol_object.read_json("./gtep_solution.json")
# # sol_object.read_json("./updated_gtep_solution_test.json")
# # sol_object.read_json("./gtep_wiggles.json")
# sol_object.plot_levels(save_dir="./plots/")

# save_numerical_results = False
# if save_numerical_results:
Expand Down
Loading
Loading