Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

CPLEX Interactive optimizer general questions

  • 1.  CPLEX Interactive optimizer general questions

    Posted Tue June 12, 2012 12:07 PM

    Originally posted by: SystemAdmin


    Hi all,

    To get a better understanding how this CPLEX solver works, I would like to clarify and raise some questions based on what I have seen when I solved my problem. Below here is the CPLEX optimizer when I gave the command opt which is to solve the problem. Answering my questions will help me to understand how this optimization solvers works. I kindly request to answer my questions as soon as possible.

    1. Why it has tried 2 times "Aggregator"? what does it generally do?

    2. How to know the total rows and columns since it has reduced here right?

    3. How to learn about the MIP emphasis and *search method*? Are there any other emphasis and search method for MIP other than the one listed here???
    4. What does this mode refers too
    Parallel mode: deterministic, using up to 4 threads.

    5. Could you please brief me what does that table signifies here shown below. I dont have clue how it works. What does each column represents.

    (Node Left Objective IInf Best Integer Best Bound ItCnt Gap)

    a) What does IInf, Best Bound, ItCnt, Gap refers too and how does it work for the problem?
    b) Is the iteration count is done globally for each constraint defined based on the problem?
    c) What is the use of Gap?
    d) What does Best Bound try to say?

    6. The output says it has found 4 solutions?....how to find other solutions?

    Here is the CPLEX Interactive optimizer window log

    CPLEX> opt
    Tried aggregator 2 times.
    MIP Presolve eliminated 1077 rows and 1046 columns.
    MIP Presolve modified 118 coefficients.
    Aggregator did 688 substitutions.
    Reduced MIP has 78 rows, 440 columns, and 2356 nonzeros.
    Reduced MIP has 11 binaries, 0 generals, 0 SOSs, and 0 indicators.
    Probing time = 0.00 sec.
    Tried aggregator 1 time.
    Presolve time = 0.05 sec.
    Found feasible solution after 0.06 sec. Objective = 0.0000
    Probing time = 0.00 sec.
    Clique table members: 4.
    MIP emphasis: balance optimality and feasibility.
    MIP search method: dynamic search.
    Parallel mode: deterministic, using up to 4 threads.
    Root relaxation solution time = 0.00 sec.

    Nodes Cuts/
    Node Left Objective IInf Best Integer Best Bound ItCnt Gap

    * 0+ 0 0.0000 92 ---
    0 0 2071.3152 11 0.0000 2071.3152 92 ---
    * 0+ 0 978.0000 2071.3152 92 111.79%
    0 0 1770.2542 11 978.0000 Cuts: 102 279 81.01%
    0 0 1730.1735 11 978.0000 Cuts: 111 476 76.91%
    * 0+ 0 1013.0000 1730.1735 476 70.80%
    0 0 1707.0642 11 1013.0000 Cuts: 99 622 68.52%
    0 0 1692.1570 11 1013.0000 Cuts: 93 728 67.04%
    0 0 1690.3150 11 1013.0000 Cuts: 55 836 66.86%
    0 0 1686.8129 11 1013.0000 Cuts: 38 930 66.52%
    0 0 1686.0921 11 1013.0000 Cuts: 38 976 66.45%
    0 0 1684.7987 11 1013.0000 Impl Bds: 18 997 66.32%
    0 0 1684.7092 11 1013.0000 Impl Bds: 2 1000 66.31%
    0 0 1684.7092 11 1013.0000 Impl Bds: 2 1002 66.31%
    * 0+ 0 1048.0000 1684.7092 1002 60.75%
    0 0 cutoff 1048.0000 1048.0000 1002 0.00%
    Elapsed real time = 0.30 sec. (tree size = 0.00 MB, solutions = 4)

    Clique cuts applied: 2
    Implied bound cuts applied: 222
    Flow cuts applied: 1
    Mixed integer rounding cuts applied: 9

    Root node processing (before b&c):
    Real time = 0.25
    Parallel b&c, 4 threads:
    Real time = 0.00
    Sync time (average) = 0.00
    Wait time (average) = 0.00
    -------
    Total (root+branch&cut) = 0.25 sec.

    Solution pool: 4 solutions saved.

    MIP - Integer optimal solution: Objective = 1.0480000000e+003
    Solution time = 0.31 sec. Iterations = 1002 Nodes = 0
    Deterministic time = 90.99 ticks (291.64 ticks/sec)

    Thanks in Advance!!!!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX Interactive optimizer general questions

    Posted Tue June 12, 2012 12:22 PM

    Originally posted by: SystemAdmin


    Did you look at the manual? Several of your questions are answered there. For example, there is the interactive tutorial here. And there is also a description of the log output here.
    Starting from these two links you should be able to figure out most of your questions.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPLEX Interactive optimizer general questions

    Posted Tue June 12, 2012 01:54 PM

    Originally posted by: SystemAdmin


    Hi Daniel,

    Thanks for the help. I could understand to some extent however I noticed a strange difference comparing the example in the documentation and my problem. In the documentation example log file I could see the column Nodes is being increased. But in my log file, throughout the solving the column Nodes value is zero. What does it signify here can you help me?
    Thanks
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: CPLEX Interactive optimizer general questions

    Posted Tue June 12, 2012 02:06 PM

    Originally posted by: SystemAdmin


    Hi,

    I would like to use specifically Multi Commodity Flow(MCF) cuts in my problem. How can I do that in CPLEX interactive optimizer?
    How to change MIPEmphasis value via command line?

    How to change MIPInterval value and MIPDisplay value via command line for a problem?

    Thanks
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: CPLEX Interactive optimizer general questions

    Posted Wed June 13, 2012 06:30 AM
    Hi,

    let me show you how to do with the cut you mentioned.

    In interactive cplex, you press s and then return in order to set a parameter

    And then

    Parameter to set: mip cuts mcfcut
    Present value for type of MCF cut generation: 0
     -1 = do not generate
      0 = automatic
      1 = moderate
      2 = aggressive
    New value for type of MCF cut generation: 2
    New value for type of MCF cut generation: 2
    


    All parameters are described in the documentation.

    Regards
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: CPLEX Interactive optimizer general questions

    Posted Wed June 13, 2012 10:32 AM

    Originally posted by: SystemAdmin


    Hi,

    Thanks for the info. I have few more question.
    When I give the command mipopt it generates a output. In the table ItCnt column represents the count. And also it gives several feasible solution until a optimal objective is achieved. So in my example shown below, 1002 iterations are performed for the optimal objective solution.

    How does this 1002 iterations perform?

    Does 1 iteration refers to a complete loop of all constraints?

    Can I track how iterations are performed under each constraints while it is solving the problem?
    How to display or write other solutions? since in my example shown, there are 4 solutions found. I need to display and write other solutions too for comparison with my optimal solution.
    Nodes Cuts/
    Node Left Objective IInf Best Integer Best Bound ItCnt Gap

    • 0+ 0 0.0000 92 ---
    0 0 2071.3152 11 0.0000 2071.3152 92 ---
    • 0+ 0 978.0000 2071.3152 92 111.79%
    0 0 1770.2542 11 978.0000 Cuts: 102 279 81.01%
    0 0 1730.1735 11 978.0000 Cuts: 111 476 76.91%
    • 0+ 0 1013.0000 1730.1735 476 70.80%
    0 0 1707.0642 11 1013.0000 Cuts: 99 622 68.52%
    0 0 1692.1570 11 1013.0000 Cuts: 93 728 67.04%
    0 0 1690.3150 11 1013.0000 Cuts: 55 836 66.86%
    0 0 1686.8129 11 1013.0000 Cuts: 38 930 66.52%
    0 0 1686.0921 11 1013.0000 Cuts: 38 976 66.45%
    0 0 1684.7987 11 1013.0000 Impl Bds: 18 997 66.32%
    0 0 1684.7092 11 1013.0000 Impl Bds: 2 1000 66.31%
    0 0 1684.7092 11 1013.0000 Impl Bds: 2 1002 66.31%
    • 0+ 0 1048.0000 1684.7092 1002 60.75%
    0 0 cutoff 1048.0000 1048.0000 1002 0.00%
    Elapsed real time = 0.33 sec. (tree size = 0.00 MB, solutions = 4)

    Thanks
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: CPLEX Interactive optimizer general questions

    Posted Fri June 15, 2012 07:50 PM

    Originally posted by: SystemAdmin


    Hi,

    Kindly respond to my previous post in this thread. I need your help to understand...
    However I have pasted the same post here below,
    When I give the command mipopt it generates a output. In the table ItCnt column represents the count. And also it gives several feasible solution until a optimal objective is achieved. So in my example shown below, 1002 iterations are performed for the optimal objective solution.

    How does this 1002 iterations perform?

    Does 1 iteration refers to a complete loop of all constraints?

    Can I track how iterations are performed under each constraints while it is solving the problem?

    How to display or write other solutions? since in my example shown, there are 4 solutions found. I need to display and write other solutions too for comparison with my optimal solution.

    Nodes Cuts/
    Node Left Objective IInf Best Integer Best Bound ItCnt Gap

    0+ 0 0.0000 92 ---

    0 0 2071.3152 11 0.0000 2071.3152 92 ---

    0+ 0 978.0000 2071.3152 92 111.79%

    0 0 1770.2542 11 978.0000 Cuts: 102 279 81.01%
    0 0 1730.1735 11 978.0000 Cuts: 111 476 76.91%

    0+ 0 1013.0000 1730.1735 476 70.80%

    0 0 1707.0642 11 1013.0000 Cuts: 99 622 68.52%
    0 0 1692.1570 11 1013.0000 Cuts: 93 728 67.04%
    0 0 1690.3150 11 1013.0000 Cuts: 55 836 66.86%
    0 0 1686.8129 11 1013.0000 Cuts: 38 930 66.52%
    0 0 1686.0921 11 1013.0000 Cuts: 38 976 66.45%
    0 0 1684.7987 11 1013.0000 Impl Bds: 18 997 66.32%
    0 0 1684.7092 11 1013.0000 Impl Bds: 2 1000 66.31%
    0 0 1684.7092 11 1013.0000 Impl Bds: 2 1002 66.31%

    0+ 0 1048.0000 1684.7092 1002 60.75%

    0 0 cutoff 1048.0000 1048.0000 1002 0.00%
    Elapsed real time = 0.33 sec. (tree size = 0.00 MB, solutions = 4)
    Thanks
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: CPLEX Interactive optimizer general questions

    Posted Sun June 17, 2012 08:06 AM

    Originally posted by: SystemAdmin


    The iteration count in the log refers to simplex iterations. They are not related to particular constraints.
    In order to display the optimal solution with the interactive use
    CPLEX> display solution variables -
    

    this gives your the values of all variables that are not zero in the optimal solution. You can also display other parts of the solution (like slacks, reduced cost, etc.). So what you can display type
    CPLEX> display solution
    

    This will give you a list of what can be displayed.

    Non-optimal solutions that CPLEX finds during the search are stored in the solution pool. To display a solution from the solution pool do
    CPLEX> display solution member X variables
    

    and replace X by the index of the solution you want to display.

    In order to write solutions to disk use
    CPLEX> write optimal.sol
    

    or
    CPLEX> write pool.sol all
    

    to write either only the optimal solution to file 'optimal.sol' or all solutions in the solution pool to file 'pool.sol'. .sol files are XML files, the format of which is defined in files cplex/include/ilcplex/solution.xsd and cplex/include/ilcplex/solution.xsl of your COS installation.
    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: CPLEX Interactive optimizer general questions

    Posted Sun June 17, 2012 09:55 AM

    Originally posted by: SystemAdmin


    Hi,

    Thanks for the reply. I noticed something when I execute the mipopt command....
    MIP emphasis: balance optimality and feasibility.
    MIP search method: dynamic search.
    Parallel mode: deterministic, using up to 4 threads.

    In the above pasted result, you see its based on dynamic search method and has used parallel mode upto 4 threads....does it mean my model has been sub divided and performed the optimization? I have idea about dynamic search method but how this parallel mode works? Could you brief me to understand better.
    Solution pool: 4 solutions saved.

    MIP - Integer optimal solution: Objective = 1.0480000000e+003
    Solution time = 0.34 sec. Iterations = 353 Nodes = 0
    Deterministic time = 16.21 ticks (47.25 ticks/sec)
    In the above result pasted, and also you mentioned that iterations are simplex iterations not related to particular constraints in the problem....

    I would like to understand better whats the significant role of simplex iterations in the optimization model?

    What I have understood is, based on the constraints defined in my problem, all constraints will be defined in a loop so that it iterates until we find a objective of the problem? Does it how the optimization solves the model?

    It would be great if you give me some explanations, as I am confused when I referred some documentation pages.
    I request you to reply as soon as possible
    Thanks
    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: CPLEX Interactive optimizer general questions

    Posted Sun June 17, 2012 12:46 PM

    Originally posted by: SystemAdmin


    From the questions you ask it seems to me like you don't know how linear programming and mixed integer linear programming work in general? And you also don't know about the simplex algorithm?
    A "simplex iteration" is just one iteration of the simplex algorithm. It can be considered as a measure of how much work CPLEX has performed in solving your problem.

    Concerning "Parallel mode: deterministic, using up to 4 threads.": It means that CPLEX will use up to 4 threads to solve your problem. The 4 threads mainly come into play in the branch and bound phase of the solution algorithm. Using multiple threads CPLEX can process different nodes of the branch and bound tree simultaneously which usually speeds up solution times. And yes, during branch and bound your problem will be sub-divided, that is how branch and bound algorithms work.
    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: CPLEX Interactive optimizer general questions

    Posted Mon June 18, 2012 10:05 AM

    Originally posted by: SystemAdmin


    Thank you so much for your help
    #CPLEXOptimizers
    #DecisionOptimization


  • 12.  Re: CPLEX Interactive optimizer general questions

    Posted Sun June 17, 2012 11:23 AM

    Originally posted by: SystemAdmin


    Hi,

    I forgot to ask few more questions related to my previous post....
    Solution pool: 4 solutions saved.

    MIP - Integer optimal solution: Objective = 1.0480000000e+003
    Solution time = 0.34 sec. Iterations = 353 Nodes = 0
    Deterministic time = 16.21 ticks (47.25 ticks/sec)
    In the above result pasted, in my model, I see Nodes value is 0. What does it refer to and in which case it will increase? As, I have seen in other cplex examples nodes value increases every solution found.
    Another question related to solution file. Is it possible to write a solution file other than XML format???

    I request you to reply as soon as possible
    Thanks
    #CPLEXOptimizers
    #DecisionOptimization


  • 13.  Re: CPLEX Interactive optimizer general questions

    Posted Sun June 17, 2012 12:34 PM

    Originally posted by: SystemAdmin


    > Solution pool: 4 solutions saved.
    >
    > MIP - Integer optimal solution: Objective = 1.0480000000e+003
    > Solution time = 0.34 sec. Iterations = 353 Nodes = 0
    > Deterministic time = 16.21 ticks (47.25 ticks/sec)
    >
    >
    > In the above result pasted, in my model, I see Nodes value is 0. What does it refer to and in which case it will increase? As, I have seen in other cplex examples nodes value increases every solution found.
    >
    That is a wrong interpretation of the log file.
    "Nodes=0" means that CPLEX managed to solve your problem at the root node. It did not need to do any branching. The number of nodes is completely independent of the number of solutions found.

    > Another question related to solution file. Is it possible to write a solution file other than XML format???
    >
    Not directly. The XML file format is the only output format for solutions that is directly supported by CPLEX. It should be easy to transform this to any desired format using XSLT.
    With the interactive you can write the solution in text format to a file by temporarily changing the log file:
    
    CPLEX> set log solution.txt Logfile 
    'cplex.log' closed. Logfile 
    'solution.txt' open. CPLEX> display solution variables - Incumbent solution Variable Name           Solution Value x2                            1.000000 ... x831                          5.000000 All other variables in the range 1-842 are 0. CPLEX> set log cplex.log Logfile 
    'solution.txt' closed. Logfile 
    'cplex.log' open. CPLEX>
    

    After this the file 'solution.txt' will contain the solution's non-zero values.

    > I request you to reply as soon as possible
    >
    Please don't make such requests. This is a free of charge forum and people contribute to it when they find the time to do so. If you need fast responses then please turn to commercial support.
    #CPLEXOptimizers
    #DecisionOptimization