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

H2-Storage-module-edits #55

Merged
merged 10 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions Example_Systems/2020_NoEC/Run.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
DOLPHYN: Decision Optimization for Low-carbon Power and Hydrogen Networks
Copyright (C) 2021, Massachusetts Institute of Technology
Copyright (C) 2022, Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
Expand Down Expand Up @@ -99,10 +99,3 @@ if mysetup["ModelH2"] == 1
outpath_H2 = "$outpath/Results_HSC"
write_HSC_outputs(EP, outpath_H2, mysetup, myinputs)
end

# Run MGA if the MGA flag is set to 1 else only save the least cost solution
# Only valid for power system analysis at this point
if mysetup["ModelingToGenerateAlternatives"] == 1
println("Starting Model to Generate Alternatives (MGA) Iterations")
mga(EP,inpath,mysetup,myinputs,outpath)
end
8 changes: 1 addition & 7 deletions Example_Systems/2030_CombEC_DETrans/Run.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
DOLPHYN: Decision Optimization for Low-carbon Power and Hydrogen Networks
Copyright (C) 2021, Massachusetts Institute of Technology
Copyright (C) 2022, Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
Expand Down Expand Up @@ -100,9 +100,3 @@ if mysetup["ModelH2"] == 1
write_HSC_outputs(EP, outpath_H2, mysetup, myinputs)
end

# Run MGA if the MGA flag is set to 1 else only save the least cost solution
# Only valid for power system analysis at this point
if mysetup["ModelingToGenerateAlternatives"] == 1
shakesy94 marked this conversation as resolved.
Show resolved Hide resolved
println("Starting Model to Generate Alternatives (MGA) Iterations")
mga(EP,inpath,mysetup,myinputs,outpath)
end
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ StorageLosses: 1 # Energy Share Requirement and CO2 constraints account for ener
MinCapReq: 0 # Activate minimum technology carveout constraints; 0 = not active; 1 = active
ParameterScale: 1 # Turn on parameter scaling wherein load, capacity and power variables are defined in GW rather than MW. 0 = not active; 1 = active systemwide
UCommit: 0 # Unit committment of thermal power plants; 0 = not active; 1 = active using integer clestering; 2 = active using linearized clustering
ModelingToGenerateAlternatives: 0 # Modeling to generate alternatives; 0 = not active; 1 = active. Note: produces a single solution as output
ModelingtoGenerateAlternativeSlack: 0.1 # Slack value as a fraction of least-cost objective in budget constraint used for evaluating alternative model solutions; positive float value
ModelingToGenerateAlternativeIterations: 3 # Number of MGA iterations with maximization and minimization objective
MethodofMorris: 0 #Flag for turning on the Method of Morris analysis
12 changes: 3 additions & 9 deletions Example_Systems/SmallNewEngland/ThreeZones/Run.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
DOLPHYN: Decision Optimization for Low-carbon Power and Hydrogen Networks
Copyright (C) 2021, Massachusetts Institute of Technology
Copyright (C) 2022, Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
Expand Down Expand Up @@ -72,12 +72,12 @@ OPTIMIZER = configure_solver(mysetup["Solver"], settings_path)

# #### Running a case

# ### Load inputs
# ### Load power system inputs
# println("Loading Inputs")
myinputs = Dict() # myinputs dictionary will store read-in data and computed parameters
myinputs = load_inputs(mysetup, inpath)

# ### Load H2 inputs if modeling the hydrogen supply chain
# ### Load inputs for modeling the hydrogen supply chain
if mysetup["ModelH2"] == 1
myinputs = load_h2_inputs(myinputs, mysetup, inpath)
end
Expand All @@ -103,9 +103,3 @@ if mysetup["ModelH2"] == 1
write_HSC_outputs(EP, outpath_H2, mysetup, myinputs)
end

