0

I the following setup. I implemented a model in Rstudio. This model creates data for CPLEX optimization studio. At the moment R creates an excel sheet. This excel sheet in then read by CPLEX into a .dat file. This .dat file in then used in the .mod file in CPLEX. The problem is that at the moment the manual effort is too high, because I have to first run the R file, then switch to the CPLEX file and run this again.

Is there any option to integrate the CPLEX mod into the R model so that with running the R model both the R model and the CPLEX model work?

Kind Regards!

Phil
  • 7,287
  • 3
  • 36
  • 66
A321
  • 17
  • 4

1 Answers1

0

In how to with OPL How to call CPLEX from R ?

In R you can call OPL through a system call:

system("oplrun diet.mod diet.dat") 

But you can also use RCplex or cplexAPI

Alex Fleischer
  • 9,276
  • 2
  • 12
  • 15