Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Does the .lp file contains the optimal solution?

    Posted 02/23/16 10:03 AM

    Originally posted by: Thomas_321


    Hello everyone,

    I´m trying to have a look at my optimal solution for each variable. So I read the .lp file to see what cplex is actually calculating and as far as I understood the .lp file shows me what is calculated in the optimal solution?

    Yet i´m a little bit confused about the values I get in my .lp file.

    In my optimization model for example I get the following values:

    10.8 x({"P1","A",10.2,11.2}) + 14.88 x({"P2","A",15.3,14.6}) ......

    in my understanding x1 can "choose" between 10.2 and 11.2 and does whatever is optimal. how come I get 10.8 as an output?

    If I´m wrong and the .lp file is the wrong place to look for my optimal model, where do I get the "final" or the optimal solution?

     

    Thank you and best regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Does the .lp file contains the optimal solution?

    Posted 02/23/16 01:49 PM

    The .lp file format is a problem description format, not a format to describe solutions. In this file you will see the objective and the constraints in a more or less human readable format.

    What the names in the .lp file mean and whether they are in any way related to the bounds of the variables depends on how you created that file. How did you do that?

    Solutions are typically exported to .sol files. This is an XML format in which you have the solutions for the variables.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Does the .lp file contains the optimal solution?

    Posted 02/23/16 02:01 PM

    Originally posted by: Thomas_321


    Hey Daniel,

    thanks a lot, that explains a lot.

    Where/how do I get the .sol file? 

    Does it contain the solution including all values?


    Thank you, regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Does the .lp file contains the optimal solution?

    Posted 02/24/16 03:25 AM

    How to dump a .sol file depends on the API. What API/programming language do you use?

    You may also want to take a look at the reference documentation: especially these chapters:

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Does the .lp file contains the optimal solution?

    Posted 02/24/16 11:26 AM

    Originally posted by: Thomas_321


    Hey Daniel,

    Thanks for your answer. 

    I´m using OPL and unfortunately it´s not listed under those links.

    Is there a way to get it in OPL as well?

    I actually was hoping it would be as easy as creating a .lp file

     

    Best regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Does the .lp file contains the optimal solution?

    Posted 02/24/16 12:32 PM

    I don't know if this is possible in OPL or how to do that. You may want to ask on the OPL Forum.

    Since you are using OPL anyway, why not use the OPL facilities to analyze your solution? For example the solution explorer in the IDE or OPL Script?


    #CPLEXOptimizers
    #DecisionOptimization