rte-antares-rpackage / antareseditobject Goto Github PK
View Code? Open in Web Editor NEWEdit an Antares study
Home Page: https://rte-antares-rpackage.github.io/antaresEditObject/
Edit an Antares study
Home Page: https://rte-antares-rpackage.github.io/antaresEditObject/
pblapply
and pboptions
are used from package pbapply
registerDoParallel
is used drom package doParallel
Maybe use specific @importFrom
instead of @import
ing the whole packages.
Description
Currently, when generating a snapshot for a variant on antares-web, we poll very aggressively the server, without any delay, until the generation is done.
This causes an unnecessary workload on the server and on the network:
antaresEditObject/R/API-utils.R
Lines 191 to 196 in ba9ebf8
We must introduce a polling delay in order to be more gentle with the application.
Dear all,
As far as I know, it is not possible to write input TS for Misc generation using the anatresEditObject functions.
The text files to be modified are located in "Antares_study/input/misc-gen/"
I could not modify these text files because when reading an already filled misc gen text file, it look like it is not a normal text file :
That's how it looks like :
My question is : is it possible to make the miscgen-area.txt files support dataframes so that users can modify them easily? the dataframe head would be for example :
Best regards,
Mahmoud
Vérifier que les arguments gèrent bien hydro
exclusion du thermique
Description
I use the package AntaresEditObject in order to edit my Antares model via RStudio. When I tried to let the thermal timeseries automatically generated, it did not work. Therefore, there were no thermalavailabilities Timeseries in the input folder, which can be read.
How to Reproduce
In Rstudio, I put the following command to start the timeseries generator for my thermal plant fleet.
updateGeneralSettings(generate = c("thermal"))
updateInputSettings(import = "thermal")
runTsGenerator(path_solver = "C:/Program Files/RTE/Antares/7.1.0/bin/antares-7.1-solver.exe")
When looking into my input > thermal > series > area 1 > Power Plant 1, the series.txt file is empty and do not have the number of timeseries I wanted to generate. There is obviously an error in the Timeseries generator in Antares.
Afterwards, when I try to read the thermal availabilities timeseries, I get an error:
Function: thermal_ts = readInputTS(thermalAvailabilities = "all")
Error: Error in .checkTypos(e, names_x) : Object 'cluster' not found amongst
In addition: Warning message:
In .addOutputToRes("thermalAvailabilities", thermalAvailabilities, :
Expected behavior
Can you please help me to check why the timeseries generator did not work in my case? One month ago, I used the same script and it worked.
Screenshots and additional files
If applicable, add screenshots to help explain your problem. You may also include a .zip file containing your study.
OS and version
OS: windows
Antares Simulator version: 7.1
Additional context
Add any other context about the problem here.
The version parameter (which correspond to the path_solver in local mode), should be added as a query parameter to the api post call.
When using createLink
with a non-null dataLink
argument, in the case where the areas from
and to
are not in alphabetical order, the following column swap is performed:
antaresEditObject/R/createLink.R
Line 130 in f848bd8
This is fine when dealing with a v6 study (swap of Hurdle cost direct and Hurdle cost indirect columns).
However expected column order has changed in v7, and the above swap leads to mixing up Hurdle cost indirect and Impedances.
Dear Antares developers,
I have some problems regarding to the function createArea().
When I am trying to create an area in my Antares model, I have some problems.
opts <- antaresRead::setSimulationPath('NT2030_V802', simulation = 'input')
antaresEditObject::createArea(name='x_c3')
I am using such script to create it and it's working, it doesn't return me any errors, but when I go to my Antares model, I can't see any new areas if I go to the ,for example, tab Thermal in Antares simulator. How can I solve this problem?
Best regards,
Dmytro Smirnov
Two new values for generaldata.ini/optimization/transmission-capacities
Planned for Antares_Simulator 8.4
The function computeTimeStampFromHourly doesn't seem to be working for studies without a year 1. The error I get is:
Error in file(con, "r") : impossible d'ouvrir la connexion
I think I found where it came from and how to fix it. In the computeTimeStampFromHourly.R file, the lines 42-52:
dayArea <- unique(antaresRead::readAntares(areas = "all", mcYears = 1, timeStep = "daily", opts = opts, showProgress = FALSE)$area)
weArea <- unique(antaresRead::readAntares(areas = "all", mcYears = 1, timeStep = "weekly", opts = opts, showProgress = FALSE)$area)
moArea <- unique(antaresRead::readAntares(areas = "all", mcYears = 1, timeStep = "monthly", opts = opts, showProgress = FALSE)$area)
annualArea <- unique(antaresRead::readAntares(areas = "all", mcYears = 1, timeStep = "annual", opts = opts, showProgress = FALSE)$area)
dayLink <- unique(antaresRead::readAntares(links = "all", mcYears = 1, timeStep = "daily", opts = opts, showProgress = FALSE)$link)
weLink <- unique(antaresRead::readAntares(links = "all", mcYears = 1, timeStep = "weekly", opts = opts, showProgress = FALSE)$link)
moLink <- unique(antaresRead::readAntares(links = "all", mcYears = 1, timeStep = "monthly", opts = opts, showProgress = FALSE)$link)
annualLink <- unique(antaresRead::readAntares(links = "all", mcYears = 1, timeStep = "annual", opts = opts, showProgress = FALSE)$link)
The mcYears = 1
should be replaced by mcYears = mcYears[1]
like so:
dayArea <- unique(antaresRead::readAntares(areas = "all", mcYears = mcYears[1], timeStep = "daily", opts = opts, showProgress = FALSE)$area)
weArea <- unique(antaresRead::readAntares(areas = "all", mcYears = mcYears[1], timeStep = "weekly", opts = opts, showProgress = FALSE)$area)
moArea <- unique(antaresRead::readAntares(areas = "all", mcYears = mcYears[1], timeStep = "monthly", opts = opts, showProgress = FALSE)$area)
annualArea <- unique(antaresRead::readAntares(areas = "all", mcYears = mcYears[1], timeStep = "annual", opts = opts, showProgress = FALSE)$area)
dayLink <- unique(antaresRead::readAntares(links = "all", mcYears = mcYears[1], timeStep = "daily", opts = opts, showProgress = FALSE)$link)
weLink <- unique(antaresRead::readAntares(links = "all", mcYears = mcYears[1], timeStep = "weekly", opts = opts, showProgress = FALSE)$link)
moLink <- unique(antaresRead::readAntares(links = "all", mcYears = mcYears[1], timeStep = "monthly", opts = opts, showProgress = FALSE)$link)
annualLink <- unique(antaresRead::readAntares(links = "all", mcYears = mcYears[1], timeStep = "annual", opts = opts, showProgress = FALSE)$link)
This seemed to fix it.
See rte-antares-rpackage/antaresXpansion#29 and rte-antares-rpackage/antaresXpansion#28
This would be required to try a new deployment process internally at RTE.
Faire évoluer la fonction copyOutput pour pouvoir passer un argument mcYears. (vecteur de numériques ou all).
I am running simulations with many montecarlo years (100) and not using Antares interface to do so. My probelm is that with the following configuration, the simulation evolution (import of the matrix, optimzation and results exports) does not show up on the console:
runSimulation(
name = "100MCyears",
mode = "economy",
path_solver = getOption("antares.solver"),
wait = TRUE,
show_output_on_console = TRUE,
parallel = TRUE,
opts = antaresRead::simOptions()
)
I have to open the task manager to see if the simulation is healthy!
am I missing any steps? What should one do to make the evolution appear on the console?
I am running out of ideas here (as I don't really understand the script RunSimulation.R), your help is highy appreciated.
BR,
Mahmoud
It seems like the line below has no use?
I am using Antares 8.2 with the EditObject package for R.
After creating an new area and a new link in an Antares 8.2 study, Antares faces the following issue when opening the study :
The program reports that it can not find a series of files (ex. node_parameters.txt) in the inputs/link/node folder. See attached picture.
The issue doesnt appear on a 8,1 study.
Is it related to a need for an update of EditObject in order to be compatible with Antares 8.2 ?
Thank you for your feedback.
Il faut clarifier les arguments :
De plus, path_solver semble indispensable pour lancer la fonction
Hi,
At the moment the coëfficients argument (a named vector) only takes links (format "zoneA%zoneB") as an name. Can this be extended to allow thermal clusters (format "zoneA.clusterX") as well as this is possible since Antares V6.1.3?
My current workaround is to make the BC on the first link I find, then to go into the ini-file using readIniFile, modify it manually and write it back using writeIni which is a bit cumbersome :-)
0 errors v | 0 warnings v | 2 notes x
🙈
antaresEditObject/R/createPSP.R
Line 233 in ecf98ee
Anatares 7 requires 8 columns for a link update. The function createLink() was updated (cfr. issue 11), however, when called from createPSP > addLinksBetweenPspAndAreas a matrix of only 5 columns is provided. Please add 3 0-columns to these matrices (line 233 and line 236).
When trying to modify only the 'market-bid-cost' of a large set of thermal clusters via editCluster method and the pwalk method from the purrr package, modified clusters are renamed 1, 2, 3... n.
Looking more into details, it appears that it is only the name of the cluster within the brackets that is modified.
Example (before):
[AT_CCGT present 2]
name = AT_CCGT present 2
group = gas
unitcount = 5
Example (after):
[1]
name = AT_CCGT present 2
group = gas
unitcount = 5
Note :
a test with a smaller set (4) worked
using a "for" loop instead of pwatch works also
Hello,
Is it possible to use CreateCluster() (or another function) just to modify the data of a unit (in a simple way)?
Because it is possible, but it is also required to put all the input data back in CreateCluster() to be sure it is exactly the same unit characteristics (except the one I want to change).
editLink returns error 500 in API mode for studies v8.2+
Is it possible to have a function that enables the user to write local data and daily power and energy credits instead of writing these inputs manually ?
Your help is highly appreciated.
Thank you
Is package pipeR really needed ?
It seems to be used only for one function :
antaresEditObject/R/aggregateResult.R
Line 613 in 4670738
😛 😛
🙈
Hello,
When using createBindingConstraint, I encountered an issue with including the function in a loop.
I want to define binding constraints for multiple different nodes (variable named 'country' in the enclosed script). I included the following instructions in a "for" loop but it does not seem to work. Is there another way to do it ?
for (country in ...){
...
linkBindingConstraint <- paste0("0_battery_pmp%", country)
createBindingConstraint(paste0("battery_energyLimit_", country),
values = cbind(rep(newBattery_Enrg, 366), rep(0, 366), rep(0, 366)),
timeStep = "daily",
operator = "less",
coefficients = c(linkBindingConstraint = -1),
overwrite = TRUE)
}
The result in the input\bindingconstraints folder is the following :
[181]
name = battery_energyLimit_ukni
id = battery_energylimit_ukni
enabled = true
type = daily
operator = less
linkBindingConstraint = -1.000000
Of course, Antares is unable to read linkBindingConstraint = -1.000000 which should be here 0_battery_pmp%ukni
Please note that the following alternatives did not work either :
coefficients = c(paste0("0_battery_pmp%", country) = -1)
coefficients = paste0("0_battery_pmp%", country, " = -1")
coefficients = c(paste0("0_battery_pmp%", country, " = -1"))
Thank you,
Arthur
"dataLink" function should be updated in order to create the necessary input data for a given link in ANTARES v7.
In the past, a matrix with only 5 columns was needed (trans. capacity (direct) trans. capacity (indirect), impedances, hurdles cost (direct), hurdles cost (indirect)).
With ANTARES v7, a matrix of 8 columns is needed to take into account the new parameters (i.e. loop flow, p.shift.min, p.shift.max)
The documentation of the updateScenarioBuilder
indicates that for all types (l, w, s h, t) a matrix created through the scenarioBuilder
command can be used. This is not true for the thermal (t) type, as the thermal clusters are not provided in this case.
antaresEditObject/R/scenarioBuilder.R
Line 152 in ebf12ac
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.