Skip to content

Commit 3a19ebf

Browse files
author
Jon Vegard Venås
authored
Reorder buttons and menus to enable GUI on low resolution (i.e. [1280, 729]). Divided the text area into two areas (the new one for permanently showing result summary). Improve code quality. (#12)
1 parent 508688b commit 3a19ebf

17 files changed

Lines changed: 249 additions & 161 deletions

.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# It records a fixed state of all packages used by the project. As such, it should not be
1212
# committed for packages, but should be committed for applications that require a static
1313
# environment.
14-
/Manifest.toml
14+
*Manifest.toml
1515

1616
# Internal files for testing the system locally
1717
*.geojson
@@ -20,12 +20,11 @@
2020
/dev
2121

2222
# Build artifacts for creating documentation generated by the Documenter package
23-
/docs/Manifest.toml
24-
/examples/Manifest.toml
2523
/examples/exported_files
26-
/test/Manifest.toml
2724
/docs/build/
2825
/docs/src/manual/NEWS.md
26+
/docs/src/figures/example.png
27+
/docs/src/figures/colors_visualization.png
2928

3029
# Exported files when running the tests
3130
/examples/exported_files

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release notes
22

3+
## Version 0.5.5 (2024-09-13)
4+
5+
### Bugfix
6+
7+
* Reorder buttons and menus to enable GUI on low resolution (i.e. [1280, 729]). Divided the text area into two areas (the new one for permanently showing result summary).
8+
39
## Version 0.5.4 (2024-09-09)
410

511
### Bugfix

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "EnergyModelsGUI"
22
uuid = "737a7361-d3b7-40e9-b1ac-59bee4c5ea2d"
33
authors = ["Jon Vegard Venås <JonVegard.Venas@sintef.no>", "Magnus Askeland <Magnus.Askeland@sintef.no>", "Shweta Tiwari <Shweta.Tiwari@sintef.no>"]
4-
version = "0.5.4"
4+
version = "0.5.5"
55

66
[deps]
77
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"

docs/src/figures/EMI_geography.png

1.85 KB
Loading
23.5 KB
Loading
-42 KB
Binary file not shown.

docs/src/manual/philosophy.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,4 @@ Its aim is not to provide the user with an input processing routine or a method
1515

1616
`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.
1717
However, you can provide an extension to `EnergyModelsGUI` in your `EMX` package with, *e.g.*, specific icons for the developed nodes.
18-
In addition, if your package introduces new variables, you can provide a description of the variables in your package.
19-
20-
!!! warning
21-
Providing new names to the variables in its current form is a bit complicated.
22-
You have to provide a file `descriptive_names.yml` for including descriptive names for both parameters of composite types and variables.
23-
This file should include all existing names as it is only read one.
24-
25-
We aim in a future version to utilize a different approach in which the both the fields of types and introduced variables are provided as entries to a dictionary.
26-
In this situation, it is no longer necessary to copy the existing file.
18+
In addition, if your package introduces new variables, you can provide a description of the variables in your package.

docs/src/manual/simple-example.md

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Examples
1+
# Example with functionality overview
22

33
For the content of the individual examples, see the [examples](https://github.com/EnergyModelsX/EnergyModelsGUI.jl/tree/main/examples) directory in the project repository.
44

@@ -36,31 +36,46 @@ include(joinpath(exdir, "EMI_geography.jl"))
3636
You should then get the following GUI:
3737
![Example image for GUI](../figures/example.png)
3838

39+
## Functionality overview
3940

4041
!!! note "Left visualization area"
4142
The left fraction of the window shows a visualization of the topology with the following functionality:
4243

43-
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.
44+
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.
4445
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.
4546
3. You can select multiple nodes/areas by holding down `ctrl` and left-clicking.
4647
4. You can change the focus area (pan) of the window by holding down the right mouse button and dragging.
4748
5. You can zoom in and out by using the scroll wheel on the mouse.
48-
6. Hovering over a component will show its type.
49+
6. Hovering over a component will show the name and its type (and investments if it has occured).
50+
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.
51+
8. The legend box of `Resource`s shows an overview of all resources in `case[:Products]`.
52+
9. The upper-left label indicates at which level of the topology you are at (`top_level` is an overview of all `Area`s).
4953

50-
!!! note "Top toolbar"
51-
The toolbar on top of the window provides the following functionality:
54+
!!! note "Top left toolbar"
55+
The toolbar on top left of the window provides the following functionality:
5256

5357
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.
5458
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.
5559
3. `align horz.`: Align selected nodes/areas horizontally.
5660
4. `align vert.`: Align selected nodes/areas vertically.
57-
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.
58-
6. `reset view`: Reset the view to the optimal view based on the current system if the view has been altered.
61+
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`).
62+
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`).
5963
7. `Exapnd all`: Toggle this to show/hide all components of all `Area`s.
60-
8. `Period`: Menu for choosing a `StrategicPeriod` for a case.
61-
9. `Representative period`: Menu for choosing a `RepresentativePeriod` for a case.
62-
10. `Scenario`: Menu for choosing a `Scenario` for a case.
63-
11. `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).
64+
65+
!!! note "Top right text areas"
66+
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.
67+
68+
!!! note "Middle left toolbar"
69+
The toolbar on middle left of the window provides the following functionality:
70+
71+
1. `Plot`: Activate one of the three available plots:
72+
- `Strategic`: Strategic period plot
73+
- `Representative`: Representative period plot
74+
- `Operational`: Operational period plot
75+
2. `Period`: Menu for choosing a `StrategicPeriod` for a case.
76+
3. `Representative period`: Menu for choosing a `RepresentativePeriod` for a case.
77+
4. `Scenario`: Menu for choosing a `Scenario` for a case.
78+
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).
6479

6580
!!! note "Bottom right visualization area"
6681
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.
@@ -72,15 +87,11 @@ You should then get the following GUI:
7287
!!! note "Bottom right toolbar"
7388
An additional toolbar on the bottom right is related to the plot area above and has the following functionality:
7489

75-
1. `Plot`: Activate one of the three available plots:
76-
- `Strategic`: Strategic period plot
77-
- `Representative`: Representative period plot
78-
- `Operational`: Operational period plot
79-
2. `pin current data`: Pin the latest plotted data, which enables comparing with other data in the same time type.
80-
3. `remove selected data`: After selecting a plot (left-click the line so it turns green), this button will remove it.
81-
4. `clear all`: Removes all plots.
82-
5. Export: Choose which data to export.
90+
1. `pin current data`: Pin the latest plotted data, which enables comparing with other data in the same time type.
91+
2. `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.
92+
3. `clear all`: Removes all plots.
93+
4. Export: Choose which data to export.
8394
- `All`: all data (or entire window)
8495
- `Plots`: the current active plots
85-
6. Choose the export format (`REPL` prints the data to the REPL).
86-
7. `export`: Export the data using the chosen setup.
96+
5. Choose the export format (`REPL` prints the data to the REPL).
97+
6. `export`: Export the data using the chosen setup.

0 commit comments

Comments
 (0)