Skip to content

Commit

Permalink
Shiny alert added when additional arguments of current pumping tests …
Browse files Browse the repository at this point in the history
…do not match all analytical model parameters.
  • Loading branch information
khaors committed May 27, 2019
1 parent 8647548 commit 8211977
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions inst/Shiny/pumpingtest/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,34 @@ shinyServer(function(input, output, session) {
if(input$parest_opt1 == "nls" ) obj.fn <- "rss"
#print(opt.method)
#print(c(opt.method, input$parest_objfn1, obj.fn))
# Check additional parameters
add.par <- current.ptest$additional_parameters
if(input$parest_model1 == "papadopulos_cooper"){
check1 <- "rc" %in% names(add.par)
check2 <- "rw" %in% names(add.par)
if(!check1 || !check2){
shinyalert("Oops!", "Papadopulos-Cooper model requires rc and/or rw parameters.",
type = "error")
return(NULL)
}
}
else if(input$parest_model1 == "general_radial_flow"){
check1 <- "rc" %in% names(add.par)
check2 <- "rw" %in% names(add.par)
if(!check1 || !check2){
shinyalert("Oops!", "GRF model requires rc and/or rw parameters.",
type = "error")
return(NULL)
}
}
else if(input$parest_model1 == "hantush_jacob"){
check1 <- "B" %in% names(add.par)
if(!check1){
shinyalert("Oops!", "Hantush-Jacob model requires the aquitard Thickness.",
type = "error")
return(NULL)
}
}
current.fit <- fit.optimization(current.ptest, input$parest_model1,
obj.fn = obj.fn,
opt.method = opt.method, seed = 54321)
Expand Down

0 comments on commit 8211977

Please sign in to comment.