Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Issue with CPLEX when CBC gives feasible result

  • 1.  Issue with CPLEX when CBC gives feasible result

    Posted Sun October 18, 2020 02:43 AM

    Hello, I am currently using CPLEX with Pyomo to solve an optimization problem but am running into issues. When I use CPLEX, I get the following results:

    Problem:

    - Lower bound: -inf

    Upper bound: inf

    Number of objectives: 1

    Number of constraints: 0

    Number of variables: None

    Number of nonzeros: None

    Sense: unknown

    Solver:

    - Status: ok

    Termination condition: unknown

    Error rc: 0

    Time: 0.018349170684814453

    When I run the exact same problem using CBC, I get the correct feasible solution and the following output:

    Problem:

    - Name: unknown

    Lower bound: 7769610119.0

    Upper bound: 7769610119.0

    Number of objectives: 1

    Number of constraints: 70081

    Number of variables: 61328

    Number of nonzeros: 56656

    Sense: minimize

    Solver:

    - Status: ok

    User time: -1.0

    System time: 3.84

    Wallclock time: 3.77

    Termination condition: optimal

    Termination message: Model was solved to optimality (subject to tolerances), and an optimal solution is available.

    Statistics:

    Branch and bound:

    Number of bounded subproblems: None

    Number of created subproblems: None

    Black box:

    Number of iterations: 37773

    Error rc: 0

    Time: 3.8004262447357178

    The only thing I am changing between the two runs is the solver. I can not seem to figure out why CBC gives a feasible solution but CPLEX does not.

    Any help is much appreciated!

    Thank you in advance,

    Marissa






    #DecisionOptimization
    #Support
    #SupportMigration


  • 2.  RE: Issue with CPLEX when CBC gives feasible result
    Best Answer

    Posted Sun October 18, 2020 03:46 AM

    I solved this problem and here is what I did in case it is useful for someone else. I had the wrong term for the solver tolerance defined in my problem. I was able to see this error by adding tee=True as is shown below:

    opt = pyomo.SolverFactory(solver)

    results = opt.solve(model, tee=True)

    By doing this, I was able to see the error that the cplex solver was encountering.






    #DecisionOptimization
    #Support
    #SupportMigration