diff --git a/README.md b/README.md index c6f4d70743..b1a3a51898 100644 --- a/README.md +++ b/README.md @@ -256,4 +256,4 @@ Key contributors include [Nestor A. Sepulveda](https://energy.mit.edu/profile/ne [Sambuddha Chakrabarti](https://www.linkedin.com/in/sambuddha-chakrabarti-ph-d-84157318). ## Acknowledgement -The GenX team expresses deep gratitude to Laura Zwanziger and Jacob Schwartz for designing the Julia-themed GenX logo. \ No newline at end of file +The GenX team expresses deep gratitude to Laura Zwanziger and Jacob Schwartz for designing the Julia-themed GenX logo and to [Maya Mutic](https://github.com/mmutic) for developing the tutorials along with Luca Bonaldo. \ No newline at end of file diff --git a/src/load_inputs/load_network_data.jl b/src/load_inputs/load_network_data.jl index dc3acfbea3..458d00c7c6 100644 --- a/src/load_inputs/load_network_data.jl +++ b/src/load_inputs/load_network_data.jl @@ -1,5 +1,5 @@ @doc raw""" - load_network_data(setup::Dict, path::AbstractString, inputs_nw::Dict) + load_network_data!(setup::Dict, path::AbstractString, inputs_nw::Dict) Function for reading input parameters related to the electricity transmission network """ diff --git a/src/load_inputs/load_resources_data.jl b/src/load_inputs/load_resources_data.jl index 05b9bc94f9..be9d49eaa7 100644 --- a/src/load_inputs/load_resources_data.jl +++ b/src/load_inputs/load_resources_data.jl @@ -41,7 +41,7 @@ function _get_policyfile_info() end """ - _get_summar_map() + _get_summary_map() Internal function to get a map of GenX resource type their corresponding names in the summary table. """ @@ -444,7 +444,7 @@ function validate_resources(resources::T) where T <: Vector{AbstractResource} end """ - create_resources(setup::Dict, case_path::AbstractString) + create_resource_array(setup::Dict, case_path::AbstractString) Function that loads and scales resources data from folder specified in `setup["ResourcePath"] and returns an array of GenX resources. @@ -1148,7 +1148,7 @@ function load_resources_data!(inputs::Dict, setup::Dict, case_path::AbstractStri end @doc raw""" - load_multi_fuels_data!(inputs::Dict, setup::Dict, path::AbstractString) + load_multi_fuels_data!(inputs::Dict, gen::Vector{<:AbstractResource}, setup::Dict, path::AbstractString) Function for reading input parameters related to multi fuels """ diff --git a/src/model/core/discharge/discharge.jl b/src/model/core/discharge/discharge.jl index 953eeecc04..6955bfffb1 100644 --- a/src/model/core/discharge/discharge.jl +++ b/src/model/core/discharge/discharge.jl @@ -1,5 +1,6 @@ @doc raw""" - discharge(EP::Model, inputs::Dict, setup::Dict) + discharge!(EP::Model, inputs::Dict, setup::Dict) + This module defines the power decision variable $\Theta_{y,t} \forall y \in \mathcal{G}, t \in \mathcal{T}$, representing energy injected into the grid by resource $y$ by at time period $t$. This module additionally defines contributions to the objective function from variable costs of generation (variable O&M) from all resources $y \in \mathcal{G}$ over all time periods $t \in \mathcal{T}$: ```math diff --git a/src/model/core/transmission.jl b/src/model/core/transmission.jl index ead01fc504..2b67d66a73 100644 --- a/src/model/core/transmission.jl +++ b/src/model/core/transmission.jl @@ -1,5 +1,5 @@ @doc raw""" - function transmission!(EP::Model, inputs::Dict, setup::Dict) + transmission!(EP::Model, inputs::Dict, setup::Dict) This function establishes decisions, expressions, and constraints related to transmission power flows between model zones and associated transmission losses (if modeled). The function adds transmission reinforcement or construction costs to the objective function. Transmission reinforcement costs are equal to the sum across all lines of the product between the transmission reinforcement/construction cost, $pi^{TCAP}_{l}$, times the additional transmission capacity variable, $\bigtriangleup\varphi^{max}_{l}$. ```math diff --git a/src/model/core/ucommit.jl b/src/model/core/ucommit.jl index 3a3f95f4bb..28ead8d291 100644 --- a/src/model/core/ucommit.jl +++ b/src/model/core/ucommit.jl @@ -1,5 +1,5 @@ @doc raw""" - ucommit(EP::Model, inputs::Dict, setup::Dict) + ucommit!(EP::Model, inputs::Dict, setup::Dict) This function creates decision variables and cost expressions associated with thermal plant unit commitment or start-up and shut-down decisions (cycling on/off) diff --git a/src/model/resources/vre_stor/vre_stor.jl b/src/model/resources/vre_stor/vre_stor.jl index 918ae42c99..f1690614a5 100644 --- a/src/model/resources/vre_stor/vre_stor.jl +++ b/src/model/resources/vre_stor/vre_stor.jl @@ -1,5 +1,5 @@ @doc raw""" - vre_stor(EP::Model, inputs::Dict, setup::Dict) + vre_stor!(EP::Model, inputs::Dict, setup::Dict) This module enables the modeling of 1) co-located VRE and energy storage technologies, and 2) optimized interconnection sizing for VREs. Utility-scale solar PV and/or wind VRE technologies diff --git a/src/multi_stage/dual_dynamic_programming.jl b/src/multi_stage/dual_dynamic_programming.jl index b9ed9565f0..d2ff098952 100644 --- a/src/multi_stage/dual_dynamic_programming.jl +++ b/src/multi_stage/dual_dynamic_programming.jl @@ -1,5 +1,5 @@ @doc raw""" - function configure_ddp_dicts(setup::Dict, inputs::Dict) + configure_ddp_dicts(setup::Dict, inputs::Dict) This function instantiates Dictionary objects containing the names of linking expressions, constraints, and variables used in multi-stage modeling. @@ -115,7 +115,7 @@ function configure_ddp_dicts(setup::Dict, inputs::Dict) end @doc raw""" - function run_ddp(models_d::Dict, setup::Dict, inputs_d::Dict) + run_ddp(models_d::Dict, setup::Dict, inputs_d::Dict) This function run the dual dynamic programming (DDP) algorithm, as described in [Pereira and Pinto (1991)](https://doi.org/10.1007/BF01582895), and more recently, [Lara et al. (2018)](https://doi.org/10.1016/j.ejor.2018.05.039). Note that if the algorithm does not converge within 10,000 (currently hardcoded) iterations, this function will return models with sub-optimal solutions. However, results will still be printed as if the model is finished solving. This sub-optimal termination is noted in the output with the 'Exiting Without Covergence!' message. @@ -315,7 +315,7 @@ function run_ddp(models_d::Dict, setup::Dict, inputs_d::Dict) end @doc raw""" - function write_multi_stage_outputs(stats_d::Dict, outpath::String, settings_d::Dict) + write_multi_stage_outputs(stats_d::Dict, outpath::String, settings_d::Dict) This function calls various methods which write multi-stage modeling outputs as .csv files. @@ -342,7 +342,7 @@ function write_multi_stage_outputs(stats_d::Dict, outpath::String, settings_d::D end @doc raw""" - function fix_initial_investments(EP_prev::Model, EP_cur::Model, start_cap_d::Dict) + fix_initial_investments(EP_prev::Model, EP_cur::Model, start_cap_d::Dict) This function sets the right hand side values of the existing capacity linking constraints in the current stage $p$ to the realized values of the total available end capacity linking variable expressions from the previous stage $p-1$ as part of the forward pass. @@ -376,7 +376,7 @@ function fix_initial_investments(EP_prev::Model, EP_cur::Model, start_cap_d::Dic end @doc raw""" - function fix_capacity_tracking(EP_prev::Model, EP_cur::Model, cap_track_d::Dict, cur_stage::Int) + fix_capacity_tracking(EP_prev::Model, EP_cur::Model, cap_track_d::Dict, cur_stage::Int) This function sets the right hand side values of the new and retired capacity tracking linking constraints in the current stage $p$ to the realized values of the new and retired capacity tracking linking variables from the previous stage $p-1$ as part of the forward pass. where tracking linking variables are defined variables for tracking, linking and passing realized expansion and retirement of capacities of each stage to the next stage. @@ -420,7 +420,7 @@ function fix_capacity_tracking(EP_prev::Model, EP_cur::Model, cap_track_d::Dict, end @doc raw""" - function add_cut(EP_cur::Model, EP_next::Model, start_cap_d::Dict, cap_track_d::Dict) + add_cut(EP_cur::Model, EP_next::Model, start_cap_d::Dict, cap_track_d::Dict) inputs: @@ -486,7 +486,7 @@ function add_cut(EP_cur::Model, EP_next::Model, start_cap_d::Dict, cap_track_d:: end @doc raw""" - function generate_cut_component_inv(EP_cur::Model, EP_next::Model, expr_name::Symbol, constr_name::Symbol) + generate_cut_component_inv(EP_cur::Model, EP_next::Model, expr_name::Symbol, constr_name::Symbol) This function generates Bender's cut expressions for total new or retired capacity tracking linking variables in the form: ```math @@ -526,7 +526,7 @@ function generate_cut_component_track(EP_cur::Model, EP_next::Model, var_name::S end @doc raw""" - function generate_cut_component_inv(EP_cur::Model, EP_next::Model, expr_name::Symbol, constr_name::Symbol) + generate_cut_component_inv(EP_cur::Model, EP_next::Model, expr_name::Symbol, constr_name::Symbol) This function generates Bender's cut expressions for linking capacity investment variable expression in the form: ```math @@ -564,7 +564,7 @@ function generate_cut_component_inv(EP_cur::Model, EP_next::Model, expr_name::Sy end @doc raw""" - function initialize_cost_to_go(settings_d::Dict, EP::Model) + initialize_cost_to_go(settings_d::Dict, EP::Model) This function scales the model objective function so that costs are consistent with multi-stage modeling and introduces a cost-to-go function variable to the objective function. diff --git a/src/multi_stage/write_multi_stage_capacities_charge.jl b/src/multi_stage/write_multi_stage_capacities_charge.jl index 53dcdc6750..7b4996c148 100644 --- a/src/multi_stage/write_multi_stage_capacities_charge.jl +++ b/src/multi_stage/write_multi_stage_capacities_charge.jl @@ -1,5 +1,5 @@ @doc raw""" - function write_multi_stage_capacities_charge(outpath::String, settings_d::Dict) + write_multi_stage_capacities_charge(outpath::String, settings_d::Dict) This function writes the file capacities\_charge\_multi\_stage.csv to the Results directory. This file contains starting resource charge capacities from the first model stage and end resource charge capacities for the first and all subsequent model stages. diff --git a/src/multi_stage/write_multi_stage_capacities_discharge.jl b/src/multi_stage/write_multi_stage_capacities_discharge.jl index 267d1c64af..40dae83c96 100644 --- a/src/multi_stage/write_multi_stage_capacities_discharge.jl +++ b/src/multi_stage/write_multi_stage_capacities_discharge.jl @@ -1,5 +1,5 @@ @doc raw""" - function write_multi_stage_capacities_discharge(outpath::String, settings_d::Dict) + write_multi_stage_capacities_discharge(outpath::String, settings_d::Dict) This function writes the file capacities\_multi\_stage.csv to the Results directory. This file contains starting resource capacities from the first model stage and end resource capacities for the first and all subsequent model stages. diff --git a/src/multi_stage/write_multi_stage_capacities_energy.jl b/src/multi_stage/write_multi_stage_capacities_energy.jl index 5f98bcc8bb..ade174d608 100644 --- a/src/multi_stage/write_multi_stage_capacities_energy.jl +++ b/src/multi_stage/write_multi_stage_capacities_energy.jl @@ -1,5 +1,5 @@ @doc raw""" - function write_multi_stage_capacities_energy(outpath::String, settings_d::Dict) + write_multi_stage_capacities_energy(outpath::String, settings_d::Dict) This function writes the file capacities\_energy\_multi\_stage.csv to the Results directory. This file contains starting resource energy capacities from the first model stage and end resource energy capacities for the first and all subsequent model stages. diff --git a/src/multi_stage/write_multi_stage_costs.jl b/src/multi_stage/write_multi_stage_costs.jl index 7437628440..23893db5e3 100644 --- a/src/multi_stage/write_multi_stage_costs.jl +++ b/src/multi_stage/write_multi_stage_costs.jl @@ -1,5 +1,5 @@ @doc raw""" - function write_multi_stage_costs(outpath::String, settings_d::Dict) + write_multi_stage_costs(outpath::String, settings_d::Dict) This function writes the file costs\_multi\_stage.csv to the Results directory. This file contains variable, fixed, startup, network expansion, unmet reserve, and non-served energy costs discounted to year zero. diff --git a/src/multi_stage/write_multi_stage_network_expansion.jl b/src/multi_stage/write_multi_stage_network_expansion.jl index 819e20c9dd..8d98705a8d 100644 --- a/src/multi_stage/write_multi_stage_network_expansion.jl +++ b/src/multi_stage/write_multi_stage_network_expansion.jl @@ -1,5 +1,5 @@ @doc raw""" - function write_multi_stage_network_expansion(outpath::String, settings_d::Dict) + write_multi_stage_network_expansion(outpath::String, settings_d::Dict) This function writes the file network\_expansion\_multi\_stage.csv to the Results directory. This file contains new transmission capacities for each modeled transmission line for the first and all subsequent model stages. diff --git a/src/multi_stage/write_multi_stage_stats.jl b/src/multi_stage/write_multi_stage_stats.jl index 6a04612404..75919d067f 100644 --- a/src/multi_stage/write_multi_stage_stats.jl +++ b/src/multi_stage/write_multi_stage_stats.jl @@ -1,5 +1,5 @@ @doc raw""" - function write_multi_stage_stats(outpath::String, stats_d::Dict) + write_multi_stage_stats(outpath::String, stats_d::Dict) This function writes the file stats\_multi\_stage.csv. to the Results directory. This file contains the runtime, upper bound, lower bound, and relative optimality gap for each iteration of the DDP algorithm. diff --git a/src/write_outputs/reserves/write_operating_reserve_price_revenue.jl b/src/write_outputs/reserves/write_operating_reserve_price_revenue.jl index 3e69afcef8..25a2b4a760 100644 --- a/src/write_outputs/reserves/write_operating_reserve_price_revenue.jl +++ b/src/write_outputs/reserves/write_operating_reserve_price_revenue.jl @@ -1,5 +1,5 @@ @doc raw""" - write_operating_reserve_price_revenue(path::AbstractString, inputs::Dict, setup::Dict, EP::Model) + write_operating_reserve_regulation_revenue(path::AbstractString, inputs::Dict, setup::Dict, EP::Model) Function for reporting the operating reserve and regulation revenue earned by generators listed in the input file. GenX will print this file only when operating reserve and regulation are modeled and the shadow price can be obtained from the solver.