Skip to content

Commit

Permalink
playlist modifÃ
Browse files Browse the repository at this point in the history
  • Loading branch information
TitouanRobert committed Apr 30, 2021
1 parent c77a41a commit 5ddfa6e
Show file tree
Hide file tree
Showing 53 changed files with 10,131 additions and 9 deletions.
23 changes: 14 additions & 9 deletions R/playlist.R
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ setPlaylist <- function(playlist, weights = NULL, opts = antaresRead::simOptions
assertthat::assert_that(length(index_p) == 1)


# if all mc_years must be simulated, desactive playlist
# if all mc_years must be simulated, desactive playlist (not in V8)
if(length(playlist) == length(mc_years))
{

Expand Down Expand Up @@ -216,17 +216,19 @@ setPlaylist <- function(playlist, weights = NULL, opts = antaresRead::simOptions

# delete lines with current playlist

index_d <- grep("playlist",param_data, fixed = TRUE)
index_d <- grep("playlist", param_data, fixed = TRUE)
index_d2 <- grep("playlist_year_weight", param_data, fixed = TRUE)


saveweigth <- param_data[index_d2]
index_d <- index_d[index_d != index_p]

if(is.null(weights)){

index_p2 <- grep("playlist_year_weight = ",param_data, fixed = TRUE)

index_d <- index_d[!index_d %in% index_p2]

}


# if(is.null(weights)){
# index_p2 <- grep("playlist_year_weight = ",param_data, fixed = TRUE)
# index_d <- index_d[!index_d %in% index_p2]
# }

if(length(index_d) >= 1)
{
Expand All @@ -242,6 +244,9 @@ setPlaylist <- function(playlist, weights = NULL, opts = antaresRead::simOptions
new_playlist <- c(new_playlist, apply(weights, 1, function(X){
paste0("playlist_year_weight = " , X[1] - 1,",",format(round(X[2], 6), nsmall = 6))
}))
}else{
if(!is.null(saveweigth))
new_playlist <- c(new_playlist, saveweigth )
}

# add new playlist to the parameters description
Expand Down
4 changes: 4 additions & 0 deletions inst/studyV8/Ponderation_light/Desktop.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[.shellclassinfo]
iconfile = settings/resources/study.ico
iconindex = 0
infotip = Antares Study8.0: Ponderation_light
11 changes: 11 additions & 0 deletions inst/studyV8/Ponderation_light/input/areas/area/optimization.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[nodal optimization]
non-dispatchable-power = true
dispatchable-hydro-power = true
other-dispatchable-power = true
spread-unsupplied-energy-cost = 0.000000
spread-spilled-energy-cost = 0.000000

[filtering]
filter-synthesis = hourly, daily, weekly, monthly, annual
filter-year-by-year = hourly, daily, weekly, monthly, annual

15 changes: 15 additions & 0 deletions inst/studyV8/Ponderation_light/input/areas/area/ui.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[ui]
x = -9
y = 30
color_r = 230
color_g = 108
color_b = 44
layers = 0
[layerX]
0 = -9

[layerY]
0 = 30

[layerColor]
0 = 230 , 108 , 44
Empty file.
6 changes: 6 additions & 0 deletions inst/studyV8/Ponderation_light/input/areas/sets.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[all areas]
caption = All areas
comments = Spatial aggregates on all areas
output = false
apply-filter = add-all

Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[allocation]]
area = 1

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Loading

0 comments on commit 5ddfa6e

Please sign in to comment.