Pyomo / pyomo

An object-oriented algebraic modeling language in Python for structured optimization problems.
https://www.pyomo.org
Other
2.04k stars 522 forks source link

GDPopt LBB doesn't solve trivial GDP #2483

Open emma58 opened 2 years ago

emma58 commented 2 years ago

Summary

The GDPopt LBB algorithm does not find a solution for a problem where the Boolean solution is already fixed.

Steps to reproduce the issue

m = ConcreteModel()
m.x = Var(bounds=(0, 3))
m.d = Disjunction(expr=[[m.x ** 2 >= 3, m.x >= 3], [m.x ** 2 <= -1, m.x <= -1]])
m.o = Objective(expr=m.x)
m.d.disjuncts[1].indicator_var.fix(False)

result = SolverFactory('gdpopt.lbb').solve(
            m, tee=True,
            minlp_solver=minlp_solver,
            minlp_solver_args=minlp_args,
        )

gives the following log:

Starting GDPopt version 22.5.13 using LBB algorithm
iterlim: 100
time_limit: 600
tee: true
logger: <Logger pyomo.contrib.gdpopt (INFO)>
mip_solver: gurobi
mip_solver_args:
nlp_solver: ipopt
nlp_solver_args:
minlp_solver: baron
minlp_solver_args:
local_minlp_solver: bonmin
local_minlp_solver_args:
bound_tolerance: 1.0e-06
small_dual_tolerance: 1.0e-08
integer_tolerance: 1.0e-05
constraint_tolerance: 1.0e-06
variable_tolerance: 1.0e-08
zero_tolerance: 1.0e-15
check_sat: false
solve_local_rnGDP: false

If you use this software, you may cite the following:
        - Implementation:
        Chen, Q; Johnson, ES; Bernal, DE; Valentin, R; Kale, S;
        Bates, J; Siirola, JD; Grossmann, IE.
        Pyomo.GDP: an ecosystem for logic based modeling and optimization
        development.
        Optimization and Engineering, 2021.
Original model has 2 constraints (1 nonlinear) and 1 disjunctions, with 2 variables, of which 1 are binary, 0 are integer, and 1 are continuous.
Nodes: 0 LB -inf Unbranched 1
Nodes: 1 LB -inf Unbranched 1
Exploring node 0 with LB -inf UB inf and 1 inactive disjunctions.
Nodes: 1 LB 2.999997 Unbranched 1
Branching on disjunction d
Added 0 new nodes with 0 relaxed disjunctions to the heap. Size now 0.

Solved in 0 iterations and 0.02952 seconds
Optimal objective value inf
Relative optimality gap nan%
No feasible solutions found.

And a termination condition of unknown

Information on your system

Pyomo version: GDPopt rewrite branch (#2406) Python version: Operating system: How Pyomo was installed (PyPI, conda, source): Solver (if applicable):

Additional information

Note: this model actually hits a different bug in the current version of GDPopt that will be fixed by #2406, so this is a looking-into-my-crystal-ball issue.

blnicho commented 2 years ago

We should add a disclaimer or warning to the solver output until we have a chance to figure out the issue.