# Run MGA if the MGA flag is set to 1 else only save the least cost solution
# Only valid for power system analysis at this point
if mysetup["ModelingToGenerateAlternatives"] == 1
println("Starting Model to Generate Alternatives (MGA) Iterations")
mga(EP,inpath,mysetup,myinputs,outpath)
end
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CapacityReserveMargin: 0 # Number of capacity reserve margin constraints; 0 = no
CO2Cap: 2 # CO2 emissions cap for power and/or energy system; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = load + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint; 4 = emissions penalized via a carbon price
StorageLosses: 1 # Energy Share Requirement and CO2 constraints account for energy lost; 0 = not active (DO NOT account for energy lost); 1 = active systemwide (DO account for energy lost)
MinCapReq: 0 # Activate minimum technology carveout constraints; 0 = not active; 1 = active
ParameterScale: 0 # Turn on parameter scaling wherein load, capacity and power variables are defined in GW rather than MW. 0 = not active; 1 = active systemwide
ParameterScale: 1 # Turn on parameter scaling wherein load, capacity and power variables are defined in GW rather than MW. 0 = not active; 1 = active systemwide
UCommit: 0 # Unit committment of thermal power plants; 0 = not active; 1 = active using integer clestering; 2 = active using linearized clustering
ModelingToGenerateAlternatives: 0 # Modeling to generate alternatives; 0 = not active; 1 = active. Note: produces a single solution as output
ModelingtoGenerateAlternativeSlack: 0.1 # Slack value as a fraction of least-cost objective in budget constraint used for evaluating alternative model solutions; positive float value
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#MacOrWindows: Mac # Set to either "Mac" (also works for Linux) or "Windows" to ensure use of proper file directory separator "\" or "/
OverwriteResults: 0 # Overwrite existing results in output folder or create a new one; 0 = create new folder; 1 = overwrite existing results
PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active
SystemCO2Constraint: 1 # CO2 emissions constraint representation; 1 = Separate emissions constraint for HSC and Power; 2 = Combined emissions constraint for HSC and Power sectors (i.e. allow trading, with constraint form adopted from genx_settings)
SystemCO2Constraint: 0 # CO2 emissions constraint representation; 1 = Separate emissions constraint for HSC and Power; 2 = Combined emissions constraint for HSC and Power sectors (i.e. allow trading, with constraint form adopted from genx_settings)
Solver: Gurobi # Available solvers: Gurobi, CPLEX, CLP, Cbc
WriteShadowPrices: 1 # Write shadow prices of LP or relaxed MILP; 0 = not active; 1 = active
OperationWrapping: 1 # Sets temporal resolution of the model; 0 = single period to represent the full year, with first-last time step linked; 1 = multiple representative periods
TimeDomainReductionFolder: "TDR_Results" # Directory name where results from time domain reduction will be saved. If results already exist here, these will be used without running time domain reduction script again.
TimeDomainReduction: 1 # Time domain reduce (i.e. cluster) inputs based on Load_data.csv, Generators_variability.csv, and Fuels_data.csv; 0 = not active (use input data as provided); 1 = active (cluster input data, or use data that has already been clustered)

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
ModelH2: 1 #Flag to turn or off Hydrogen Supply Chain modelling capabilities - 0 - no HSC, 1- HSC modeled
H2PipeInteger: 0 # Whether to model pipeline capacity as discrete or integer - 0 - continuous capacity, 1- discrete capacity
ModelH2Pipelines: 1 # Whether to model pipeline in hydrogen supply chain - 0 - not included, 1 - included
ModelH2Trucks: 1 # Whether to model truck in hydrogen supply chain - 0 - not included, 1 - included
ModelH2Trucks: 0 # Whether to model truck in hydrogen supply chain - 0 - not included, 1 - included
H2GenCommit: 0 # Continuous or discrete capacity representation of H2 production technologies with unit commitment; 0 = modeled as continuous variables; 1 = modeled as integer variables;
H2NetworkExpansion: 1 # Transmission network expansional; 0 = not active; 1 = active systemwide
H2CO2Cap: 1 # CO2 emissions cap for HSC only; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = load + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint; 4 = emissions penalized via a carbon price
H2G2PCommit: 1 #1 for unit commitment G2P representation, 0 continuous representation of H2 G2P tech

H2CO2Cap: 0 # CO2 emissions cap for HSC only; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = load + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint; 4 = emissions penalized via a carbon price
H2G2PCommit: 0 #1 for unit commitment G2P representation, 0 continuous representation of H2 G2P tech
Loading