You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I still can't install cplexAPI on my virtual machine and couldn't find how to have the glpk solver used instead. I have digged a bit in the code and found out that the adapt.R and gf.suite.R scripts have to both load the cplexAPI before checking if it is present in the installed package.
if you move the
suppressMessages(library(cplexAPI))
within the the if loop below
if( "cplexAPI" %in% rownames(installed.packages()) ){
sybil::SYBIL_SETTINGS("SOLVER","cplexAPI"); ok <- 1
}else{
warning("glpkAPI is used but cplexAPI is recommended because it is much faster")
sybil::SYBIL_SETTINGS("SOLVER","glpkAPI"); ok <- 5
}
Thank you very much for pointing this out! The commit 59ea9ce should fix the issue in the same way as you suggested.
We'll also run some tests to compare models between glpk and cplex.
just as a small addition. I also struggled with the installation of cplexAPI but it worked for me using the following commands. Maybe it works for you the same way.
CPLEXDIR=/dir/to/cplex129/cplex # adjust this with the path to your cplex installation
SYSTEM=`ls -d ${CPLEXDIR}/lib/*`
LIBFORMAT=static_pic
CPLEXLIBDIR=${SYSTEM}/${LIBFORMAT}
R CMD INSTALL --configure-args=" \
PKG_CFLAGS='-m64 -fPIC' \
PKG_CPPFLAGS='-I${CPLEXDIR}/include' \
PKG_LIBS='-L${CPLEXLIBDIR} -lcplex -lm -pthread -ldl'" \
cplexAPI_1.3.6.tar.gz
Hello Johannes,
So I still can't install
cplexAPI
on my virtual machine and couldn't find how to have the glpk solver used instead. I have digged a bit in the code and found out that theadapt.R
andgf.suite.R
scripts have to both load thecplexAPI
before checking if it is present in the installed package.if you move the
within the the if loop below
like this
it seems to fix the script crashing because it can't load the cplexAPI so it can't choose the solver =)
The text was updated successfully, but these errors were encountered: