Skip to content
Open
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ After building the project, the `./build/cupdlpx` binary can be invoked from the
| `--opt_norm` | `string` | Norm for optimality criteria: `l2` or `linf` | `l2` |
| `--eps_opt` | `double` | Relative optimality tolerance. | `1e-4` |
| `--eps_feas` | `double` | Relative feasibility tolerance. | `1e-4` |
| `--eps_infeasible` | `double` | Relative tolerance on the ray certificate for declaring infeasibility. | `1e-10` |
| `--geo_mean_iter` | `int` | Iterations of geometric-mean scaling | `12` |
| `--l_inf_ruiz_iter` | `int` | Iterations of L-inf Ruiz rescaling| `10` |
| `--no_pock_chambolle` | `flag` | Disable Pock-Chambolle rescaling | `enabled` |
Expand Down
2 changes: 1 addition & 1 deletion python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Below is a list of commonly used parameters, their internal keys, and descriptio
| `OptimalityNorm` | `optimality_norm` | string | `"l2"` | Norm for optimality criteria. Use `"l2"` for L2 norm or `"linf"` for infinity norm. |
| `OptimalityTol` | `eps_optimal_relative` | float | `1e-4` | Relative tolerance for optimality gap. Solver stops if the relative primal-dual gap ≤ this value. |
| `FeasibilityTol` | `eps_feasible_relative` | float | `1e-4` | Relative feasibility tolerance for primal/dual residuals. |
| `InfeasibleTol` | `eps_infeasible_relative` | float | `1e-14` | Relative tolerance on the ray certificate for declaring primal/dual infeasibility. |
| `InfeasibleTol` | `eps_infeasible_relative` | float | `1e-10` | Relative tolerance on the ray certificate for declaring primal/dual infeasibility. |
| `GeoMeanIters` | `geometric_mean_iterations` | int | `12` | Number of iterations of geometric-mean scaling. Improves numerical conditioning. |
| `RuizIters` | `l_inf_ruiz_iterations` | int | `10` | Number of iterations of L∞ Ruiz scaling. Improves numerical conditioning. |
| `UsePCAlpha` | `has_pock_chambolle_alpha` | bool | `True` | Whether to use the Pock–Chambolle α step size adjustment. |
Expand Down
7 changes: 7 additions & 0 deletions src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ void print_usage(const char *prog_name)
fprintf(stderr,
" --eps_feas <tolerance> "
"Relative feasibility tolerance (default: 1e-4).\n");
fprintf(stderr,
" --eps_infeasible <tolerance> "
"Relative infeasibility tolerance (default: 1e-10).\n");
fprintf(stderr,
" --geo_mean_iter <int> "
"Iterations of geometric-mean scaling (default: 12).\n");
Expand Down Expand Up @@ -271,6 +274,7 @@ int main(int argc, char *argv[])
{"iter_limit", required_argument, 0, 1002},
{"eps_opt", required_argument, 0, 1003},
{"eps_feas", required_argument, 0, 1004},
{"eps_infeasible", required_argument, 0, 1005},
{"eps_feas_polish", required_argument, 0, 1006},
{"feasibility_polishing", no_argument, 0, 'f'},
{"geo_mean_iter", required_argument, 0, 1018},
Expand Down Expand Up @@ -325,6 +329,9 @@ int main(int argc, char *argv[])
case 1004: // --eps_feas
params.termination_criteria.eps_feasible_relative = atof(optarg);
break;
case 1005: // --eps_infeasible
params.termination_criteria.eps_infeasible_relative = atof(optarg);
break;
case 1006: // --eps_feas_polish_relative
params.termination_criteria.eps_feas_polish_relative = atof(optarg);
break;
Expand Down
7 changes: 4 additions & 3 deletions src/utils.cu
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ void set_default_parameters(pdhg_parameters_t *params)
params->termination_criteria.time_sec_limit = 3600.0;
params->termination_criteria.iteration_limit = INT32_MAX;
params->termination_criteria.eps_feas_polish_relative = 1e-6;
params->termination_criteria.eps_infeasible_relative = 1e-14;
params->termination_criteria.eps_infeasible_relative = 1e-10;

params->restart_params.artificial_restart_threshold = 0.36;
params->restart_params.sufficient_reduction_for_restart = 0.2;
Expand Down Expand Up @@ -1268,10 +1268,11 @@ void compute_infeasibility_information(pdhg_solver_state_t *state)
state->variable_rescaling);

state->max_primal_ray_infeasibility =
get_vector_inf_norm(state->blas_handle, state->num_constraints, state->primal_slack);
get_vector_inf_norm(state->blas_handle, state->num_constraints, state->primal_slack) /
state->constraint_bound_rescaling;
double dual_scratch_norm =
get_vector_inf_norm(state->blas_handle, state->num_variables, state->infeasibility_dual_scratch);
state->max_dual_ray_infeasibility = dual_scratch_norm;
state->max_dual_ray_infeasibility = dual_scratch_norm / state->objective_vector_rescaling;

double scaling_factor = fmax(dual_ray_inf_norm, dual_scratch_norm);
if (scaling_factor > 0.0)
Expand Down
Loading