forked from GenXProject/GenX.jl
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor docs structure. Not deploying yet.
- Loading branch information
Showing
54 changed files
with
1,647 additions
and
1,751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
using GenX | ||
|
||
run_genx_case!(dirname(@__FILE__)) | ||
run_genx_case!(dirname(@__FILE__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
[deps] | ||
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
GenX = "5d317b1e-30ec-4ed6-a8ce-8d2d88d7cfac" | ||
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" | ||
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Time Domain Reduction (TDR) | ||
|
||
```@autodocs | ||
Modules = [GenX] | ||
Pages = ["time_domain_reduction.jl"] | ||
Order = [:type, :function] | ||
``` | ||
|
||
```@docs | ||
GenX.run_timedomainreduction! | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Time-domain reduction | ||
|
||
Modeling grid operations for each hour of the year can be computationally expensive for models with many zones and resources. Time-domain reduction is often employed in capacity expansion models as a way to balance model spatial and temporal resolution as well as representation of dispatch, while ensuring reasonable computational times. GenX allows the option of performing time-domain reduction on the user supplied time-series input data to produce a representative time series at the desired level of temporal resolution. The below table summarizes the list of parameters to be specified by the user to perform the time domain reduction implemented in GenX. These parameters are passed to GenX via the YAML file `time_domain_reduction_settings.yml`. | ||
|
||
**Structure of the time\_domain\_reduction.yml file** | ||
|
||
|**Key** | **Description**| | ||
| :------------ | :-----------| | ||
|Timesteps\_per\_period | The number of timesteps (e.g., hours) in each representative period (i.e. 168 for weeks, 24 for days, 72 for three-day periods, etc).| | ||
|UseExtremePeriods | 1 = Include outliers (by performance or demand/resource extreme) as their own representative extreme periods. This setting automatically includes periods based on criteria outlined in the dictionary `ExtremePeriods`. Extreme periods can be selected based on following criteria applied to demand profiles or solar and wind capacity factors profiles, at either the zonal or system level. A) absolute (timestep with min/max value) statistic (minimum, maximum) and B) integral (period with min/max summed value) statistic (minimum, maximum). For example, the user could want the hour with the most demand across the whole system to be included among the extreme periods. They would select Demand, System, Absolute, and Max.| | ||
||0 = Do not include extreme periods.| | ||
|ExtremePeriods | If **UseExtremePeriods = 1**, use this dictionary to select which types of extreme periods to use. Select by profile type (Demand, PV, or Wind), geography (Zone or System), grouping by timestep or by period (Absolute or Integral), and statistic (Maximum or Minimum).| | ||
|ClusterMethod |Either `kmeans` or `kmedoids`, the method used to cluster periods and determine each time step's representative period.| | ||
|ScalingMethod |Either `N` or `S`, the decision to normalize ([0,1]) or standardize (mean 0, variance 1) the input data prior to clustering.| | ||
|MinPeriods |The minimum number of representative periods used to represent the input data. If using UseExtremePeriods, this must be greater or equal to the number of selected extreme periods. If `IterativelyAddPeriods` is off, this will be the total number of representative periods.| | ||
|MaxPeriods| The maximum number of representative periods - both clustered and extreme - that may be used to represent the input data.| | ||
|IterativelyAddPeriods |1 = Add representative periods until the error threshold between input data and represented data is met or the maximum number of representative periods is reached.| | ||
||0 = Use only the minimum number of representative periods. This minimum value includes the selected extreme periods if `UseExtremePeriods` is on.| | ||
|Threshold |Iterative period addition will end if the period farthest from its representative period (as measured using Euclidean distance) is within this percentage of the total possible error (for normalization) or 95% of the total possible error (± 2 σ for standardization). E.g., for a threshold of 0.01, each period must be within 1% of the spread of possible error before the clustering iterations will terminate (or until the maximum is reached).| | ||
|IterateMethod | Either ‘cluster' (Default) or ‘extreme', whether to increment the number of clusters to the kmeans/kmedoids method or to set aside the worst-fitting periods as a new extreme periods.| | ||
|nReps |Default = 200, the number of kmeans/kmedoids repetitions at the same setting.| | ||
|DemandWeight| Default = 1, a multiplier on demand columns to optionally prioritize better fits for demand profiles over resource capacity factor or fuel price profiles.| | ||
|WeightTotal |Default = 8760, the sum to which the relative weights of representative periods will be scaled.| | ||
|ClusterFuelPrices| Either 1 or 0, whether or not to use the fuel price time series in `Fuels_data.csv` in the clustering process. If 'no', this function will still write `Fuels_data.csv` in the TimeDomainReductionFolder with reshaped fuel prices based on the number and size of the representative periods but will not use the fuel price time series for selection of representative periods.| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Time Domain Reduction (TDR) | ||
|
||
Rather than modeling and optimizing power grid operations at a high temporal resolution (e.g., hourly, over a full year) while evaluating new capacity investments, which can be computationally expensive for large-scale studies with several resources, it may be useful to consider a reduced temporal resolution to model annual grid operations. | ||
Such a time-domain reduction is often employed in capacity expansion models as a way to balance model spatial and temporal resolution as well as representation of dispatch, while ensuring reasonable computational times. | ||
The time-domain reduction method provided allows the user to automate these features while specifying the various parameters of the time-domain reduction 'clustering' algorithm to be used in formulating the resulting optimization model. | ||
|
||
### Running a case with Time Domain Reduction | ||
|
||
There are two ways to run a case with a reduced (e.g. less than full-year) temporal resolution. | ||
1. Let GenX perform the time domain reduction before optimizing. | ||
2. Bring your own clustered data | ||
|
||
It's also possible for GenX perform clustering separately from the optimization task. Check out the [Running the TDR](@ref) section for more information. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Using commercial solvers: Gurobi or CPLEX | ||
|
||
If you want to use the commercial solvers Gurobi or CPLEX: | ||
|
||
- Make sure you have a valid license and the actual solvers for either of Gurobi or CPLEX installed on your machine | ||
- Add Gurobi or CPLEX to the Julia Project. | ||
|
||
``` | ||
$ julia --project=/home/youruser/GenX | ||
julia> <press close-bracket ] to access the package manager> | ||
(GenX) pkg> add Gurobi | ||
-or- | ||
(GenX) pkg> add CPLEX | ||
``` | ||
```@meta | ||
#TODO: Add instructions for adding Gurobi or CPLEX to the Julia Project with the new PR. | ||
``` | ||
|
||
- Set the appropriate solver in the genx_settings.yml file of your case | ||
|
||
!!! warning "Warning" | ||
Note that if you have not already installed the required Julia packages or you do not have a valid Gurobi license on your host machine, you will receive an error message and Run.jl will not run to completion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.