rte-antares-rpackage / antaresProcessing

Processes the input and output data of ANTARES
8 stars 4 forks source link

h5 : addProcessingH5 : mcY = "mcAll" #27

Closed jalazawa closed 7 years ago

jalazawa commented 7 years ago

if I change mcY from mcInd to mcAll I have this error

> addProcessingH5(opts = opts,  mcY = "mcAll",
+                 allProcess = TRUE,
+                 nThreads =  7,
+                 thermalAvailabilities = TRUE
+ )
Error in myOut[[1]] : subscript out of bounds
jalazawa commented 7 years ago

I get some errors

> addProcessingH5(opts = opts,  mcY = "mcAll",
+                 allProcess = TRUE,
+                 nThreads =  7,
+                 thermalAvailabilities = TRUE
+ )
Error in addExportAndImport(res, addCapacities = linkCapacity) : 
  The following links are needed but missing: a - a_offshore, a - psp in, a - psp out, b - psp in, b - psp out, c - hub
Error in surplus(res, timeStep = timeStep) : 
  The following links are needed but missing: a - a_offshore, a - psp in, a - psp out, b - psp in, b - psp out, c - hub
Error in H5Sselect_index(h5spaceFile, index) : 
  (list) object cannot be coerced to type 'integer'
In addition: Warning message:
In .writeNewColumns(fid = fid, newdata = outToWrite[[Y]], GP = GP,  :
  Somes columns already exists in h5 file, they will be overwrite.
Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) : 
  'x' must be atomic
TitouanRobert commented 7 years ago

Oui, certaines interactions removeVirtualsAreas + autres traitements ne se font pas.

TitouanRobert commented 7 years ago

J'ai réglé les bug pour les traitements : addDownwardMargin et addUpwardMargin. Il reste un soucis avec me traitement surplus. Je ne comprend pas les résultats du code suivant

` opts <- setSimulationPath(studyPath) re <- readAntares(areas = "all", links = "all", clusters = "all", districts = "all", mcYears = 1, misc = TRUE, thermalAvailabilities = TRUE, hydroStorage = TRUE, hydroStorageMaxPower = TRUE, reserve = TRUE, linkCapacity = TRUE, mustRun = TRUE, thermalModulation = TRUE)

re <- removeVirtualAreas(re, storageFlexibility = "a") unique(re$areas$area)

a_offshore b c hub psp in psp in-2 psp out psp out-2

nrow(re$areas)

2688

sp <- surplus(re, timeStep = "hourly") unique(sp$area)

"b" "c" "hub" "psp in" "psp in-2" "psp out" "psp out-2"

nrow(sp)

2352

` Il semblerait que le traitement surplus modifie le nombre de lignes et supprimes certaines zones.

jalazawa commented 7 years ago

OK