diff --git a/NEWS.md b/NEWS.md index dc2be6d..e7b6b9c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,12 +1,13 @@ # Release notes -## Unversioned +## Version 0.5.16 (2025-09-24) ### Enhancement * Enable reading model results from files by enabling `model::String` being the directory to the saved files instead of `model::JuMP.Model`. Note that the files can be generated by `EnergyModelsGUI.save_results(model::JuMP.model)`. * Enhance the descriptive names for nodes having dictionaries with keys of type Resource as in the `MultipleBuildingTypes`-node in `EnergyModelsLanguageInterfaces.jl`. -* Enhance visualization of plots over OperationalPeriods having a constant non-zero value. +* Enhance visualization of plots over `OperationalPeriod`s having a constant non-zero value. +* Improved the cross references in the documentation and added how to show results from a model run. ### Adjustment diff --git a/Project.toml b/Project.toml index 9ed2dae..1ae8bda 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "EnergyModelsGUI" uuid = "737a7361-d3b7-40e9-b1ac-59bee4c5ea2d" authors = ["Jon Vegard VenĂ¥s ", "Magnus Askeland ", "Shweta Tiwari "] -version = "0.5.15" +version = "0.5.16" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" diff --git a/docs/src/figures/EMI_geography_Oslo.png b/docs/src/figures/EMI_geography_Oslo.png index 294bc9d..5203a95 100644 Binary files a/docs/src/figures/EMI_geography_Oslo.png and b/docs/src/figures/EMI_geography_Oslo.png differ diff --git a/docs/src/how-to/customize-colors.md b/docs/src/how-to/customize-colors.md index 967bac1..45eb551 100644 --- a/docs/src/how-to/customize-colors.md +++ b/docs/src/how-to/customize-colors.md @@ -1,4 +1,4 @@ -# [Customize colors](@id customize_colors) +# [Customize colors](@id how_to-cust_colors) EnergyModelsGUI provides a set of colors for a set of frequently used `Resource`-`id`s. These can be found in `src/colors.yml` and are visualized below diff --git a/docs/src/how-to/customize-descriptive_names.md b/docs/src/how-to/customize-descriptive_names.md index 3180f39..f615649 100644 --- a/docs/src/how-to/customize-descriptive_names.md +++ b/docs/src/how-to/customize-descriptive_names.md @@ -1,33 +1,35 @@ -# [Customize descriptive_names](@id customize_descriptive_names) +# [Customize descriptive_names](@id how_to-cust_desc_names) -EnergyModelsGUI provides a set of descriptive names for case input structures and assosiated JuMP variables. -These can be found in `src/descriptive_names.yml`. These descriptions are extended/overwritten with EMX +`EnergyModelsGUI` provides a set of descriptive names for case input structures and assosiated JuMP variables. +These can be found in `src/descriptive_names.yml`. These descriptions are extended/overwritten with EMX packages having a `descriptive_names.yml` file in a `ext/EMGUIExt` folder of its repository. That is, -if you want to provide descriptive names for your EMX package, add a `.yml` file in this location, with the +if you want to provide descriptive names for your EMX package, add a `.yml` file in this location, with the same structure as `src/descriptive_names.yml`. -It can be convenient to provide a user defined file in addition. If you have this file located at -`path_to_descriptive_names`, simply add it using +It can be convenient to provide a user defined file in addition. +If you have this file located at `path_to_descriptive_names`, simply add it using + ```julia gui = GUI(case; path_to_descriptive_names=path_to_descriptive_names) ``` If you instead (or in addition) want to provide descriptive names through a `Dict`, this can be done as follows + ```julia descriptive_names_dict = Dict( :structures => Dict( # Input parameter from the case Dict :RefStatic => Dict( - :trans_cap => "New description for trans_cap", - :opex_fixed => "New description for opex_fixed", + :trans_cap => "New description for `trans_cap`", + :opex_fixed => "New description for `opex_fixed`", ), :RefDynamic => Dict( - :opex_var => "New description for opex_var", - :directions => "New description for directions", + :opex_var => "New description for `opex_var`", + :directions => "New description for `directions`", ), ), :variables => Dict( # variables from the JuMP model - :stor_discharge_use => "New description for stor_discharge_use", - :trans_cap_rem => "New description for trans_cap_rem", + :stor_discharge_use => "New description for `stor_discharge_use`", + :trans_cap_rem => "New description for `trans_cap_rem`", ), ) gui = GUI( @@ -36,9 +38,12 @@ gui = GUI( descriptive_names_dict=descriptive_names_dict, ) ``` + The variables for `total` quantities (and their descriptions) can be customized in the same manner (see structure in the `src/descriptive_names.yml` file). -It is also possible to ignore certain `JuMP` variables. *E.g.*, ignoring `cap_use` and `flow_in` (in addition to the variable `con_em_tot` which is ignored by default) can be done as follows +It is also possible to ignore certain `JuMP` variables. +As an example, `cap_use` and `flow_in` (in addition to the variable `con_em_tot` which is ignored by default) can be ignored through: + ```julia gui = GUI( case; @@ -47,11 +52,12 @@ gui = GUI( descriptive_names_dict=Dict(:ignore => ["con_em_tot", "cap_use", "flow_in"]), ) ``` -You can similarly customize variables that indicates an investment has occured `investment_indicators` the default variables are -``` - - cap_add - - trans_cap_add - - stor_level_add - - stor_charge_add - - stor_discharge_add -``` + +You can similarly customize variables that indicate an investment has occured through the values of the key `:investment_indicators` in the keyword argument `descriptive_names_dict`. +The default variables are which indicate investments are + +- ``\texttt{cap\_add}`` for all nodes except for [`Storage`](@extref EnergyModelsBase.Storage), +- ``\texttt{stor\_level\_add}`` for all [`Storage`](@extref EnergyModelsBase.Storage) nodes, +- ``\texttt{stor\_charge_\_add}`` for all [`Storage`](@extref EnergyModelsBase.Storage) nodes with charge capacity, +- ``\texttt{stor\_discharge\_add}`` for all [`Storage`](@extref EnergyModelsBase.Storage) nodes with discharge capacity, and +- ``\texttt{trans\_cap\_add}`` for all transmission modes. diff --git a/docs/src/how-to/customize-icons.md b/docs/src/how-to/customize-icons.md index fec8015..be20dcd 100644 --- a/docs/src/how-to/customize-icons.md +++ b/docs/src/how-to/customize-icons.md @@ -1,8 +1,9 @@ -# [Customize icons](@id customize_icons) +# [Customize icons](@id how_to-cust_icons) EnergyModelsGUI provides default icon generation for `Node`s and `Area`s, but these "icons" can be customized by the users. You can define an icon based on a `Node` `id` or by types. To do this you need to specify the `id_to_icon_map` option in the `GUI` function. + Say that you want to specify default icons for the types `Source`, `NetworkNode` and `Sink`, and you want to have a special icon for the `Node` with `id` `7`, then simply do the following ```julia @@ -23,4 +24,4 @@ gui = GUI(case; id_to_icon_map=id_to_icon_map); If the string provided is a full path to a .png file, the GUI will use this file. If the string is simply the name of the file (without the .png ending) as above, the GUI will first look for a file in a folder `../icons`. If it is not provided here, it will look in the `ext/EMGUIExt/icons/` folder in the EMX repositories. -If the icon is not found here either, it will fall back to the default icon generation mention earlier (based on simple shapes like circle for `Sink`s and squares for `Source`s and colored by input/output colors). +If the icon is not found here either, it will fall back to the default icon generation mentioned earlier (based on simple shapes like circle for `Sink`s and squares for `Source`s and colored by input/output colors). diff --git a/docs/src/how-to/export-results.md b/docs/src/how-to/export-results.md index ff702b2..6432d24 100644 --- a/docs/src/how-to/export-results.md +++ b/docs/src/how-to/export-results.md @@ -1,7 +1,7 @@ -# [Export results](@id export_results) +# [Export results](@id how_to-export_res) The GUI enables simple printing of the results to the REPL, but one can also export to file. -In order to do this, you needs to provide the path to which the files can be exported. +In order to do this, you need to provide the path to which the files can be exported. This is done with the keyword input argument `path_to_results` as follows ```julia diff --git a/docs/src/how-to/save-design.md b/docs/src/how-to/save-design.md index 0b98a46..29115a8 100644 --- a/docs/src/how-to/save-design.md +++ b/docs/src/how-to/save-design.md @@ -1,7 +1,7 @@ -# [Save design to file](@id save_design) +# [Save design to file](@id how_to-save_design) EnergyModelsGUI enables an interactive framework for moving nodes in a topology which can be saved to file. -To save the coordinates to file the `design_path` argument must be provided as follows +To save the coordinates to file, the `design_path` argument must be provided as ```julia gui = GUI(case; design_path); diff --git a/docs/src/library/internals/reference.md b/docs/src/library/internals/reference.md index dfb931b..803853e 100644 --- a/docs/src/library/internals/reference.md +++ b/docs/src/library/internals/reference.md @@ -1,12 +1,12 @@ -# Internals +# [Internals](@id lib-int) -## Index +## [Index](@id lib-int-idx) ```@index Pages = ["reference.md"] ``` -## Types +## [Types](@id lib-int-types) ```@autodocs Modules = [EnergyModelsGUI] @@ -14,7 +14,7 @@ Public = false Order = [:type] ``` -## Methods +## [Functions](@id lib-int-fun) ```@autodocs Modules = [EnergyModelsGUI] diff --git a/docs/src/library/public.md b/docs/src/library/public.md index 5e17b91..457ce11 100644 --- a/docs/src/library/public.md +++ b/docs/src/library/public.md @@ -1,30 +1,23 @@ -# [Public interface](@id sec_lib_public) +# [Public interface](@id lib-pub) -## GUI constructor +## [Constructor](@id lib-pub-const) ```@docs -EnergyModelsGUI.GUI(case::Case; kwargs...) +GUI(case::Case; kwargs...) +EnergySystemDesign(system::EnergyModelsGUI.AbstractSystem) ``` -## EnergySystemDesign constructor +## [Types](@id lib-pub-types) ```@docs -EnergyModelsGUI.EnergySystemDesign(system::EnergyModelsGUI.AbstractSystem) +EnergySystemDesign +GUI ``` -## Structures +## [Utilities](@id lib-pub-utils) ```@docs -EnergyModelsGUI.EnergySystemDesign -EnergyModelsGUI.GUI -``` - -## Utilities - -```@docs -EnergyModelsGUI.set_colors -``` - -```@docs -EnergyModelsGUI.set_icons +save_results +set_colors +set_icons ``` diff --git a/docs/src/manual/philosophy.md b/docs/src/manual/philosophy.md index abe7a8b..be1ddf6 100644 --- a/docs/src/manual/philosophy.md +++ b/docs/src/manual/philosophy.md @@ -1,18 +1,18 @@ -# Philosophy +# [Philosophy](@id man-phil) -## General design philosophy +## [General design philosophy](@id man-phil-gen) One key aim in the development of `EnergyModelsGUI` was to create a graphical user interface that 1. visualizes the topology and result from `EnergyModelsX`, -2. draws inspiration from the [integrate](https://www.sintef.no/programvare/integrate/) framework for visualization of energy systems, and +2. draws inspiration from the *[Integrate](https://www.sintef.no/programvare/integrate/)* framework for visualization of energy systems, and 3. has a simple architecture that minimizes dependencies on major packages. `EnergyModelsGUI` is hence focusing of providing the user with a simple interface to both visualize the created energy system and the results, if a `JuMP.model` is added. Its aim is not to provide the user with an input processing routine or a method for generating figures that can be directly used in publications. -## Incorporation of `EnergyModelsGUI` to your `EMX` extension package +## [Incorporation of `EnergyModelsGUI` to your `EMX` extension package](@id man-phil-ext) `EnergyModelsGUI` should by default be able to work with potential extension packages as it is only dependent on the case dictionary description and the variable names. However, you can provide an extension to `EnergyModelsGUI` in your `EMX` package with, *e.g.*, specific icons for the developed nodes. -In addition, if your package introduces new variables, you can provide a description of the variables in your package. \ No newline at end of file +In addition, if your package introduces new variables, you can provide a description of the variables in your package. diff --git a/docs/src/manual/quick-start.md b/docs/src/manual/quick-start.md index f657a2f..eb189ed 100644 --- a/docs/src/manual/quick-start.md +++ b/docs/src/manual/quick-start.md @@ -1,16 +1,23 @@ -# Quick Start +# [Quick Start](@id man-quick) -> 1. Install the most recent version of [Julia], preferably using the Juliaup version multiplexer (https://github.com/JuliaLang/juliaup) -> 2. Install the package [`EnergyModelsGUI`](https://energymodelsx.github.io/EnergyModelsGUI.jl/) by running: -> ``` -> ] add EnergyModelsGUI -> ``` +## [Installation](@id man-quick-install) + +> 1. Install the most recent version of [Julia], preferably using the Juliaup version multiplexer () +> 2. Install the package [`EnergyModelsGUI`](https://energymodelsx.github.io/EnergyModelsGUI.jl/) by running: +> +> ``` +> ] add EnergyModelsGUI +> ``` + +## [Use](@id man-quick-use) !!! note - Utilizing `EnergyModelsGUI` requires the declaration of cases in `EnergyModelsX`. + `EnergyModelsGUI` extends `EnergyModelsBase` with a graphical user interface. + As a consequence, it requires the declaration of a [`Case`](@extref EnergyModelsBase.Case) in `EnergyModelsX`. + To this end, you also have to add the packages [`EnergyModelsBase`](https://energymodelsx.github.io/EnergyModelsBase.jl/stable/) and potentially [`EnergyModelsGeography`](https://energymodelsx.github.io/EnergyModelsGeography.jl/stable/) and [`EnergyModelsInvestments`](https://energymodelsx.github.io/EnergyModelsInvestments.jl/stable/) to create your energy model cases first. -If you already have constructed a `case` in EMX you can view this case with +If you already have constructed a [`Case`](@extref EnergyModelsBase.Case) in `EMX` you can view this case with ```julia using EnergyModelsGUI @@ -18,4 +25,37 @@ using EnergyModelsGUI GUI(case) ``` -A complete overview of the keyword arguments available for the `GUI` functions is available [`here`](@ref GUI(::Dict)). The GUI and its functionality is described through an example [`here`](@ref simple-example). \ No newline at end of file +This allows you to investigate all provided parameters, but does not show you the results from the analysis. +The results from a `JuMP` model can be visualized through the keyword argument `model` for a given `JuMP` model `m`: + +```julia +GUI(case; model=m) +``` + +It is furthermore possible to visualize results from a saved model run. +This however requires you to first save the results from a model run through the function [`save_results`](@ref). +You can then visualize the results from a saved model run, again with the keyword argument `model`. + +For a given `JuMP` model `m`, this approach is given by + +```julia +# Specify the directory for saving the results and save the results +dir_save = `path-to-results` +save_results(m; directory = dir_save) + +# Load the results from the saved directory +GUI(case; model = dir_save) +``` + +!!! warning "Requirements for loading from file" + + 1. You **must** always provide a [`Case`](@extref EnergyModelsBase.Case) in `EnergyModelsX` corresponding to the model results when reading input data. + This case can be created anew from corresponding functions. + It **cannot** be a saved `Case` as the pointers to specific instances of, *e.g.*, `Link`s are not recreated when loading a `Case`. + 2. You **must** use the function `save_results` for saving your results as we require the meta data when reading the CSV files for translating the data into the correct format. + +A complete overview of the keyword arguments available for the `GUI` functions is available *[in its docstring](@ref GUI(case::Case; kwargs...))*. + +!!! tip "Example" + The GUI and its functionality is described through *[an example](@ref man-exampl)*. + You can also load different examples from the folder, if desired diff --git a/docs/src/manual/simple-example.md b/docs/src/manual/simple-example.md index 163116a..0653adb 100644 --- a/docs/src/manual/simple-example.md +++ b/docs/src/manual/simple-example.md @@ -1,21 +1,10 @@ -# [Example with functionality overview](@id simple-example) +# [Example with functionality overview](@id man-exampl) -For the content of the individual examples, see the [examples](https://github.com/EnergyModelsX/EnergyModelsGUI.jl/tree/main/examples) directory in the project repository. - -## Installing the package - -Enter Julia package mode (press `]`) and run: -```pkg -add EnergyModelsGUI -``` - -It might take a few minutes to install. - -Then press `BACKSPACE` to exit package mode. +For the content of the individual examples, see the *[examples](https://github.com/EnergyModelsX/EnergyModelsGUI.jl/tree/main/examples)* directory in the project repository. ## Running the GUI -From the Julia REPL (*i.e*, command-line in julia; `julia> `), run +From the Julia REPL (*i.e*, command-line in julia; `julia>`), run ```julia # Starts the Julia REPL @@ -38,58 +27,78 @@ You should then get the following GUI: !!! note "Left visualization area" The left fraction of the window shows a visualization of the topology with the following functionality: - 1. You can move a `Node`/`Area` by holding down the left mouse button and dragging to the desired location (at which you then release the left mouse button). The `Links`/`Transmissions` to this `Node`/`Area` will be updated as well. All nodes associated with an area moves correspondingly when moving an `Area` object. The `Area` objects are indicated by double line edges as in the example below (each city is an `Area`). A selected `Node`/`Area` can also be moved using the arrow keys. - 2. Selecting a `Node`/`Area`/`Link`/`Transmission` (by left-clicking) will print information about this object in the box on the top right. The selected object will have a green line style. + 1. You can move a `Node`/`Area` by holding down the left mouse button and dragging to the desired location (at which you then release the left mouse button). + The `Links`/`Transmissions` to this `Node`/`Area` will be updated as well. + All nodes associated with an area moves correspondingly when moving an `Area` object. + The `Area` objects are indicated by double line edges as in the example below (each city is an `Area`). + A selected `Node`/`Area` can also be moved using the arrow keys. + 2. Selecting a `Node`/`Area`/`Link`/`Transmission` (by left-clicking) will print information about this object in the box on the top right. + The selected object will have a green line style. 3. You can select multiple nodes/areas by holding down `ctrl` and left-clicking. 4. You can change the focus area (pan) of the window by holding down the right mouse button and dragging. 5. You can zoom in and out by using the scroll wheel on the mouse. 6. Hovering over a component will show the name and its type (and investments if it has occured). - 7. A Transmission mode from the `EnergyModelsGeography` package will be dashed if it contains investment data (as can be seen in the example above from, i.e., Oslo to Bergen). A `Node` will have dashed edges if it contains investment data and the same for assosiated `Link`s. + 7. A Transmission mode from the `EnergyModelsGeography` package will be dashed if it contains investment data (as can be seen in the example above from, *i.e.*, Oslo to Bergen). + A `Node` will have dashed edges if it contains investment data and the same for assosiated `Link`s. 8. The legend box of `Resource`s shows an overview of all resources in `case[:Products]`. 9. The upper-left label indicates at which level of the topology you are at (`top_level` is an overview of all `Area`s). !!! note "Top left toolbar" The toolbar on top left of the window provides the following functionality: - 1. `back`: If currently in an area (opened by the `open` button, see below), navigate back to the `Top level` . This button has the keyboard shortcut `MouseButton4` (or `Esc`). Note: This functionality only works when using the `EnergyModelsGeography` package, as in this example. - 2. `open`: Open an area by first selecting the area to open and then clicking this button. This button has the keyboard shortcut `space`. Opening an area can also be accomplished by double clicking the area icon. Note: This functionality only works when using the `EnergyModelsGeography` package, as in this example. + 1. `back`: If currently in an area (opened by the `open` button, see below), navigate back to the `Top level`. + This button has the keyboard shortcut `MouseButton4` (or `Esc`). + **Note**: This functionality only works when using the `EnergyModelsGeography` package, as in this example. + 2. `open`: Open an area by first selecting the area to open and then clicking this button. + This button has the keyboard shortcut `space`. Opening an area can also be accomplished by double clicking the area icon. + **Note**: This functionality only works when using the `EnergyModelsGeography` package, as in this example. 3. `align horz.`: Align selected nodes/areas horizontally. 4. `align vert.`: Align selected nodes/areas vertically. - 5. `save`: Save the coordinates of the `Node`s/`Area`s to file (if there are multiple areas, a file for each area in addition to a file for the `Top level`). The location of these files can be assigned through the `design_path` input parameter to the `GUI` function (this feature has the shortcut `ctrl+s`). + 5. `save`: Save the coordinates of the `Node`s/`Area`s to file (if there are multiple areas, a file for each area in addition to a file for the `Top level`). + The location of these files can be assigned through the `design_path` input parameter to the `GUI` function (this feature has the shortcut `ctrl+s`). 6. `reset view`: Reset the view to the optimal view based on the current system if the view has been altered (this feature has the shortcut `ctrl+r`). - 7. `Exapnd all`: Toggle this to show/hide all components of all `Area`s. + 7. `Expand all`: Toggle this to show/hide all components of all `Area`s. !!! note "Top right text areas" - The first text area (to the left) shows some tips of using the GUI by defult, but is temporarily changed upon a selection of an EMX object in which information of this object is shown. The second text area (to the right) shows result summary (if available). Note that both these areas are scrollable. + The first text area (to the left) shows some tips of using the GUI by defult, but is temporarily changed upon a selection of an EMX object in which information of this object is shown. + The second text area (to the right) shows result summary (if available). + Note that both these areas are scrollable. !!! note "Middle left toolbar" The toolbar on middle left of the window provides the following functionality: 1. `Plot`: Activate one of the three available plots: - - `Strategic`: Strategic period plot - - `Representative`: Representative period plot - - `Operational`: Operational period plot + + - `Strategic`: Strategic period plot + - `Representative`: Representative period plot + - `Operational`: Operational period plot + 2. `Period`: Menu for choosing a `StrategicPeriod` for a case. 3. `Representative period`: Menu for choosing a `RepresentativePeriod` for a case. - 4. `Scenario`: Menu for choosing a `Scenario` for a case. + 4. `Scenario`: Menu for choosing an `OperationalScenario` for a case. 5. `Data`: Select the available data to be visualized in the plot area to the bottom right (if a component is selected, the menu will update to contain the available data for this component). !!! note "Bottom right visualization area" - The bottom right fraction of the window shows a visualization of the results associated with the selected available data. It will automatically adjust when altering the different periods/scenarios. Note that the axis limits for the differnt plots are saved individually for each plot if altered (otherwise the axis limits updates automatically) but can be reset by hitting the `reset view` button (see below). + The bottom right fraction of the window shows a visualization of the results associated with the selected available data. + It will automatically adjust when altering the different periods/scenarios. + Note that the axis limits for the differnt plots are saved individually for each plot if altered (otherwise the axis limits updates automatically) but can be reset by hitting the `reset view` button (see below). 1. You can zoom into the plots by scrolling with the mouse wheel. 2. Scrolling with the mouse wheel while holding in the x key will zoom in the x-direction and scrolling while holding the y key will zoom in the y-direction. 3. Hovering plots shows the nearest data coordinate. -!!! note "Bottom right toolbar" +!!! note "Bottom right toolbar" An additional toolbar on the bottom right is related to the plot area above and has the following functionality: - + 1. `reset view`: Reset the view to the optimal view if the view has been altered. 2. `pin current data`: Pin the latest plotted data, which enables comparing with other data in the same time type. - 3. `remove selected data`: After selecting a plot (left-click the line so it turns green), this button will remove it (the button has shortcut `Delete`). You can select multiple plots by holding the `ctrl` key while selecting. + 3. `remove selected data`: After selecting a plot (left-click the line so it turns green), this button will remove it (the button has shortcut `Delete`). + You can select multiple plots by holding the `ctrl` key while selecting. 4. `clear all`: Removes all plots. 5. Export: Choose which data to export. - - `All`: all data (or entire window) - - `Plots`: the current active plots + + - `All`: all data (or entire window) + - `Plots`: the current active plots + 6. Choose the export format (`REPL` prints the data to the REPL). 7. `export`: Export the data using the chosen setup. diff --git a/src/EnergyModelsGUI.jl b/src/EnergyModelsGUI.jl index c566321..6c47c4c 100644 --- a/src/EnergyModelsGUI.jl +++ b/src/EnergyModelsGUI.jl @@ -83,5 +83,6 @@ export EnergySystemDesign # Export functions export set_colors export set_icons +export save_results end # module diff --git a/src/datastructures.jl b/src/datastructures.jl index ec3d344..11a5644 100644 --- a/src/datastructures.jl +++ b/src/datastructures.jl @@ -404,7 +404,7 @@ get_parent(design::EnergySystemDesign) = get_parent(get_system(design)) """ get_element(design::EnergySystemDesign) -Returns the system node (i.e. availability node for areas) of a `EnergySystemDesign` `design`. +Returns the system node (*i.e.*, availability node for areas) of a `EnergySystemDesign` `design`. """ get_element(design::EnergySystemDesign) = get_element(get_system(design)) diff --git a/src/utils_GUI/results_axis_utils.jl b/src/utils_GUI/results_axis_utils.jl index be7d280..d3dc2d2 100644 --- a/src/utils_GUI/results_axis_utils.jl +++ b/src/utils_GUI/results_axis_utils.jl @@ -104,7 +104,7 @@ end gui::GUI, ) -Loop through all elements of `field` of type `Vector` (i.e. for the field `data`) +Loop through all elements of `field` of type `Vector` (*i.e.*,for the field `data`) and update `available_data` with an added description. """ function add_description!( @@ -137,7 +137,7 @@ end gui::GUI, ) -Loop through all struct fieldnames of `field` (i.e. for the field `level` of type `NoStartInvData`) +Loop through all struct fieldnames of `field` (*i.e.*,for the field `level` of type `NoStartInvData`) and update `available_data` with an added description. """ function add_description!( @@ -255,7 +255,7 @@ end }, ) -Get the index of the axis/column of `data` (i.e. from a JuMP variable) corresponding to +Get the index of the axis/column of `data` (*i.e.*,from a JuMP variable) corresponding to TS.TimePeriod and return this index (`i_T`) alongside its TimeStruct type. """ function get_time_axis( diff --git a/src/utils_gen/structures_utils.jl b/src/utils_gen/structures_utils.jl index 5d91093..626cc2c 100644 --- a/src/utils_gen/structures_utils.jl +++ b/src/utils_gen/structures_utils.jl @@ -33,7 +33,7 @@ end Returns a dictionary that completes the dictionary `id_to_color_map` with default color values for standard names (like Power, NG, Coal, CO2) collected from `src/colors.yml`. -Color can be represented as a hex (_i.e._, #a4220b2) or a symbol (_i.e_. :green), but also a +Color can be represented as a hex (*i.e.*, #a4220b2) or a symbol (*i.e.*, :green), but also a string of the identifier for default colors in the `src/colors.yml` file. """ function set_colors(products::Vector{<:Resource}, id_to_color_map::Dict)