MindtPy will support appsi_highs solver after #2887 gets merged. However, feasibility pump tests still fail after #2903 .
It's a little bit weird since MindtPy works well with appsi_cplex and appsi_gurobi. Therefore, I am wondering if there is anything special or different with appsi_highs?
-----------------------------------------------------------------------------------------------
Mixed-Integer Nonlinear Decomposition Toolbox in Pyomo (MindtPy)
-----------------------------------------------------------------------------------------------
For more information, please visit
https://pyomo.readthedocs.io/en/stable/contributed_packages/mindtpy.html
If you use this software, please cite the following:
Bernal, David E., et al. Mixed-integer nonlinear decomposition toolbox for Pyomo (MindtPy).
Computer Aided Chemical Engineering. Vol. 44. Elsevier, 2018. 895-900.
Original model has 2 constraints (2 nonlinear) and 0 disjunctions, with 2 variables, of which 1 are binary, 0 are integer, and 1 are continuous.
FP is the initial strategy being used.
===============================================================================================
Iteration | Subproblem Type | Objective Value | Primal Bound | Dual Bound | Gap | Time(s)
Moving objective to constraint set.
- Relaxed NLP 1 inf 1 nan% 0.08
1 FP-MIP 0.281353 inf 1 nan% 0.12
1 FP-NLP 0.01 inf 1 nan% 0.15
2 FP-MIP 0.9 inf 1 nan% 0.16
2 FP-NLP 1.49165e-09 inf 1 nan% 0.20
* 1 Fixed NLP 2.43845 2.43845 1 58.99% 0.23
FP-MIP infeasible
Primal integral : 0.0000
Dual integral : 0.0000
Primal-dual gap integral : 0.0000
.
----------------------------------------------------------------------
Output of MindtPy with appsi_highs
-----------------------------------------------------------------------------------------------
Mixed-Integer Nonlinear Decomposition Toolbox in Pyomo (MindtPy)
-----------------------------------------------------------------------------------------------
For more information, please visit
https://pyomo.readthedocs.io/en/stable/contributed_packages/mindtpy.html
If you use this software, please cite the following:
Bernal, David E., et al. Mixed-integer nonlinear decomposition toolbox for Pyomo (MindtPy).
Computer Aided Chemical Engineering. Vol. 44. Elsevier, 2018. 895-900.
Original model has 2 constraints (2 nonlinear) and 0 disjunctions, with 2 variables, of which 1 are binary, 0 are integer, and 1 are continuous.
FP is the initial strategy being used.
===============================================================================================
Iteration | Subproblem Type | Objective Value | Primal Bound | Dual Bound | Gap | Time(s)
Moving objective to constraint set.
- Relaxed NLP 1 inf 1 nan% 0.07
Running HiGHS 1.5.3 [date: 2023-08-11, git hash: c3ca042f7]
Copyright (c) 2023 HiGHS under MIT licence terms
1 FP-MIP 0.281353 inf 1 nan% 0.08
1 FP-NLP 0.01 inf 1 nan% 0.12
2 FP-MIP 0 inf 1 nan% 0.12
2 FP-NLP 1.33798e-16 inf 1 nan% 0.17
E
======================================================================
ERROR: test_FP (__main__.TestMindtPy)
Test the feasibility pump algorithm.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/zedongpeng/Github/pyomo/pyomo/contrib/mindtpy/tests/test_mindtpy_feas_pump.py", line 62, in test_FP
results = opt.solve(
File "/Users/zedongpeng/Github/pyomo/pyomo/contrib/mindtpy/MindtPy.py", line 113, in solve
return SolverFactory(_supported_algorithms[config.strategy][0]).solve(
File "/Users/zedongpeng/Github/pyomo/pyomo/contrib/mindtpy/algorithm_base_class.py", line 2713, in solve
self.MindtPy_initialization()
File "/Users/zedongpeng/Github/pyomo/pyomo/contrib/mindtpy/algorithm_base_class.py", line 788, in MindtPy_initialization
self.fp_loop()
File "/Users/zedongpeng/Github/pyomo/pyomo/contrib/mindtpy/algorithm_base_class.py", line 2462, in fp_loop
self.handle_fp_subproblem_optimal(fp_nlp)
File "/Users/zedongpeng/Github/pyomo/pyomo/contrib/mindtpy/algorithm_base_class.py", line 2343, in handle_fp_subproblem_optimal
self.handle_subproblem_optimal(fixed_nlp)
File "/Users/zedongpeng/Github/pyomo/pyomo/contrib/mindtpy/algorithm_base_class.py", line 1160, in handle_subproblem_optimal
add_no_good_cuts(
File "/Users/zedongpeng/Github/pyomo/pyomo/contrib/mindtpy/cut_generation.py", line 327, in add_no_good_cuts
raise ValueError(
ValueError: Binary y = 0.10000000869092351 is not 0 or 1
The difference is the second iteration of the feasibility pump.
Output of appsi_cplex
2 FP-MIP 0.9 inf 1 nan% 0.16
Result of solving FP-MIP
Problem:
- Lower bound: 0.8999999913090765
Upper bound: 0.8999999913090765
Number of objectives: 1
Number of constraints: 0
Number of variables: 0
Sense: 1
Solver:
- Status: ok
Termination condition: optimal
Termination message: TerminationCondition.optimal
Solution:
- number of solutions: 1
number of solutions displayed: 1
- Gap: 0.0
Status: optimal
Objective: No values
Variable:
x1:
Value: 1
x2:
Value: 1
x5:
Value: 1
x6:
Value: 0.8999999913090765
Constraint: No values
Output of appsi_highs
2 FP-MIP 0 inf 1 nan% 0.12
Result of solving FP-MIP
Problem:
- Lower bound: 0.0
Upper bound: 0.0
Number of objectives: 1
Number of constraints: 0
Number of variables: 0
Sense: 1
Solver:
- Status: ok
Termination condition: optimal
Termination message: TerminationCondition.optimal
Solution:
- number of solutions: 1
number of solutions displayed: 1
- Gap: 0.0
Status: optimal
Objective: No values
Variable:
MindtPy_utils.objective_value[1]:
Value: 1
x:
Value: 1
y:
Value: 0.10000000869092351
Constraint: No values
Summary
MindtPy will support
appsi_highs
solver after #2887 gets merged. However, feasibility pump tests still fail after #2903 . It's a little bit weird since MindtPy works well withappsi_cplex
andappsi_gurobi
. Therefore, I am wondering if there is anything special or different withappsi_highs
?Steps to reproduce the issue
Use MindtPy on the
mindtpy-rewrite
branch.Error Message
Output when using MindtPy with
appsi_cplex
Output of MindtPy with
appsi_highs
The difference is the second iteration of the feasibility pump. Output of
appsi_cplex
Output of
appsi_highs
I set the
update_config
all toTrue
.Information on your system
Pyomo version: 6.6.2.dev0 Python version: 3.10.12 Operating system: macOS How Pyomo was installed (PyPI, conda, source): source Solver (if applicable): appsi_cplex, appsi_highs, ipopt
Additional information