0

I have an OPL model in CPLEX studio.

I would like to build a simple user interface in Excel allowing users to enter some simple parameters & data, then click a button, then have the solution written to another sheet in the spreadsheet.

I need the solution to work on Mac and Windows.

Apparently their used to be some Excel interface examples bundled with CPLEX under cplex\examples\src\excel

CPLEX OPL and Excel VBA Integration

However this does not appear to be bundled any more as the folder does not exist in "CPLEX_Studio1271".

One option here is to launch oplrun.exe via a Shell command:

Using OPL CPLEX in Excel VBA?

However this requires knowledge of the path, which depends on the O/S and possibly version. Also, a nasty "macros" warning comes up when you open the spreadsheet. Both those issues could be tolerable but I am hoping there is a better solution.

What is the best way to integrate Excel with OPL so that the spreadsheet can provide the input data, trigger the OPL solution, then contain the output data? Bearing in mind that this should be deployed to various users without then needing to install extra plugins etc.

Brendan Hill
  • 3,406
  • 4
  • 32
  • 61
  • I really like [Solver Studio](http://solverstudio.org/), since you can program in almost all famous optimisation modelling languages, so you can use AMPL (or another language) to program a CPLEX. However, since you don't want to use any plugins, you can use the Excel [solver function](https://msdn.microsoft.com/en-us/vba/excel-vba/articles/using-the-solver-vba-functions). Bare in mind that Excel is [not the best way to do it](https://stackoverflow.com/a/45685789/7690982), and the optimisation languages used on solver studio are better, since they are languages made for optimisation problems. – danieltakeshi Oct 02 '17 at 12:52

1 Answers1

0

I gave some options at:

https://www.ibm.com/developerworks/community/forums/html/topic?id=c41e6287-ffe2-4bdb-9081-4765cd1962f4&ps=25

The docplexcloud could be the one you need since users do not need to have CPLEX on their own machines.

halfer
  • 19,824
  • 17
  • 99
  • 186
Alex Fleischer
  • 9,276
  • 2
  • 12
  • 15