Skip to content

Commit

Permalink
Check + vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
baptsegu committed Jun 15, 2017
1 parent 1e92f1e commit 16d5af8
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 12 deletions.
2 changes: 1 addition & 1 deletion R/benders.R
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ benders <- function(path_solver, display = TRUE, report = TRUE, clean = TRUE, pa
}
if(current_it$cut_type == "weekly")
{
update_weekly_cuts(current_it, candidates, output_area_w, output_link_w, output_link_h, inv_cost, tmp_folder, exp_options, opts)
update_weekly_cuts(current_it, candidates, output_area_w, output_link_w, output_link_h, inv_cost, tmp_folder, exp_options)
}


Expand Down
2 changes: 1 addition & 1 deletion R/benders_tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ update_yearly_cuts <- function(current_it,candidates, output_area_y,output_link_
#' @return nothing
#'
#'
update_weekly_cuts <- function(current_it, candidates, output_area_w, output_link_w, output_link_h, inv_cost, tmp_folder, benders_options, opts)
update_weekly_cuts <- function(current_it, candidates, output_area_w, output_link_w, output_link_h, inv_cost, tmp_folder, benders_options)
{

# compute a few intermediate variables
Expand Down
6 changes: 5 additions & 1 deletion man/benders.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion man/run_simulation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion man/set_antares_options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions man/update_average_cuts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/update_weekly_cuts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/update_yearly_cuts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions man/with_profile.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 20 additions & 3 deletions vignettes/read_me.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ vignette: >
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---


# antares-rpackageXpansion


Expand Down Expand Up @@ -76,6 +78,21 @@ max-units = 4
For the case of distributed generation and storage, the investment variables can be *continuous*, without steps of several MW. In that case, the properties `unit-size`and `max-units`can be replaced by the property `max-investment`, and the invested capacity will be able to take any real value between `0` and `max-investment` (in MW).


### Capacity profile
By default, the investment candidates offer a "perfect capacity". That is to say, when 1 MW is invested, this 1 MW will be fully available for all the hours of the year. However, by adding the property `link-profile`, one can define a time series (with an hourly time step) of the ratio between the invested capacity and the capacity which is actually available at a given hour. This feature can be used to model investments in (e.g.) intermittent generation or thermal generation with seasonalized maintenance shutdowns.

The property `link-profile `can be used as below :

```txt
[1]
name = solar_power
link = area1 - pv1
annual-cost-per-mw = 100000
max-investment = 10000
link-profile = pv1.txt
```
Where `pv1.txt` is a text file, located in the `user/expansion/capa/` folder of the study, and which contains the load factor time series of the candidate (one column of 8760 values between 0 and 1). When x MW of the candidate solar_power will be invested, the actual time series of available power will be equal to the product of x and the time series `pv1.txt`.

## Method and settings

### Benders decomposition
Expand All @@ -93,7 +110,7 @@ Concretely, the package will run ANTARES iteratively. Depending on the number of

### Settings

The different settings can be modified by the user of the package. All the settings are saved in a file `settings.ini` located in the foler `user/expansion/`.
The different settings can be modified by the user of the package. All the settings are saved in a file `settings.ini` located in the folder `user/expansion/`.

* `optimality_gap`: The optimality gap can take any numeric value. The optimality gap is theoretically the maximum possible distance (in euros) between the solution returned by the method and the optimal solution.

Expand All @@ -109,7 +126,7 @@ uc_type = relaxed_fast
master = integer
optimality_gap = 0
```
Note that the optimality gap can also be given relatively to be best found solution by entering a `%` after the numeric value of the setting.
Note that the optimality gap can also be given relatively to be best found solution by entering a `%` after the numeric value of the setting. In that case, the optimality is between `0%`and `100%` and the decimal separator is a point (`.`).


### Which settings should I use for my expansion problem ?
Expand Down Expand Up @@ -149,7 +166,7 @@ library(antaresXpansion)
Select an ANTARES study using [antaresRead package](https://github.com/rte-antares-rpackage/antares-rpackageRead). As no outputs are needed, the simulation argument should be put to zero.

```r
setsimulationPath("study_path", simulation = 0)
setSimulationPath("study_path", simulation = 0)
```

Create the `candidate.ini` and `settings.ini` files as explained above and store them in the directory `study_path/user/expansion`.
Expand Down

0 comments on commit 16d5af8

Please sign in to comment.