Skip to content

Add Knitro interface to CVXPY for Quadratic Problems and Conic Problems#1

Merged
eminyouskn merged 78 commits intomasterfrom
knitro
Jul 24, 2025
Merged

Add Knitro interface to CVXPY for Quadratic Problems and Conic Problems#1
eminyouskn merged 78 commits intomasterfrom
knitro

Conversation

@eminyouskn
Copy link
Copy Markdown
Owner

Description

This pull request has the goal of adding the Knitro solver interface to the cvxpy module.

Type of change

  • New feature (backwards compatible)
  • New feature (breaking API changes)
  • Bug fix
  • Other (Documentation, CI, ...)

Contribution checklist

  • Add our license to new files.
  • Check that your code adheres to our coding style.
  • Write unittests.
  • Run the unittests and check that they’re passing.
  • Run the benchmarks to make sure your change doesn’t introduce a regression.

eminyouskn added 30 commits May 13, 2025 10:36
@eminyouskn eminyouskn requested a review from mstanartelys June 11, 2025 15:17
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 27, 2025

Benchmarks that have stayed the same:

   before           after         ratio
 [e6d60294]       [b63bdec9]
      2.93±0s          3.08±0s     1.05  quantum_hilbert_matrix.QuantumHilbertMatrix.time_compile_problem
      1.67±0s          1.70±0s     1.02  tv_inpainting.TvInpainting.time_compile_problem
      254±0ms          259±0ms     1.02  simple_QP_benchmarks.SimpleQPBenchmark.time_compile_problem
      1.35±0s          1.37±0s     1.01  matrix_stuffing.ParamConeMatrixStuffing.time_compile_problem
      714±0ms          720±0ms     1.01  matrix_stuffing.ConeMatrixStuffingBench.time_compile_problem
      13.3±0s          13.3±0s     1.01  finance.CVaRBenchmark.time_compile_problem
      567±0ms          569±0ms     1.00  simple_QP_benchmarks.ParametrizedQPBenchmark.time_compile_problem
      1.88±0s          1.88±0s     1.00  simple_QP_benchmarks.UnconstrainedQP.time_compile_problem
     44.4±0ms         44.4±0ms     1.00  matrix_stuffing.SmallMatrixStuffing.time_compile_problem
      5.41±0s          5.41±0s     1.00  semidefinite_programming.SemidefiniteProgramming.time_compile_problem
      5.26±0s          5.23±0s     0.99  svm_l1_regularization.SVMWithL1Regularization.time_compile_problem
      1.09±0s          1.09±0s     0.99  finance.FactorCovarianceModel.time_compile_problem
      4.63±0s          4.59±0s     0.99  huber_regression.HuberRegression.time_compile_problem
      2.37±0s          2.35±0s     0.99  simple_LP_benchmarks.SimpleFullyParametrizedLPBenchmark.time_compile_problem
      240±0ms          237±0ms     0.98  gini_portfolio.Murray.time_compile_problem
      1.05±0s          1.03±0s     0.98  gini_portfolio.Cajas.time_compile_problem
      843±0ms          829±0ms     0.98  simple_QP_benchmarks.LeastSquares.time_compile_problem
      291±0ms          286±0ms     0.98  matrix_stuffing.ParamSmallMatrixStuffing.time_compile_problem
      246±0ms          241±0ms     0.98  high_dim_convex_plasticity.ConvexPlasticity.time_compile_problem
      11.7±0s          11.5±0s     0.98  simple_LP_benchmarks.SimpleLPBenchmark.time_compile_problem
      23.0±0s          22.5±0s     0.98  sdp_segfault_1132_benchmark.SDPSegfault1132Benchmark.time_compile_problem
      350±0ms          341±0ms     0.98  gini_portfolio.Yitzhaki.time_compile_problem
      5.13±0s          5.00±0s     0.97  optimal_advertising.OptimalAdvertising.time_compile_problem
      308±0ms          298±0ms     0.97  slow_pruning_1668_benchmark.SlowPruningBenchmark.time_compile_problem
      964±0ms          930±0ms     0.97  simple_LP_benchmarks.SimpleScalarParametrizedLPBenchmark.time_compile_problem

@eminyouskn eminyouskn merged commit c32d9e0 into master Jul 24, 2025
53 of 54 checks passed
@eminyouskn eminyouskn deleted the knitro branch July 24, 2025 20:37
eminyouskn added a commit that referenced this pull request Aug 6, 2025
* Add Knitro interface to CVXPY for Quadratic Problems and Conic Problems (#1)

* Add KNITRO solver to the list of available solvers

* Add KNITRO QP and Conic solver interfaces

* Add KNITRO citation to the citation dictionary

* Add KNITRO QP and Conic solver interface implementation

* Add KNITRO to doc

* Add KNITRO to ci for optional solvers

* Use KNITRO_LICENSE instead of KNITRO_CI.

* Fix KNITRO installation condition for macOS architecture check

* Update copyright in conic_solver.py and qp_solver.py

* Update copyright information

* Reverse back the copyright

* Remove unused import statement for knitro in KNITRO solver classes

* Add import statement for Knitro solver in KNITRO classes

* Remove unused import statement for Knitro in KNITRO solver classes

* Add documentation reference for Knitro status mapping in KNITRO solver classes

* Fix formatting of KNITRO license echo command in CI workflow

---------

Co-authored-by: William Zijie Zhang <89562186+Transurgeon@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants