User Tools

Site Tools


tutorials:sensitivity-analysis-using-grolink-and-gror

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:sensitivity-analysis-using-grolink-and-gror [2025/06/06 16:01] – [Example: Morris Screening using the sensitivity package] ttutorials:sensitivity-analysis-using-grolink-and-gror [2025/09/24 16:31] (current) t
Line 1: Line 1:
 ====== Sensitivity analysis on GroIMP models using GroR ====== ====== Sensitivity analysis on GroIMP models using GroR ======
-This wiki explains how to do a sensitivity analysis on GroIMP models using the GroR interface using a Morris screening over input parameters of the [[http://134.76.18.36/wordpress/courses-and-tutorials/simplefspm/ | "Example08" FSPM model]] from the gallery as an example.+This wiki explains how to do a sensitivity analysis on GroIMP models using the GroR interface using a Morris screening over input parameters of the [[https://gallery.grogra.de/project_gallery/67053a3f256715cda41c867f | "Example08" FSPM model]] from the gallery as an example.
 ===== Prerequisites ===== ===== Prerequisites =====
 Make sure to [[:tutorials:getting-started-with-grolink-and-gror|set up GroR]]. Play a bit around with it and get a feel for how it works and what the [[https://gitlab.com/grogra/groimp-utils/rapilibrary#grolink|different functions]] do and what they return. The approach presented in the wiki here is just one way you could approach a sensitivity analysis. You will likely find your own approach for your specific model, but GroR will be the space you work in. Make sure to [[:tutorials:getting-started-with-grolink-and-gror|set up GroR]]. Play a bit around with it and get a feel for how it works and what the [[https://gitlab.com/grogra/groimp-utils/rapilibrary#grolink|different functions]] do and what they return. The approach presented in the wiki here is just one way you could approach a sensitivity analysis. You will likely find your own approach for your specific model, but GroR will be the space you work in.
Line 160: Line 160:
                          ){                          ){
   # Open workbench with model   # Open workbench with model
-  wb1 <- GroLink.open("http://localhost:58081/api", path="Example08_prepared.gsz")+  wb1 <- GroLink.open("http://localhost:58081/api", content readBin("D:/Example08_prepared.gsz", "raw", 10e6))
   # Override parameters.rgg with new values from params vector   # Override parameters.rgg with new values from params vector
   WBRef.updateFile(wb1, "param/parameters.rgg",   WBRef.updateFile(wb1, "param/parameters.rgg",
Line 217: Line 217:
  
 {{:tutorials:rplot.png?500|}} {{:tutorials:rplot.png?500|}}
 +
 +
 +===== Dump of R code to grab datasets via API =====
 +<code R>
 +wb <- GroLink.open("http://localhost:58081/api",
 +               content = readBin("../GroIMP/volume_distance_estimate.gsz", "raw", 10e6) )
 +
 +GroR::WBRef.addNode(wb, content = readBin("tief12-treeqsm.qsm", "raw", 10e6), inp = "qsm")
 +
 +WBRef.runRGGFunction(wb, "run")
 +WBRef.runRGGFunction(wb, "calc")
 +WBRef.runRGGFunction(wb, "writeCSV")
 +
 +string <- WBRef.getDataset(wb,"voldist")
 +
 +out <- read.csv(textConnection(WBRef.getDataset(wb,"voldist")), sep = ",", header = F)
 +
 +WBRef.close(wb)
 +
 +plot(m)
 +</code>
 +
  
  
tutorials/sensitivity-analysis-using-grolink-and-gror.1749218499.txt.gz · Last modified: 2025/06/06 16:01 by t