Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  I am getting different solutions

    Posted 11/11/08 06:59 PM

    Originally posted by: SystemAdmin


    [Yajaira said:]

    Hi.

    I am solving a problem using the L-shaped method (Bender's Decomposition) for a biobjective (time-cost) problem using the epsilon contstraint method. I know the Parete Front because I solved the equivalent deterministic problem with the epsilon constraint. Then I am trying to get this with the L-shaped and the epsilon constraint, but I can not get the complete Pareto Front, some points are not correct (the function cost is higher). I solve the problem using version 11.2 and I get eight from 12 points, and then I sove the problem using version 9.0 and I get 7 form 12 points. Then I am getting some points on version 9.0, others in version 11.2 and other are incorrect in both versions, the thing I can not understand is How can I get some point on one version and then I lost the point when I chance the cplex version. I look for the default parameters but until I can see everything is the same, so I can find what is the difference between one thing and other.


    On each iteration on the L-shaped I solved a MIP problem (master) and a LP problem (subproblem) until I can see, I thing the first iteration has a big influence on the convergence point, specially the master solution. The Cplex Interactive gives me a solution different from the given b the Callable Library and I have tried to get this solution for starting the L-shaped method on the Callable Library but I can not get it.

    Thanks and pardon me because the english writting.

    Yajaira Cardona


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: I am getting different solutions

    Posted 11/15/08 04:33 AM

    Originally posted by: SystemAdmin


    [jgregory said:]

    Hello Yajaira,

    The lack of replies so far is not due to any deficiencies in your writing, but because you have tackled a hard (but interesting) problem and there are several potential pitfalls that might all be interacting.  I suspect you will find this reply both overwhelming and insufficient. :)  Quite a lot of work may be necessary to understand what is going on with your problem.  I am writing somewhat in the hope and expectation that you are working on academic research and can devote the time and effort necessary.

    First, since you are seeing different algorithmic results when running a given model in the Interactive Optimizer versus within your Callable Library environment, I ask whether you exporting the model using CPLEX's binary SAV format, or in the (ASCII) readable MPS or LP format?  The latter are more convenient because you can look at them yourself, but they suffer the disadvantage that they are not an exact representation of the problem CPLEX was seeing inside your program.  SAV format will be that exact image.  Two ways that these formats can differ are 1) floating point values may not be exactly representable in decimal ASCII format, and 2) the order of variables and constraints may become different when the ASCII formats are read back in.  (The good news is that, given a SAV file, you can still obtain MPS or LP versions to look at by reading and then writing using the Interactive Optimizer.)

    In principle, you might expect the order of rows and columns should not matter, in determining the optimal solution.  However, many models allow multiple optimal solutions.  It is an unfortunate fact of life that the algorithms used for solving linear programs and extensions like MIP will take different paths based on how ties are broken during various computations, or in extreme cases ordering can even affect the results (computing a+b-a versus a-a+b if the value of 'a' is large can lead to a loss of significant digits for 'b' on finite precision computers).

    For similar reasons, when a model possesses multiple optimal solutions, two different versions of CPLEX may reach two different answers, both optimal but perhaps quite different qualitatively.

    Apart from having multiple optima, some models are numerically ill-conditioned - these would be characterized by very large changes in the solution values (including potentially the objective function) given only very small changes in input data.  Again because of finite precision on computers, such models may likewise vary in the optimal solutions CPLEX will deliver, if re-run under virtually any perturbation (reordered rows and columns, different CPLEX versions, different computer hardware or operating system).

    From your description, I am taking a guess that your master problem typically possesses multiple optima, and the subproblems may have both multiple optima and ill-conditioning.  The choice of "epsilons" in particular seems a likely area for introducing numerical instability without realizing it.  CPLEX operates using various tolerance values - in the Interactive Optimizer you may get an idea about some of these by looking at the choices under "set simplex tolerances" - in particular, the default values of the feasibility and optimality tolerances of 1e-6,  might be interacting harmfully with the epsilons you are choosing.  This could lead to otherwise-feasible solutions to be rejected, or even for infeasible solutions to be accepted - or conceivably if your choice of epsilon is very small it may in effect be nearly ignored.  It is probably better to choose your epsilon in light of CPLEX's default tolerances, rather than to change CPLEX's tolerances to somehow try to "manage" your epsilons.  You could try an epsilon in your model as large as 0.01 (if I'm understanding generally how these epsilons are being used in your decomposition) and see whether you get more robust behavior than with epsilons closer to zero.  If this tactic helps, then you may have some difficult choices  to balance the need for tight epsilons versus getting reliable results.

    One tool to try, very conveniently in the Interactive Optimizer, is the solution quality report.  When you have a solution, type "display solution quality".  For a Mixed Integer problem, you will get a different group of quality measures than for a continuous model.  For Mixed Integer, the entries involving "error" should be small, say 1e-6 or smaller, or else it's an indication of some trouble.  For continuous models, the items marked infeasibility and residuals would be the place to look, for similar values; and it also shows the "Condition number" (sometimes called Kappa) of the basis, which is a very useful indication of the numerical issue I raised above - a value of up to 1e+08 for Kappa is usually pretty safe, but values creeping up above that can be a symptom of real trouble.  The orders of magnitude for Kappa roughly correspond to the number of decimal digits of significance, and double precision (which is what CPLEX uses) has only about 16 digits so a really large Kappa can mean that accuracy of the computations is questionable.  On a Mixed Integer model, which is solved by considering many many continuous submodels, you can get an idea of a typical Kappa value either by relaxing the problem to LP ("change problem lp") and solving it and then viewing the solution quality display, or by treating the integer solution as an LP by changing the problem type ("change problem fixed") and solving it and viewing the solution quality.  You might try experimenting with different sizes of your "epsilon" to see whether it is having an effect on Kappa.

    There is a section in the CPLEX User's Manual, in the LP section, titled "Interpreting solution quality", that might give you further insights on the solution quality report.  But I'm afraid there are few absolute recommendations anyone can make, and if your decomposition framework is suffering from numerical instability then a good deal of experimentation, and art, will be necessary.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Thank you

    Posted 11/19/08 08:30 PM

    Originally posted by: SystemAdmin


    [Yajaira said:]

    Hi

    First of all I [i]need[/i] to say thanks, THANKS. This is one of the longest academic mail I received like help :-) I am working on my master thesis, so I have the time for working on this problem and I try to put enough effort for doing this, although some times I get disappointed for the strange results of my programs :-)

    I read some times your answer because I was identifying the different things you write about. Just now I am reviewing some of the things you mentioned, for example I get the kappa for the master problem (MIP) and always is -1, at least in the example I am working on, then on the subproblems (Continuous) I get numbers like 15, 139, ... etcetera I am still looking for the meaning of the negative value I get on the kappa for the master problem ...

    Then maybe I did not can explain the meaning of the epsilon on the last message, I work with the epsilon constraint method for the biobjective problem, the objectives are cost (f_1) and time (f_2), I have results that shows that I can get the Pareto Front passing the objective time as a constraint, so I have f_2 <= epsilon, the parameter is moving each time one unit, so, the basic thing here is that for each epsilon I am solving an L-shaped (Iterative: master-subproblem). Anyway your comment about the tolerances is significant for me, because I move the integrability and optimality values when I saw bad results and because the stop criteria for the L-shaped.<br />
    Until now I finally understand why I get different solution when solving with the Callable Library and when solving on the interactive form. I am populating my problem by rows, then I create an LP version for reviewing how was it working, but when solving I do not ask for that representation, after populating I solve using [i]mipopt[/i] then I solve the subproblem with [i]primopt[/i]. I was suspecting that the problem converge to the optimal cost value when solving with the interactive (it was using the LP format), in some sense I was thinking that the solution given to the master problem on the first iteration was influencing the convergence of the problem (The answer I get on the Callable Library is different from the given by the Interactive) But as you say, the problem takes different paths. But I observe another strange thing that makes me change my suposition. The problem is not because the use of the Interactive or the Callable Library version,  is another thing.  If you fixed a point for the epsilon, say 17, and you solve (I am referring to the Callable Library) two times, only for checking, I get this on the first time (509547, 17) and on the second time (492933, 17), the second one is the optimum. I am using a "for cicle" I am not solving one time and then other, then I thought something is happening, then I asked for doing more than twice and I observe that only the first iteration is different, always I get the value I am looking  when running twice or more times after the second iteration (according to the for cicle) ¿do you see this logical?

    Then I take the Optimal Pareto Front and I check for each point that is not optimum and the surprise is that the optimum is always "hide" since second iteration. And if you take one point knowing that is correct (optimum) and you run two or more times you always get solution that you know, the optimal.


    Greetings


    Yajaira Cardona




    Greetings and thanks again


    Yajaira Cardona
    #DecisionOptimization
    #MathematicalProgramming-General