Commit e5fb94e
Add parameter support to DNLP diff engine
Enable cp.Parameter objects to be treated as updatable nodes in the C
expression DAG instead of being baked in as constants. On re-solve with
new parameter values, the cached DAG and sparsity structures are reused
via problem._nlp_cache, analogous to DPP for conic programs.
Requires SparseDiffPy PR #10 for make_parameter, problem_register_params,
and problem_update_params bindings. Tests skip gracefully until installed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5f3d6c3 commit e5fb94e
6 files changed
Lines changed: 467 additions & 53 deletions
File tree
- cvxpy
- problems
- reductions/solvers
- nlp_solvers
- diff_engine
- tests/nlp_tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
179 | 180 | | |
180 | 181 | | |
181 | 182 | | |
| |||
Lines changed: 31 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | | - | |
31 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
32 | 47 | | |
33 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
34 | 62 | | |
35 | 63 | | |
36 | 64 | | |
| |||
0 commit comments