Skip to content

Commit 4163b30

Browse files
authored
Merge pull request #7 from ZedongPeng/update_readme
Update readme
2 parents 0b4635a + 0935f19 commit 4163b30

File tree

3 files changed

+283
-278
lines changed

3 files changed

+283
-278
lines changed

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,18 @@ MPAX implements two state-of-the-art first-order methods for solving LP problems
4242
* $\boldsymbol{\mathrm{r^2}}$**HPDHG**: [reflected restarted Halpern Primal-Dual Hybrid Gradient](https://arxiv.org/abs/2407.16144).
4343

4444
### 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.
4646
```python
4747
from mpax import create_lp, r2HPDHG
4848

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+
5055
solver = r2HPDHG(eps_abs=1e-4, eps_rel=1e-4, verbose=True)
51-
result = solver.optimize(lp)
56+
result = solver.optimize(lp) # jittable
5257
```
5358

5459
### Batch solving
@@ -125,16 +130,19 @@ pso_fun.defvjp(spo_fwd, spo_bwd)
125130
| `debug` | bool | `False` | Activates additional debugging information. |
126131
| `display_frequency` | int | `10` | Frequency (in every termination check) for displaying solver statistics. |
127132
| `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 |
129136

130137
**Termination**
131138
| Parameter | Type | Default | Description |
132139
|:----------------------------------:|:--------:|:-------------:|-----------------------------------------------------------------------|
133140
| `eps_abs` | float | `1e-4` | Absolute tolerance for convergence. |
134141
| `eps_rel` | float | `1e-4` | Relative tolerance for convergence. |
135142
| `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) |
138146

139147
**Precision**
140148

0 commit comments

Comments
 (0)