Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  MATLAB + CPLEX + mcc = Mucho Problems

    Posted 02/08/18 09:23 AM

    Originally posted by: JohannesNL


    Hi guys,

    There are some compatibility issues between MATLAB and CPLEX, so I hope I can get some help :).
    Everything would be much appreciated!

    I'm programming in Matlab and using it as a wrapper for Cplex. 
    Matlab has a built-in command to create a stand-alone executable (mcc).
    It's my first time using this command and the script doesn't have any problems running it. 
    However, when I run this command, I get the following error:

    Error using matlab.depfun.internal.cacheMtree (line 29) 
    MATLAB code 'C:\Program 
    Files\IBM\ILOG\CPLEX_Studio126\cplex\matlab\x86_win32\@Cplex\Cplex.m' contains 
    the following syntax error(s): 
    L 248 (C 7-14): FUNCTION keyword use is invalid here. This might cause later 
    messages about END. 
    L 1040 (C 4-6): Parse error at END: usage might be invalid MATLAB syntax. 

    Googling this problem leads to mathworks pointing fingers at IBM.

    So, I checked the compatibility on this website: 
    https://www-01.ibm.com/support/docview.wss?uid=swg27019100 .

    I use Matlab 2015a and Cplex 12.6.0. 
    My laptop has a 32 bit OS and Matlab 2015a is one of the last versions that supports 32 bit systems. 
    Hence I can't take a newer version for now.
    Using the website stated above, I should use Cplex 12.7.0. 
    But I can't download older versions of Cplex. Only the 12.8 version shows up on the productfinder.

    So, should I stick to 12.6 or upgrade to 12.8?
    Is Matlab 2017b with Cplex 12.8 the best combination atm?
    Can I use multiple versions of Cplex at the same time?

    The stand-alone executable looks really handy and it would mean that I'ld only have to install Cplex on a machine to run my script.
    I have a 64 bit desktop at home, so if my laptop can't create the executable, then I should still be able to create it using my desktop.
    However, I'ld rather keep the versions on my systems close to each other as it would mean that the code can't be transferred as easily as now (I use 2015a or b on my desktop).
    But in case I might resort to this option;
    Which known combination of Matlab and Cplex would run the mcc-command?

    Thanks in advance :).

    Kind regards,

    Johannes


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: MATLAB + CPLEX + mcc = Mucho Problems

    Posted 02/08/18 10:12 AM

    To be extra sure, you should use a matlab/CPLEX combination that is officially supported.

    The error you report seems to be indeed a bug in Cplex.m: In the class definition a 'methods' declaration is missing at the line that raises the error. If you know some matlab then you might try going ahead and just insert that definition in Cplex.m. The problem is fixed in 12.7, so upgrading to that version may be fix the issue as well (if you have to stick with 32bit).

    About downloading older versions of CPLEX: Some people wanted to do the same and asked here how to do it. Can you please find the respective threads and check whether they can help you?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: MATLAB + CPLEX + mcc = Mucho Problems

    Posted 02/08/18 11:32 AM

    Originally posted by: JohannesNL


    - I can't change those files. They seem to be protected or something.

                 I can rename the file, but I can't place any new files in there as well.

    - I can't find any older version of cplex. I just contacted a sales representative of IBM and he couldn't help me either.

                 IBM just doesn't distribute older versions when a newer one is out.

    - I've looked around but I can't seem to find those threads about downloading older versions.

    I've spent the entire day on this issue and my options seem to be clear;

    1) no executable

    2) downgrade matlab even further on my 32 bit machine

    3) upgrade my 64 bit system

    Thanks for your response daniel.

    I'm not going to invest even more time on this issue.

    I hope this helps other people.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: MATLAB + CPLEX + mcc = Mucho Problems

    Posted 02/08/18 12:17 PM

    Not being able to rename/edit/move these files is probably a permission problem that your system administrator can fix. This is unrelated to CPLEX.

    In case you revise your decision and still want to spend some more time: if you are an academic you can send an email to aimember(at)us(dot)ibm(dot)com and explain exactly which version you need an why (requiring a 32bit version is a good reason for that purpose). If you are a commercial customer then please come back to daniel(dot)junglas(at)de(dot)ibm(dot)com and I will put you in contact with the right person to get you this old version.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: MATLAB + CPLEX + mcc = Mucho Problems

    Posted 02/09/18 07:13 AM

    Originally posted by: JohannesNL


    It is my laptop and I have full administrator privileges.

    I will give it another try. 

    I'll update you as soon as I know more.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: MATLAB + CPLEX + mcc = Mucho Problems

    Posted 02/09/18 07:42 AM

    Originally posted by: JohannesNL


    I was able to copy the file and modify it.

    Then I renamed the old file and gave my file the same name. 

    However, the script has to be rewritten completely.

    It calls functions within a control loop which is prohibited in (this version of) Matlab.

    When I take out 1 function, the errors moves towards the next function.

    And the entire file consists of 1000 lines of comments and nested functions.

    This is something the developers have to fix.


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: MATLAB + CPLEX + mcc = Mucho Problems

    Posted 02/09/18 09:28 AM

    It should be fixed for 12.7. I am not sure we can provide a fix for a version as old as 12.6.


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: MATLAB + CPLEX + mcc = Mucho Problems

    Posted 02/16/18 06:02 AM

    Originally posted by: JohannesNL


    Yes, but 12.7 can't be downloaded from IBM's website anymore :(.

    If I get to try out this command using cplex 12.8 on my desktop, I'll let you guys know the results.


    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: MATLAB + CPLEX + mcc = Mucho Problems

    Posted 02/16/18 06:07 AM

    If you have a good reason to still need 12.7 then you can send an email to aimember(at)us(dot)ibm(dot)com and ask for this version. Please explain (in detail) why you need the old version and also specify the platform for which you need it.


    #CPLEXOptimizers
    #DecisionOptimization