R/getSover.R

"getSolver"<-function(op, quiet=FALSE){
  if(class(op$f)=="quadFun"){ solver <- "cccp"}
  if(class(op$f)=="ratioFun"){solver <- "slsqp"}
  if(class(op$f)=="linFun"){  solver <- "cccp2"}
  if((class(op$f)=="linFun") && is.null(op$lb) && is.null(op$ub) && !is.null(op$qc)){solver <- "alabama"}

  solver
}

Try the optiSolve package in your browser

Any scripts or data that you put into this service are public.

optiSolve documentation built on Oct. 13, 2021, 5:08 p.m.