Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Problems with some Cplex parameters in Java

    Posted 12/01/16 08:10 AM

    Originally posted by: BiceK


    Dear all,

    I have modeled a stochastic MIP using two stage stochastic programming (with binary and integer first stage decisions) and trying to solve it using L-Shaped Method. Because it is generating worse solutions than extensive form solution for some datasets(and for the rest it gives the same solution with extensive form solution), I have started to investigate the reason behind this and decided to experiment with cplex parameters of EpInt, EpGap, EpAGap and EpRHS.

    While experimenting, I have realized some problems that I could not understand:

    First problem is about EpGap and EpAGap. I was expecting that when both equals to zero EpAGap would force more than EpGap and lead to an optimal status. However, with only EpGap I can obtain "optimal " status but with only EpAGap I always get a worse solution and "OptimalTol" status and therefore I could not figure out why zero absolute gap is generating a worse solution than zero relative gap.

    On the other hand, while using LazyConstraintCallBack for branch and cut, solving problem by setting EpInt to zero is generating a better solution than extensive form solution which should be impossible therefore, I am confused about the function of EpInt parameter. By the way, I am rounding all integer first stage variables(like from 0.00000000001 to 0) manually using Math.round in Java at each node.

     

    All kinds of suggestions and inputs are welcome

    Thanks in advance


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Problems with some Cplex parameters in Java

    Posted 12/06/16 12:32 AM

    If you only set one of EpGap and EpAGap to 0 then the other is still non-zero then CPLEX is still allowed to stop if the non-zero parameter is satisfied. This is why you may get OptimalTol if you only set one of the two to 0. If you want to guarantee that you always get an Optimal status then you have to set both parameters to zero.

    The fact that you can produce a better solution when using the LazyConstraintCallback indicates that either you have significant numerical trouble (try enabling NumericalEmphasis parameter) or that you have a bug in your implementation. In order to assess this, you should write out the super-optimal solution and check which constraints it violates in the extensive formulation. You can either do this manually or use add the solution as MIP start to the extensive formulation and then run the conflict refiner.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Problems with some Cplex parameters in Java

    Posted 12/08/16 06:29 AM

    Originally posted by: BiceK


    Firstly, thank you for your answer, it helped me a lot.

    I have implemented parameter settings in all of them and get the same solutions in all of the methods but in this case I have faced with another problem. While running program with different instances, for some of them standard L-Shaped and/or branch-and-cut based L-Shaped(with LazyConstraintCallback)solution differs from extensive problem solution. And, when I remove some of the parameter settings such as NumericalEmphasis or EpRHS it again gives the desired solution but some other instances require these parameter settings. Therefore, my parameter settings are seem to be dependent on problem instances. Now I am trying to solve this by generating a more reasonable data. At this point, can data sets be my problem or should I look for something else. All of the parameters that I set are listed below.

            main.setParam(IloCplex.Param.MIP.Strategy.Search, IloCplex.MIPSearch.Traditional);
            main.setParam(IloCplex.Param.Threads, 1);
            main.setParam(IloCplex.DoubleParam.EpGap, 0);
            main.setParam(IloCplex.DoubleParam.EpAGap, 0);
            main.setParam(IloCplex.BooleanParam.Emphasis.Numerical, true);
            main.setParam(IloCplex.DoubleParam.EpRHS, 1e-9);

     

    Thank you.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Problems with some Cplex parameters in Java

    Posted 12/09/16 03:09 AM

    If you get different results depending on whether numerical emphasis is enabled or not, then this clearly points at numerical issues in your model or code (or to a bug in CPLEX). Do you for example have a large range of coefficients in your data?

    And btw, when you set numerical emphasis, do you set it for both the solve for the extensive formulation and the solve with the decomposition method? Did you check whether the solutions obtained with one method are feasible in the other model?


    #CPLEXOptimizers
    #DecisionOptimization