Decision Optimization

Expand all | Collapse all

Problems with MIP start

  • 1.  Problems with MIP start

    Posted Thu April 02, 2020 11:08 AM

    Originally posted by: trebron


    Howdy,

    I run into an exception with cplex.addMIPStart() that  I do not understand. I ocuurs only on one of my larger instances that is solved using an iterative approach.

    Everything  works fine for a couple of iterations, but in the 6-th I end up with the error message

    *** ERROR[ENGINE_001] at 61:0 ./MyApplication.mod: Exception from IBM ILOG Concert: addMIPStart: arrays with diffferent sizes.
    ### CONCERT exception: addMIPStart: arrays with diffferent sizes
    

    A dump of the array-sizes just before the call of addMIPStart() does not indicate any differences

        writeln("sizes; x="+subModel.x.size +";  edge-solution="+theModel.Current_Edge_Solution.size)
        cplex.addMIPStart(subModel.x, theModel.Current_Edge_Solution)
    

    leads to

    sizes; x=126135;  edge-solution=126135
    

    Are there any known issues related to that topic? I am using version: 12.8.0.0

     

    Cheers

       Norbert



  • 2.  Re: Problems with MIP start

    Posted Fri April 03, 2020 07:10 AM

    Hi,

    1) Can you try with 12.10 ?

    2) In https://www.linkedin.com/pulse/making-decision-optimization-simple-alex-fleischer/

    you chose

    Warm start through API : addMIPStart

    can you try

    Write and read MST files : warm start ?

    3) Then it's time to log a support request

    regards



  • 3.  Re: Problems with MIP start

    Posted Sat April 04, 2020 02:02 AM
      |   view attached

    Originally posted by: trebron


    Dear Alex,

    thanks for the hints. I'll give it a try.

    In a first attempt I modified your zoo-example a bit and was wondering what the working directory of OPL-IDE is.

    main
    {
        thisOplModel.generate();
    
        var filenameLp = "zoo.lp";
        cplex.exportModel(filenameLp);
    
        cplex.solve();
        var filename = "zooSolution.mst";
       //var filename = "c://temp//zooSolution.mst";
        thisOplModel.postProcess();
    
        cplex.writeMIPStarts(filename, 0, 1);
    }
    

    The dump of the lp-work fine whereas the dump of the solution file yields

    Ausnahme von IBM ILOG CPLEX: CPLEX Error  1422: Could not open file 'zooSolution.mst' for writing. 
    Ausnahme von IBM ILOG CPLEX: CPLEX status = 1422.    zoo.mod   

    Moreover
    * It works fine with oplrun and the mst-file is written.

    * The mst-file is as well written within the IDE if I specify a complete path (e.g., "c://temp//zooSolution.mst")

    I'm confused. Is that behaviour to be expected?

    (mod file is enclosed).

     

    Cheers

       Norbert

     

    Attachment(s)

    mod
    zoo.mod   601 B 1 version


  • 4.  Re: Problems with MIP start

    Posted Mon April 06, 2020 03:01 AM

    Hi,

    I tried your model zoo.mod

    The .mst file is written in folder CPLEX_Studio1210\opl\oplide when you do not specify an absolute path.

    The error you got is probably because you do not have write access in that folder

    Knowing this you could use a relative path from there, for instance

    var filename = "../../zooSolution.mst";

    works fine and writes the .mst file in a parent folder

    regards



  • 5.  Re: Problems with MIP start

    Posted Mon April 06, 2020 03:20 AM

    Originally posted by: trebron


    Hi Alex,

    thanks for your answer - that is what I expected. What I still do not understand is why we have a different behaviour for  exportModel() and  writeMIPStarts().

    For exportModel() the file is always written relative to the mod-file, while writeMIPStarts() only for oplrun, otherwise realtive to the installation path. That is not really intuitive. Is there a sound reason for that?

    By the way: The workaround with writing and reading the mst-file worked for CPLEX 12.8. I'll give a newer CPLEX-version a try as well...

     

    Take care and stay healthy!

     

    Cheers

       Norbert

     

     



  • 6.  Re: Problems with MIP start

    Posted Mon April 06, 2020 11:57 AM

    Hi,

    we know about this and do not hesitate to log a wish in Aha https://ibm-data-and-ai.ideas.aha.io/?project=CPLEX

    regards



  • 7.  Re: Problems with MIP start

    Posted Wed April 08, 2020 05:40 AM

    Originally posted by: trebron


    Hi Alex,

    I did so, knowing that the feature is only "nice-to-have".

    Thanks.

    Norbert