Decision Optimization

 View Only
Expand all | Collapse all

How to run a .lp file generated in Matlab in IBM ILOG CPLEX Optimization Studio v12.5

  • 1.  How to run a .lp file generated in Matlab in IBM ILOG CPLEX Optimization Studio v12.5

    Posted Wed August 12, 2020 02:16 PM
    How to run a .lp file generated in Matlab in IBM ILOG CPLEX Optimization Studio v12.5

    ------------------------------
    JIBIN NOBLE
    ------------------------------

    #DecisionOptimization


  • 2.  RE: How to run a .lp file generated in Matlab in IBM ILOG CPLEX Optimization Studio v12.5

    Posted Thu August 13, 2020 02:09 AM
    Can you please be more specific what you want to do? If I understand correctly, you use the CPLEX matlab connector to create an LP file? The first question would be: why not just solve in matlab? And then the second question is, how exactly do you want to solve the LP file? Using command line? In the IDE? Using another programming API?

    For everything but the IDE the strategy is the same: load the file and then execute a solve() call. For the IDE there is no direct way to solve an LP file but you can get around using scripting:
    main {
      var cpx = new IloCplex();
      cpx.importModel("/path/to/my/model.lp");
      cpx.solve();
    }
    This can be executed in the IDE as well. It will however not populate all the solution views.

    ------------------------------
    Daniel Junglas
    ------------------------------