Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cvxpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
HIGHS as HIGHS,
IPOPT as IPOPT,
KNITRO as KNITRO,
PIPS as PIPS,
get_num_threads as get_num_threads,
set_num_threads as set_num_threads,
)
10 changes: 8 additions & 2 deletions cvxpy/problems/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
from cvxpy.reductions.solvers.conic_solvers.conic_solver import ConicSolver
from cvxpy.reductions.solvers.defines import SOLVER_MAP_CONIC, SOLVER_MAP_QP
from cvxpy.reductions.solvers.nlp_solvers.ipopt_nlpif import IPOPT as IPOPT_nlp
from cvxpy.reductions.solvers.nlp_solvers.pips_nlpif import PIPS as PIPS_nlp
from cvxpy.reductions.solvers.qp_solvers.qp_solver import QpSolver
from cvxpy.reductions.solvers.solver import Solver
from cvxpy.reductions.solvers.solving_chain import (
Expand Down Expand Up @@ -1219,8 +1220,13 @@ def _solve(self,
verbose, solver_opts=kwargs)
self.unpack_results(solution, smooth_chain, inverse_data)
else:
nlp_reductions = reductions + [Expr2Smooth(smooth_approx=False),
IPOPT_nlp()]
nlp_reductions = reductions + [Expr2Smooth(smooth_approx=False)]
if solver is None:
nlp_reductions += [IPOPT_nlp()]
elif solver.upper() == 'IPOPT':
nlp_reductions += [IPOPT_nlp()]
elif solver.upper() == 'PIPS':
nlp_reductions += [PIPS_nlp()]
nlp_chain = SolvingChain(reductions=nlp_reductions)
problem, inverse_data = nlp_chain.apply(problem=self)
solution = nlp_chain.solver.solve_via_data(problem, warm_start,
Expand Down
5 changes: 3 additions & 2 deletions cvxpy/reductions/solvers/defines.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from cvxpy.reductions.solvers.conic_solvers.sdpa_conif import SDPA as SDPA_con
from cvxpy.reductions.solvers.conic_solvers.xpress_conif import XPRESS as XPRESS_con
from cvxpy.reductions.solvers.nlp_solvers.ipopt_nlpif import IPOPT as IPOPT_nlp
from cvxpy.reductions.solvers.nlp_solvers.pips_nlpif import PIPS as PIPS_nlp

# QP interfaces
from cvxpy.reductions.solvers.qp_solvers.copt_qpif import COPT as COPT_qp
Expand Down Expand Up @@ -84,7 +85,7 @@
MPAX_qp(),
KNITRO_qp(),
]
solver_nlp_intf = [IPOPT_nlp()]
solver_nlp_intf = [IPOPT_nlp(), PIPS_nlp()]

SOLVER_MAP_CONIC = {solver.name(): solver for solver in solver_conic_intf}
SOLVER_MAP_QP = {solver.name(): solver for solver in solver_qp_intf}
Expand All @@ -111,7 +112,7 @@
s.DAQP,
s.MPAX,
s.KNITRO]
NLP_SOLVERS = [s.IPOPT]
NLP_SOLVERS = [s.IPOPT, s.PIPS]
DISREGARD_CLARABEL_SDP_SUPPORT_FOR_DEFAULT_RESOLUTION = True
MI_SOLVERS = [s.GLPK_MI, s.MOSEK, s.GUROBI, s.CPLEX,
s.XPRESS, s.CBC, s.SCIP, s.HIGHS, s.COPT,
Expand Down
Loading
Loading