Skip to content

Commit

Permalink
Spellcheck & grammarcheck for how-to-use (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
clizbe authored Feb 2, 2024
1 parent b6b74e2 commit ce5d64f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/src/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The following sections explain the main features of the optimization model based

## [Flexible Connection of Energy Assets](@id flex-asset-connection)

The representation of the energy system in *TulipaEnergyModel.jl* is based on [Graph Theory](https://www.britannica.com/topic/graph-theory), which deals with the connection between vertices by edges. This representation provides a more flexible framework to model *energy assets* in the system as *vertices*, and to model *flows* between energy assets as *edges*. In addition, it reduces the model size. For instance, connecting assets directly to each other, without having a node in between, allows us to reduce the number of variables and constraints to represent different configurations. For instance, it is becoming more and more common to have hybrid assets like `storage + renewable` (e.g., battery + solar), `electrolyzer + renewable` (e.g., electrolyzer + wind), or `renewable + hydro` (e.g., solar + hydro) that are located in the same site and share a common connection point to the grid.
The representation of the energy system in *TulipaEnergyModel.jl* is based on [Graph Theory](https://en.wikipedia.org/wiki/Graph_theory), which deals with the connection between vertices by edges. This representation provides a more flexible framework to model *energy assets* in the system as *vertices*, and to model *flows* between energy assets as *edges*. In addition, it reduces the model size. For instance, connecting assets directly to each other, without having a node in between, allows us to reduce the number of variables and constraints to represent different configurations. For instance, it is becoming more and more common to have hybrid assets like `storage + renewable` (e.g., battery + solar), `electrolyzer + renewable` (e.g., electrolyzer + wind), or `renewable + hydro` (e.g., solar + hydro) that are located in the same site and share a common connection point to the grid.
In hybrid configurations, for example, flows from the grid are typically not allowed as they either avoid charging from the grid or require green hydrogen production.

Consider the following example to demonstrate the benefits of this approach. In the classic connection approach, the nodes play a crucial role in modelling. For example, every asset needs to be connected to a node with balance constraints. When a storage asset and a renewable asset are in a hybrid connection like the one described before, a connection point is needed to connect the hybrid configuration to the rest of the system. Therefore, to consider the hybrid configuration of a storage asset and a renewable asset, we must introduce a node (i.e., a connection point) between these assets and the external power grid (i.e., a balance point), as shown in the following figure:
Expand Down
30 changes: 15 additions & 15 deletions docs/src/how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ The input_folder should contain CSV files as described below. The output_folder
## Input

Currently, we only accept input from CSV files.
There should be 7 files, each following the specification of input structures.
There should be 8 files, each following the specification of input structures.
You can also check the [`test/inputs` folder](https://github.com/TulipaEnergy/TulipaEnergyModel.jl/tree/main/test/inputs) for examples.

### CSV

#### `assets-data.csv`

This files includes the list of assets and the data associate with each of them.
This file includes the list of assets and the data associated with each of them.

Required columns:

Expand All @@ -65,8 +65,8 @@ Markdown.parse(out)

The `Missing` data meaning depends on the parameter, for instance:

- `investment_limit`: there is no investment limit
- `initial_storage_level`: the initial storage level is free (between the storage level limits), meaning that the optimization problem decides the best starting point for the storage asset. In addition, the first and last time blocks in a representative period are linked to create continuity in the storage level.
- `investment_limit`: There is no investment limit.
- `initial_storage_level`: The initial storage level is free (between the storage level limits), meaning that the optimization problem decides the best starting point for the storage asset. In addition, the first and last time blocks in a representative period are linked to create continuity in the storage level.

#### `flows-data.csv`

Expand All @@ -85,7 +85,7 @@ Markdown.parse(out)

The `Missing` data meaning depends on the parameter, for instance:

- `investment_limit`: there is no investment limit
- `investment_limit`: There is no investment limit.

#### `assets-profiles.csv`

Expand All @@ -104,7 +104,7 @@ Markdown.parse(out)

#### `flows-profiles.csv`

Similar to `assets-profiels.csv`, but for flows.
Similar to `assets-profiles.csv`, but for flows.

Required columns:

Expand All @@ -126,7 +126,7 @@ To specify the desired resolution, there are currently three options, based on t
The column `partition` serves to specify the partitions in the specification given by the column `specification`.

- `specification = uniform`: Set the resolution to a uniform amount, i.e., a time block is made of X time steps. The number X is defined in the column `partition`. The number of time steps in the representative period must be divisible by `X`.
- `specification = explicit`: Set the resolution acording to a list of numbers separated by `;` on the `partition`. Each number the list is the number of time steps for that time block. For instance, `2;3;4` means that there are three time blocks, the first has 2 time steps, the second has 3 time steps, and the last has 4 time steps. The sum of the number of time steps must be equal to the total number of time steps in that representative period.
- `specification = explicit`: Set the resolution according to a list of numbers separated by `;` on the `partition`. Each number in the list is the number of time steps for that time block. For instance, `2;3;4` means that there are three time blocks, the first has 2 time steps, the second has 3 time steps, and the last has 4 time steps. The sum of the number of time steps must be equal to the total number of time steps in that representative period.
- `specification = math`: Similar to explicit, but using `+` and `x` to give the number of time steps. The value of `partition` is a sequence of elements of the form `NxT` separated by `+`. `NxT` means `N` time blocks of length `T`.

The table below shows various results for different formats for a representative period with 12 time steps.
Expand Down Expand Up @@ -207,10 +207,10 @@ The fields of `EnergyProblem` are

- `graph`: The [Graph](@ref) object that defines the geometry of the energy problem.
- `representative_periods`: A vector of [Representative Periods](@ref representative-periods).
- `constraints_partitions`: Dictionaries that connects pairs of asset and representative periods to [time partitions (vectors of time blocks)](@ref Partition)
- `constraints_partitions`: Dictionaries that connect pairs of asset and representative periods to [time partitions (vectors of time blocks)](@ref Partition)
- `model`: A JuMP model object. Initially `nothing`.
- `solved`: A boolean indicating whether the `model` has been solved or not.
- `objective_value`: After the model has been solved, this is the objective value at the solution.
- `objective_value`: After the model has been solved, this is the objective value of the solution.
- `termination_status`: After the model has been solved, this is the termination status.

See the [basic example tutorial](@ref basic-example) to see how these can be used.
Expand All @@ -233,13 +233,13 @@ See how to use the graph in the [graph tutorial](@ref graph-tutorial).

This structure holds all the information of a given asset.
These are stored inside the [Graph](@ref).
Given a graph `graph` and an asset `a`, it can be access through `graph[a]`.
Given a graph `graph`, an asset `a` can be accessed through `graph[a]`.

### GraphFlowData

This structure holds all the information of a given flow.
These are stored inside the [Graph](@ref).
Given a graph `graph` and a flow `(u, v)`, it can be access through `graph[u, v]`.
Given a graph `graph`, a flow `(u, v)` can be accessed through `graph[u, v]`.

### Partition

Expand All @@ -260,11 +260,11 @@ For instance, we could model the year into 3 days, by clustering all days of the
Each one of these periods of time is called a representative period.
They have been obtained by clustering through [TulipaClustering](https://github.com/TulipaEnergy/TulipaClustering.jl).

A representative period was four fields:
A representative period has four fields:

- `base_periods`: indicates the periods of the full problem that map into this representative period, and the weight of the representative period in them.
- `weight`: indicates how many representative periods is contained in that year; this is inferred automatically from `base_periods`.
- `time_steps`: The number of time steps in that year.
- `base_periods`: Indicates the periods of the full problem that map into this representative period, and the weight of the representative period in them.
- `weight`: Indicates how many representative periods are contained in the full problem; this is inferred automatically from `base_periods`.
- `time_steps`: The number of time steps in the representative period.
- `resolution`: The duration in time of a time step.

The number of time steps and resolution work together to define the coarseness of the period.
Expand Down

0 comments on commit ce5d64f

Please sign in to comment.