Skip to content

Instantly share code, notes, and snippets.

@Laurae2
Created November 25, 2018 23:13
Show Gist options
  • Save Laurae2/f4eaf0178fa764175ff0fb654711e906 to your computer and use it in GitHub Desktop.
Save Laurae2/f4eaf0178fa764175ff0fb654711e906 to your computer and use it in GitHub Desktop.
Windows + CPLEX + R + cplexAPI

Step 1: download cplexAPI : Step 2: edit src/Makevars.win like the following, make sure cplex1280 is equal to your version you must change to the corresponding number you can find in C:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/bin/x64_win64:

PKG_CPPFLAGS=-g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/include"
PKG_LIBS=-L"C:/Program Files/IBM/ILOG/CPLEX_Studio128/cplex/bin/x64_win64" -lm -lcplex1280

Step 3: in a R console, on the right folder:

devtools::install("C:/whatever/cplexAPI_1.3.3/cplexAPI", upgrade_dependencies = FALSE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment