Skip to content

Commit 80a036f

Browse files
committed
Always compute duals when dual_postsolve is enabled and re-order options in def file and group barrier options
1 parent 898ba15 commit 80a036f

2 files changed

Lines changed: 29 additions & 29 deletions

File tree

assets/optcuopt.def

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
*
22
* optcuopt.def
33
*
4-
solution_file string 1 "" 1 1 Controls the name of a file where cuOpt should write the solution
5-
user_problem_file string 1 "" 1 1 Controls the name of a file where cuOpt should write the user problem
64
num_cpu_threads integer 0 -1 -1 maxint 1 1 Controls the number of CPU threads used in the LP and MIP solvers (default GAMS Threads)
5+
presolve boolean 0 0 1 1 Controls whether presolve is enabled. Presolve can reduce problem size and improve solve time. Enabled by default for MIP, disabled by default for LP.
6+
dual_postsolve boolean 0 0 1 2 Controls whether dual postsolve is enabled. Disabling dual postsolve can improve solve time at the expense of not having access to the dual solution. Enabled by default for LP when presolve is enabled. This is not relevant for MIP problems
77
time_limit integer 0 maxint 0 maxint 1 1 Controls the time limit in seconds after which the solver will stop and return the current solution (default GAMS ResLim)
88
prob_read string 1 "" 1 1 Reads a problem from an MPS file
99
pdlp_solver_mode enumint 0 4 1 2 Controls the mode under which PDLP should operate
@@ -18,54 +18,53 @@ method enumint 0 0 1 2 Controls the method to solve the linear programming probl
1818
2 1 dual_simplex
1919
3 1 method_barrier
2020
iteration_limit integer 0 maxint 0 maxint 1 2 Controls the iteration limit after which the solver will stop and return the current solution (default GAMS IterLim)
21-
absolute_dual_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the absolute dual tolerance used in PDLP's dual feasibility check
22-
relative_dual_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the relative dual tolerance used in PDLP's dual feasibility check
23-
absolute_primal_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the absolute primal tolerance used in PDLP's primal feasibility check
24-
relative_primal_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the relative primal tolerance used in PDLP's primal feasibility check
25-
absolute_gap_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the absolute gap tolerance used in PDLP's duality gap check
26-
relative_gap_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the relative gap tolerance used in PDLP's duality gap check
27-
primal_infeasible_tolerance double 0 1e-08 0 maxdouble 0 2 Unknown
28-
dual_infeasible_tolerance double 0 1e-08 0 maxdouble 0 2 Unknown
2921
infeasibility_detection boolean 0 0 1 2 Controls whether PDLP should detect infeasibility
3022
strict_infeasibility boolean 0 0 1 2 Controls the strict infeasibility mode in PDLP
31-
per_constraint_residual boolean 0 0 1 2 Controls whether PDLP should compute the primal & dual residual per constraint instead of globally
32-
save_best_primal_so_far boolean 0 0 1 2 Controls whether PDLP should save the best primal solution so far
33-
first_primal_feasible boolean 0 0 1 2 Controls whether PDLP should stop when the first primal feasible solution is found
3423
crossover boolean 0 0 1 2 Controls whether PDLP should crossover to a basic solution after an optimal solution is found
35-
folding enumint 0 -1 1 2 Controls whether to fold the linear program. Folding can reduce problem size by exploiting symmetry in the problem
24+
save_best_primal_so_far boolean 0 0 1 2 Controls whether PDLP should save the best primal solution so far
25+
first_primal_feasible boolean 0 0 1 2 Controls whether PDLP should stop when the first primal feasible solution is found
26+
per_constraint_residual boolean 0 0 1 2 Controls whether PDLP should compute the primal & dual residual per constraint instead of globally
27+
folding enumint 0 -1 1 4 Controls whether to fold the linear program. Folding can reduce problem size by exploiting symmetry in the problem
3628
-1 1 automatic (default) cuOpt decides whether to fold based on problem characteristics
3729
0 1 disable folding
3830
1 1 force folding to run
39-
augmented enumint 0 -1 1 2 Controls which linear system to solve in the barrier method
40-
-1 1 automatic (default) cuOpt selects the best linear system to solve
41-
0 1 solve the ADAT system (normal equations)
42-
1 1 solve the augmented system
43-
dualize enumint 0 -1 1 2 Controls whether to dualize the linear program in presolve. Dualizing can improve solve time for problems, with inequality constraints, where there are more constraints than variables.
31+
dualize enumint 0 -1 1 4 Controls whether to dualize the linear program in presolve. Dualizing can improve solve time for problems, with inequality constraints, where there are more constraints than variables.
4432
-1 1 automatic (default) cuOpt decides whether to dualize based on problem characteristics
4533
0 1 don't attempt to dualize
4634
1 1 force dualize
47-
ordering enumint 0 -1 1 2 Controls the ordering algorithm used by cuDSS for sparse factorizations. The ordering can significantly impact solver run time
35+
ordering enumint 0 -1 1 4 Controls the ordering algorithm used by cuDSS for sparse factorizations. The ordering can significantly impact solver run time
4836
-1 1 automatic (default) cuOpt selects the best ordering
4937
0 1 cuDSS default ordering
5038
1 1 AMD (approximate minimum degree) ordering
51-
barrier_dual_initial_point enumint 0 -1 1 2 Controls the method used to compute the dual initial point for the barrier solver. The choice of initial point will affect the number of iterations performed by barrier
39+
augmented enumint 0 -1 1 4 Controls which linear system to solve in the barrier method
40+
-1 1 automatic (default) cuOpt selects the best linear system to solve
41+
0 1 solve the ADAT system (normal equations)
42+
1 1 solve the augmented system
43+
eliminate_dense_columns boolean 0 1 1 4 Controls whether to eliminate dense columns from the constraint matrix before solving. Eliminating dense columns can improve performance by reducing fill-in during factorization. However, extra solves must be performed at each iteration
44+
cudss_deterministic boolean 0 0 1 4 Controls whether cuDSS operates in deterministic mode. Deterministic mode ensures reproducible results across runs but may be slower
45+
barrier_dual_initial_point enumint 0 -1 1 4 Controls the method used to compute the dual initial point for the barrier solver. The choice of initial point will affect the number of iterations performed by barrier
5246
-1 1 automatic (default) cuOpt selects the best method
5347
0 1 use an initial point from a heuristic approach based on the paper "On Implementing Mehrotra’s Predictor–Corrector Interior-Point Method for Linear Programming" (SIAM J. Optimization, 1992) by Lustig, Martsten, Shanno.
5448
1 1 use an initial point from solving a least squares problem that minimizes the norms of the dual variables and reduced costs while statisfying the dual equality constraints.
55-
eliminate_dense_columns boolean 0 1 1 2 Controls whether to eliminate dense columns from the constraint matrix before solving. Eliminating dense columns can improve performance by reducing fill-in during factorization. However, extra solves must be performed at each iteration
56-
cudss_deterministic boolean 0 0 1 2 Controls whether cuDSS operates in deterministic mode. Deterministic mode ensures reproducible results across runs but may be slower
57-
presolve boolean 0 0 1 1 Controls whether presolve is enabled. Presolve can reduce problem size and improve solve time. Enabled by default for MIP, disabled by default for LP.
58-
dual_postsolve boolean 0 0 1 2 Controls whether dual postsolve is enabled. Disabling dual postsolve can improve solve time at the expense of not having access to the dual solution. Enabled by default for LP when presolve is enabled. This is not relevant for MIP problems
49+
absolute_primal_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the absolute primal tolerance used in PDLP's primal feasibility check
50+
relative_primal_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the relative primal tolerance used in PDLP's primal feasibility check
51+
absolute_dual_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the absolute dual tolerance used in PDLP's dual feasibility check
52+
relative_dual_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the relative dual tolerance used in PDLP's dual feasibility check
53+
absolute_gap_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the absolute gap tolerance used in PDLP's duality gap check
54+
relative_gap_tolerance double 0 0.0001 0 maxdouble 1 2 Controls the relative gap tolerance used in PDLP's duality gap check
55+
primal_infeasible_tolerance double 0 1e-08 0 maxdouble 0 2 Unknown
56+
dual_infeasible_tolerance double 0 1e-08 0 maxdouble 0 2 Unknown
57+
mip_heuristics_only boolean 0 0 1 3 Controls if only the GPU heuristics should be run
58+
mip_scaling boolean 0 1 1 3 Controls if scaling should be applied to the MIP problem
5959
mip_absolute_tolerance double 0 0.0001 0 maxdouble 1 3 Controls the MIP absolute tolerance
6060
mip_relative_tolerance double 0 0.0001 0 maxdouble 1 3 Controls the MIP relative tolerance
6161
mip_integrality_tolerance double 0 1e-05 0 maxdouble 1 3 Controls the MIP integrality tolerance
6262
mip_absolute_gap double 0 1e-10 0 maxdouble 1 3 Controls the absolute tolerance used to terminate the MIP solve (default GAMS OptCA)
6363
mip_relative_gap double 0 1e-5 0 maxdouble 1 3 Controls the relative tolerance used to terminate the MIP solve (default GAMS OptCR)
64-
mip_scaling boolean 0 1 1 3 Controls if scaling should be applied to the MIP problem
65-
mip_heuristics_only boolean 0 0 1 3 Controls if only the GPU heuristics should be run
6664
*
6765
* Groups
6866
*
6967
general group 1 1 General Options
7068
linear group 2 1 Linear Programming Options
7169
mip group 3 1 Mixed Integer Linear Programming Options
70+
barrier group 4 1 Barrier Solve Options

gmscuopt.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,10 @@ main (int argc, char *argv[])
428428
}
429429
gmoSetVarL(gmo, objective_coefficients);
430430

431-
int presolve;
431+
int presolve, dual_postsolve;
432432
cuOptGetIntegerParameter(settings, "presolve", &presolve);
433-
if (gmoModelType(gmo) != gmoProc_mip && !presolve) {
433+
cuOptGetIntegerParameter(settings, "dual_postsolve", &dual_postsolve);
434+
if (gmoModelType(gmo) != gmoProc_mip && (!presolve || dual_postsolve) ) {
434435
status = cuOptGetReducedCosts(solution, objective_coefficients); // reuse n-vector
435436
if (status != CUOPT_SUCCESS) {
436437
printOut(gev, "Error getting reduced cost: %d\n", status);

0 commit comments

Comments
 (0)