Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

Installing CPLEX-Matlab interface

  • 1.  Installing CPLEX-Matlab interface

    Posted Mon November 28, 2011 06:53 AM

    Originally posted by: M8Y7_Masood_fathi


    (I rewrite my question here as I was not able to attache the instruction file in the previous one).

    Thanks you so much. It has been a long time that I was looking for this instruction.
    I tried to install the Cplex-Matlab interface but I have a problem and I really don't know what the solution is. I already asked my colleagues and I found that they also had the same problem several times.
    Attached is the instruction which I followed to install the CPLEX-Malab interface and the mentioned error is as below: (it should be mentioned that this instruction is the one which my colleagues already used and most of them didn’t have any problem to install the CPLEX 12.1)
    Would you please do me favor and help with this problem as well.

    Sincere appreciation in advance,
    Masood

    >> cplexgui
    ??? Error using ==> load
    Unable to read MAT-file C:\Program
    Files\IBM\ILOG\CPLEX_Studio_Academic123\cplex\examples\src\matlab\cplexgui.fig

    File may be corrupt.

    Error in ==> hgload>localLoadFile at 177
    AllVars = load(filename, '-mat');

    Error in ==> hgload at 59
    FigVersion, FigData, VerNum = localLoadFile(filename);

    Error in ==> openfig at 72
    fig, savedvisible = hgload(filename, struct('Visible','off'));

    Error in ==> gui_mainfcn>local_openfig at 286
    gui_hFigure = openfig(name, singleton, visible);

    Error in ==> gui_mainfcn at 159
    gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt,
    gui_Visible);

    Error in ==> cplexgui at 55
    gui_mainfcn(gui_State, varargin{:});
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Installing CPLEX-Matlab interface

    Posted Tue November 29, 2011 12:27 PM

    Originally posted by: John Cui


    except cplexgui.m, how about other examples? Do they work?

    John Cui
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Installing CPLEX-Matlab interface

    Posted Tue November 29, 2011 01:17 PM

    Originally posted by: M8Y7_Masood_fathi


    Really thanks for replying me. I tried to run another example and following is the Error.
    (Note:I got a new license through the IBM website three days ago)

    ??? Error using ==> Cplex.Cplex at 746
    CPLEX Error 32201: ILM Error 16: CPLEX: license file not found or unreadable.
    Error in ==> Vw_final_Test at 24
    cplex=Cplex('Vw problem');
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Installing CPLEX-Matlab interface

    Posted Wed November 30, 2011 10:09 AM

    Originally posted by: John Cui


    Looks like a license issue, did you install our license correctly? Maybe you need to take a look the license doc.

    John Cui
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Installing CPLEX-Matlab interface

    Posted Wed November 30, 2011 12:15 PM

    Originally posted by: M8Y7_Masood_fathi


    I followed the below instruction,I also found a link on IBM website which is really helpful (http://download.boulder.ibm.com/ibmdl/pub/software/dw/university/support/ILOGQuickStart.pdf)and I instilled the CPLEX again. luckily, the license problem is solved and I solved my problem using the new version (12.3) in 8.84 sec.. However, I still have the same problem with "cplexgui".

    Instruction:

    Install cplex (32 bit version)
    Copy ILM folder into ILOG folder
    Open Matlab. Go to File->Set Path…->Add with Subfolders…->(ILOG folder)
    It should work now. Try “cplexgui” command. A user interface should appear.
    If Cplex doesn’t work, try setting the following environmental variable.
    In Windows: Go to Control Panel->System->Advanced System Settings
    Click on “Environment Variables…” and select new
    Variable name: ILOG_LICENSE_KEY or ILOG_LICENSE_FILE
    Variable value: path of ILM folder

    Regards,
    Masood
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Installing CPLEX-Matlab interface

    Posted Wed November 30, 2011 02:25 PM

    Originally posted by: PingLiu


    I can use such cplexmilp.m in MATLAb, but I cannot run >> cplexgui in matlab.
    what's wrong with it?
    every time I run
    >> cplexgui
    

    the error will be like this
    ??? Error using ==> load
    Unable to read MAT-file C:\ILOG\CPLEX_Studio_Academic123\cplex\examples\src\matlab\cplexgui.fig
     
    File may be corrupt.
     
    Error in ==> hgload>localLoadFile at 177
    AllVars = load(filename, '-mat');
     
    Error in ==> hgload at 59
    [FigVersion, FigData, VerNum] = localLoadFile(filename);
     
    Error in ==> openfig at 72
        [fig, savedvisible] = hgload(filename, struct('Visible','off'));
     
    Error in ==> gui_mainfcn>local_openfig at 286
        gui_hFigure = openfig(name, singleton, visible);
     
    Error in ==> gui_mainfcn at 159
            gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt, gui_Visible);
     
    Error in ==> cplexgui at 55
       gui_mainfcn(gui_State, varargin{:});
    

    could you help me solve this problem?
    thanks a lot.
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Installing CPLEX-Matlab interface

    Posted Thu December 01, 2011 11:49 AM

    Originally posted by: John Cui


    Thanks for pointing out this. Looks like a bug in cplexgui example.
    But which is an example bug only, don't effect Cplex class and toolbox functions.

    John Cui
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: Installing CPLEX-Matlab interface

    Posted Thu December 01, 2011 03:20 PM

    Originally posted by: M8Y7_Masood_fathi


    Thanks for your response. I have solved several examples and it seems that there isn't any problem with CPLEX (The only problem is "cplexgui" example).

    Regards,
    Masood
    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: Installing CPLEX-Matlab interface

    Posted Tue March 06, 2012 10:09 PM

    Originally posted by: SystemAdmin


    I get the same error:

    ??? Error using ==> load
    Unable to read MAT-file
    D:\MathSoftware\IBM\ILOG\CPLEX_Studio_Preview124\cplex\examples\src\matlab\cplexgui.fig

    Also, I get the same error if I try to open cplexgui.fig directly in MATLAB.

    Is there a new uncorrupted version of cplexgui.fig?

    Derek O'Connor
    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: Installing CPLEX-Matlab interface

    Posted Tue March 06, 2012 10:37 PM

    Originally posted by: John Cui


    Sorry, that is in the fixpack of 12.4, you have to wait for this.

    Or if you have the old version CPLEX, say cplex122, cplex121, then you can just copy the file as a workaround.

    John Cui
    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: Installing CPLEX-Matlab interface

    Posted Wed April 11, 2012 03:00 AM

    Originally posted by: SystemAdmin


    The fixpack for CPLEX 12.4 should now be available here.
    #CPLEXOptimizers
    #DecisionOptimization