saveLoadStudy

loadStudy.R

source("modules/saveLoadStudy/saveStudy.R", local = TRUE)

SAVE_MODULE_MIN_VER

Minimum version of the saved file allowed.

UI and Server functions

loadStudyUI(id)

This function adds the menu “Load Study” to the user interface

Parameters:

id (character) – namespace of the module

loadStudyServer(id)

Allows to check the selected file and load the study

Parameters:

id (character) – namespace of the module

saveStudy.R

SAVE_MODULE_VER

Current version of the save file

UI and Server functions

saveStudyUI(id)

This function adds the menu “Save Study” to the user interface

Parameters:

id (character) – namespace of the module

saveStudyServer(id, DOE, listmodels, sensitivityAnalysis, UQparams, UQres, UQproba, unconstrOptim, constrOptim)
Parameters:
  • id (character) – namespace of the module

  • DOE (object) – stores the point values and the DOE information (e.g. bounds…)

  • listmodels (list) – list of trained models

  • sensitivityAnalysis (list) – Sensitivity Analysis results (First & Total Sobol Indices, Higher-Order Sobol Indices, Shapley Indices, Optimization Indices)

  • UQparams (list) – Uncertainty Quantification parameters

  • UQres (list) – Uncertainty Quantification propagation results

  • UQproba (list) – Uncertainty Quantification probability results

  • unconstrOptim (list) – Unconstrained Optimization results and Xinfos used for the optimization

  • constrOptim (list) – Constraint formulation, Constrained Optimization results and Xinfos used for the optimization

Main reactives:

  • output$savedStudies: list of existing studies and action buttons to download and delete each study

  • output$download: downloadable file containing the study

Main functions

buildSaveList(eltsToSave, DOE, listmodels, sensitivityAnalysis, UQparams, UQres, UQproba, unconstrOptim, constrOptim)

Builds a list containig the elements the user wishes to save.

Parameters:
  • eltsToSave (list) – elements to save selected by the user

  • DOE (object) – stores the point values and the DOE information (e.g. bounds…)

  • listmodels (list) – list of trained models

  • sensitivityAnalysis (list) – Sensitivity Analysis results (First & Total Sobol Indices, Higher-Order Sobol Indices, Shapley Indices, Optimization Indices)

  • UQparams (list) – Uncertainty Quantification parameters

  • UQres (list) – Uncertainty Quantification propagation results

  • UQproba (list) – Uncertainty Quantification probability results

  • unconstrOptim (list) – Unconstrained Optimization results and Xinfos used for the optimization

  • constrOptim (list) – Constraint formulation, Constrained Optimization results and Xinfos used for the optimization

Returns:

a list containing the elements to save

Return type:

list

saveData(fileName, study)

Saves the study with the specified filename, overwrites existing files with the same name

Parameters:
  • fileName (character) – filename

  • study (list) – list containing the elements to save

Secondary functions

bytesToHumanSize(sizes)

Converts sizes in bytes to units easily readable by a user

param list sizes:

list of sizes in bytes