Skip to content

Commit

Permalink
Update docs with new Tutorials (#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmutic authored Apr 19, 2024
1 parent 1102d32 commit 5ba4830
Show file tree
Hide file tree
Showing 52 changed files with 5,733 additions and 114 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- New settings parameter MGAAnnualGeneration to switch between different MGA formulations (#681)
- Add validation for `Can_Retire` column in multi-stage GenX since the current implementation
does not allow a resource to switch from can_retire = 0 to can_retire = 1 between stages. (#683)
- Add tutorials for running GenX (#637 and #685)

### Fixed
- Set MUST_RUN=1 for RealSystemExample/small_hydro plants (#517).
Expand Down
39 changes: 23 additions & 16 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import DataStructures: OrderedDict

DocMeta.setdocmeta!(GenX, :DocTestSetup, :(using GenX); recursive = true)

pages = OrderedDict("Welcome Page" => [
pages = OrderedDict(
"Welcome Page" => [
"GenX: Introduction" => "index.md",
"Installation Guide" => "installation.md",
"Limitation of GenX" => "limitations_genx.md",
"Third Party Extensions" => "third_party_genx.md",
"Third Party Extensions" => "third_party_genx.md"
],
"Getting Started" => [
"Running GenX" => "Getting_Started/examples_casestudies.md",
"Commertial solvers" => "Getting_Started/commercial_solvers.md",
"Commertial solvers" => "Getting_Started/commercial_solvers.md"
],
"Tutorials" => [
"Tutorials Overview" => "Tutorials/Tutorials_intro.md",
Expand All @@ -21,7 +22,9 @@ pages = OrderedDict("Welcome Page" => [
"Tutorial 3: K-Means and Time Domain Reduction" => "Tutorials/Tutorial_3_K-means_time_domain_reduction.md",
"Tutorial 4: Model Generation" => "Tutorials/Tutorial_4_model_generation.md",
"Tutorial 5: Solving the Model" => "Tutorials/Tutorial_5_solve_model.md",
"Tutorial 6: Post Processing" => "Tutorials/Tutorial_6_solver_settings.md",
"Tutorial 6: Solver Settings" => "Tutorials/Tutorial_6_solver_settings.md",
"Tutorial 7: Policy Constraints" => "Tutorials/Tutorial_7_setup.md",
"Tutorial 8: Outputs" => "Tutorials/Tutorial_8_outputs.md"
],
"User Guide" => [
"Overall workflow" => "User_Guide/workflow.md",
Expand All @@ -35,13 +38,13 @@ pages = OrderedDict("Welcome Page" => [
"Slack Variables for Policies" => "User_Guide/slack_variables_overview.md",
"Method of Morris Inputs" => "User_Guide/methodofmorris_input.md",
"Running the Model" => "User_Guide/running_model.md",
"Model Outputs" => "User_Guide/model_output.md",
"Model Outputs" => "User_Guide/model_output.md"
],
"Model Concept and Overview" => [
"Model Introduction" => "Model_Concept_Overview/model_introduction.md",
"Notation" => "Model_Concept_Overview/model_notation.md",
"Objective Function" => "Model_Concept_Overview/objective_function.md",
"Power Balance" => "Model_Concept_Overview/power_balance.md",
"Power Balance" => "Model_Concept_Overview/power_balance.md"
],
"Model Reference" => [
"Core" => "Model_Reference/core.md",
Expand All @@ -50,7 +53,7 @@ pages = OrderedDict("Welcome Page" => [
"Flexible Demand" => "Model_Reference/Resources/flexible_demand.md",
"Hydro" => [
"Hydro Reservoir" => "Model_Reference/Resources/hydro_res.md",
"Long Duration Hydro" => "Model_Reference/Resources/hydro_inter_period_linkage.md",
"Long Duration Hydro" => "Model_Reference/Resources/hydro_inter_period_linkage.md"
],
"Must Run" => "Model_Reference/Resources/must_run.md",
"Retrofit" => "Model_Reference/Resources/retrofit.md",
Expand All @@ -61,17 +64,17 @@ pages = OrderedDict("Welcome Page" => [
"Long Duration Storage" => "Model_Reference/Resources/long_duration_storage.md",
"Storage All" => "Model_Reference/Resources/storage_all.md",
"Storage Asymmetric" => "Model_Reference/Resources/storage_asymmetric.md",
"Storage Symmetric" => "Model_Reference/Resources/storage_symmetric.md",
"Storage Symmetric" => "Model_Reference/Resources/storage_symmetric.md"
],
"Co-located VRE and Storage" => "Model_Reference/Resources/vre_stor.md",
"Thermal" => [
"Thermal" => "Model_Reference/Resources/thermal.md",
"Thermal Commit" => "Model_Reference/Resources/thermal_commit.md",
"Thermal No Commit" => "Model_Reference/Resources/thermal_no_commit.md",
"Thermal No Commit" => "Model_Reference/Resources/thermal_no_commit.md"
],
"Hydrogen Electrolyzers" => "Model_Reference/Resources/electrolyzers.md",
"Scheduled maintenance for various resources" => "Model_Reference/Resources/maintenance.md",
"Resource types" => "Model_Reference/Resources/resource.md",
"Resource types" => "Model_Reference/Resources/resource.md"
],
"Maintenance" => "Model_Reference/maintenance_overview.md",
"Policies" => "Model_Reference/policies.md",
Expand All @@ -86,15 +89,16 @@ pages = OrderedDict("Welcome Page" => [
"Multi-Stage Modeling Introduction" => "Model_Reference/Multi_Stage/multi_stage_overview.md",
"Configure multi-stage inputs" => "Model_Reference/Multi_Stage/configure_multi_stage_inputs.md",
"Model multi stage: Dual Dynamic Programming Algorithm" => "Model_Reference/Multi_Stage/dual_dynamic_programming.md",
"Endogenous Retirement" => "Model_Reference/Multi_Stage/endogenous_retirement.md",
"Endogenous Retirement" => "Model_Reference/Multi_Stage/endogenous_retirement.md"
],
"Method of Morris" => "Model_Reference/methodofmorris.md",
"Utility Functions" => "Model_Reference/utility_functions.md",
"Utility Functions" => "Model_Reference/utility_functions.md"
],
"Public API Reference" => [
"Public API" => "Public_API/public_api.md"],
"Third Party Extensions" => "additional_third_party_extensions.md",
"Developer Docs" => "developer_guide.md")
"Developer Docs" => "developer_guide.md"
)

# Build documentation.
# ====================
Expand All @@ -108,8 +112,10 @@ makedocs(;
canonical = "https://genxproject.github.io/GenX.jl/stable",
assets = ["assets/genx_style.css"],
sidebar_sitename = false,
collapselevel = 1),
pages = [p for p in pages])
collapselevel = 1
),
pages = [p for p in pages]
)

# Deploy built documentation.
# ===========================
Expand All @@ -122,4 +128,5 @@ deploydocs(;
devurl = "dev",
push_preview = true,
versions = ["stable" => "v^", "v#.#.#", "dev" => "dev"],
forcepush = false)
forcepush = false
)
16 changes: 5 additions & 11 deletions docs/src/Tutorials/Tutorial_1_configuring_settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ To see how changing the settings affects the outputs, see Tutorials 3 and 7.

Below is the settings file for `example_systems/1_three_zones`:

```@raw html
<img src="./files/genxsettings.png" align="center"/>
```
![png](./files/genxsettings.png)

All `genx_settings.yml` files in `Example_Systems` specify most parameters. When configuring your own settings, however, it is not necessary to input all parameters as defaults are specified for each one in `configure_settings.jl`.
All `genx_settings.yml` files in `example_systems` specify most parameters. When configuring your own settings, however, it is not necessary to input all parameters as defaults are specified for each one in `configure_settings.jl`.

```@raw html
<img src="./files/default_settings.png" align="center">
```
![png](./files/default_settings.png)

To open `genx_settings.yml` in Jupyter, use the function `YAML.load(open(...))` and navigate to file in the desired directory:

Expand Down Expand Up @@ -69,11 +65,9 @@ YAML.write_file("example_systems/1_three_zones/settings/genx_settings.yml", new_

The empty file will look like this:

```@raw html
<img src="./files/genx_settings_none.png" align="center">
```
![png](./files/genx_settings_none.png)

Now, we run GenX and output the file `capacity.csv` from the `Results` folder. To do this, we use the function `include`, which takes a .jl file and runs it in jupyter notebook:
Now, we run GenX and output the file `capacity.csv` from the `results` folder. To do this, we use the function `include`, which takes a .jl file and runs it in jupyter notebook:


```julia
Expand Down
7 changes: 3 additions & 4 deletions docs/src/Tutorials/Tutorial_2_network_visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ network = CSV.read("example_systems/1_three_zones/system/Network.csv",DataFrame,

MA, CT, and ME are the abbreviations for states Massachusetts, Connecticut, and Maine. However, since the US region of New England contains other states as well, MA in this case is also used to refer to those states.

Columns `Start_Zone` and `End_Zone` specify the network of the three regions. In this case, there are only two network lines, specified in the `Network_Lines` columns. The `Start_Zone` column indicates that the first node, MA, is the source of both lines as both rows have value 1. Rows `z1` and `z2` have values of 2 and 3 in `End_Zone`, which means both nodes CT and ME recieve energy from node MA. This is also indicated in the column `transmission_path_name'.
Columns `Start_Zone` and `End_Zone` specify the network of the three regions. In this case, there are only two network lines, specified in the `Network_Lines` columns. The `Start_Zone` column indicates that the first node, MA, is the source of both lines as both rows have value 1. Rows `z1` and `z2` have values of 2 and 3 in `End_Zone`, which means both nodes CT and ME recieve energy from node MA. This is also indicated in the column `transmission path name'.

Below is a visualization of the network:

```@raw html
<img src="./files/new_england.png" style="width: 600px; height: auto" >
```
![png](./files/new_england.png)

Loading

0 comments on commit 5ba4830

Please sign in to comment.