Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Access to output variables

    Posted 01/04/15 06:34 PM

    Originally posted by: prashanw


    The cplex optimizer prints out  values like the one shown in the attachment (also given below).. If I want to plot how the "Best Integer" improved over time (i.e I need access to all the printed out values) how can I get access to the values that are printed out? Is there documentation that shows how to access these variables?

     

    Thanks!

     

     
            Nodes                                         Cuts/
       Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap
     
    *     0+    0                            0.8223        0.2605     6767   68.32%
          0     0        0.5010   168        0.8223        0.5010     6767   39.07%
          0     0        0.6409   142        0.8223      Cuts: 20     7323   22.05%
          0     0        0.7205   299        0.8223      Cuts: 17     7940   12.37%
          0     0        0.7205   325        0.8223      Cuts: 16     8039   12.37%
          0     0        0.7205   284        0.8223       Cuts: 2     8131   12.37%
          0     0        0.7205   232        0.8223      Cuts: 44     8406   12.37%
          0     0        0.7205   323        0.8223       Cuts: 8     8655   12.37%
          0     2        0.7205   304        0.8223        0.7206     8655   12.37%
    Elapsed time = 48.80 sec. (6871.27 ticks, tree = 0.01 MB, solutions = 8)
    *     3+    3                            0.8223        0.7206     9331   12.37%
    *     3+    3                            0.8222        0.7206     9331   12.36%
          3     5        0.7206   268        0.8222        0.7206     9331   12.36%
         65    29        0.7616   137        0.8222        0.7206    12477   12.36%
        287    62        0.7723    51        0.8222        0.7219    18867   12.21%

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Access to output variables

    Posted 01/06/15 06:47 AM

    If you want to have that exact information then the easiest thing is to redirect this output and parse it.

    A better option would be to use an info callback and query the information from that callback when it is invoked.

    What programming API are you using? Thins are slightly different between the various APIs.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Access to output variables

    Posted 01/06/15 12:02 PM

    Originally posted by: prashanw


    Thanks for your reply!

    I am using the python API. What the best documentation to refer to for this?


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Access to output variables

    Posted 01/06/15 01:51 PM

    You can see an example of this in the Best Practices Using the CPLEX Python API presentation here.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Access to output variables

    Posted 01/08/15 01:30 AM

    Originally posted by: prashanw


    Thanks!..The slides were very helpful!......so when I get a solution I am assuming that it's related to the incumbent_objective, then what exactly is the definition of the "best_objective_value"? and do I get a solution associated with the best objective value? 


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Access to output variables

    Posted 01/08/15 02:28 AM

    "best_objective_value" is the dual bound. If you solved your problem to optimality then this should be the same as the incumbent's objective value (modulo tolerances). There is no x-vector associated with "best_objective_value" since in general there need not exist a feasible solution with this objective value. The value is just a bound on how good the optimal objective can possibly be.


    #CPLEXOptimizers
    #DecisionOptimization