@@ -42,13 +42,18 @@ MPAX implements two state-of-the-art first-order methods for solving LP problems
42
42
* $\boldsymbol{\mathrm{r^2}}$** HPDHG** : [ reflected restarted Halpern Primal-Dual Hybrid Gradient] ( https://arxiv.org/abs/2407.16144 ) .
43
43
44
44
### Solving a Single LP Problem
45
-
45
+ MPAX supports both dense and sparse formats for the constraint matrix, controlled by the ` use_sparse_matrix ` parameter.
46
46
``` python
47
47
from mpax import create_lp, r2HPDHG
48
48
49
- lp = create_lp(c, A, b, G, h, l, u)
49
+ # Create LP using sparse matrix format (default)
50
+ lp = create_lp(c, A, b, G, h, l, u) # use_sparse_matrix=True by default
51
+
52
+ # Create LP using dense matrix format
53
+ lp = create_lp(c, A, b, G, h, l, u, use_sparse_matrix = False )
54
+
50
55
solver = r2HPDHG(eps_abs = 1e-4 , eps_rel = 1e-4 , verbose = True )
51
- result = solver.optimize(lp)
56
+ result = solver.optimize(lp) # jittable
52
57
```
53
58
54
59
### Batch solving
@@ -125,16 +130,19 @@ pso_fun.defvjp(spo_fwd, spo_bwd)
125
130
| ` debug ` | bool | ` False ` | Activates additional debugging information. |
126
131
| ` display_frequency ` | int | ` 10 ` | Frequency (in every termination check) for displaying solver statistics. |
127
132
| ` jit ` | bool | ` True ` | Enables JIT (Just-In-Time) compilation for faster execution. |
128
- | ` unroll ` | bool | ` False ` | Unrolls iteration loops. |
133
+ | ` unroll ` | bool | ` False ` | Unrolls iteration loops |
134
+ | ` warm_start ` | bool | ` False ` | Whether to perform warm starting |
135
+ | ` feasibility_polishing ` | bool | ` False ` | Whether to perform feasibility polishing |
129
136
130
137
** Termination**
131
138
| Parameter | Type | Default | Description |
132
139
| :----------------------------------:| :--------:| :-------------:| -----------------------------------------------------------------------|
133
140
| ` eps_abs ` | float | ` 1e-4 ` | Absolute tolerance for convergence. |
134
141
| ` eps_rel ` | float | ` 1e-4 ` | Relative tolerance for convergence. |
135
142
| ` eps_primal_infeasible ` | float | ` 1e-8 ` | Tolerance for detecting primal infeasibility. |
136
- | ` eps_dual_infeasible ` | float | ` 1e-8 ` | Tolerance for detecting dual infeasibility. |
137
- | ` iteration_limit ` | int | ` max_int ` | Maximum number of iterations allowed (interpreted as unlimited by default). |
143
+ | ` eps_dual_infeasible ` | float | ` 1e-8 ` | Tolerance for detecting dual infeasibility |
144
+ | ` eps_feas_polish ` | float | ` 1e-6 ` | Tolerance for feasibility polishing |
145
+ | ` iteration_limit ` | int | ` max_int ` | Maximum number of iterations allowed (interpreted as unlimited by default) |
138
146
139
147
** Precision**
140
148
0 commit comments