![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Parameters for PrimalDualHybridGradient() in primal_dual_hybrid_gradient.h. While the defaults are generally good, it is usually worthwhile to perform a parameter sweep to find good settings for a particular family of problems. The following parameters should be considered for tuning: - restart_strategy (jointly with major_iteration_frequency) - primal_weight_update_smoothing (jointly with initial_primal_weight) - presolve_options.use_glop - l_inf_ruiz_iterations - l2_norm_rescaling In addition, tune num_threads to speed up the solve.
Protobuf type operations_research.pdlp.PrimalDualHybridGradientParams
Definition at line 2934 of file PrimalDualHybridGradientParams.java.
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
com.google.protobuf.GeneratedMessage.FieldAccessorTable | internalGetFieldAccessorTable () |
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.addAllRandomProjectionSeeds | ( | java.lang.Iterable<? extends java.lang.Integer > | values | ) |
Seeds for generating (pseudo-)random projections of iterates during termination checks. For each seed, the projection of the primal and dual solutions onto random planes in primal and dual space will be computed and added the IterationStats if record_iteration_stats is true. The random planes generated will be determined by the seeds, the primal and dual dimensions, and num_threads.
repeated int32 random_projection_seeds = 28 [packed = true];
values | The randomProjectionSeeds to add. |
Definition at line 5313 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.addRandomProjectionSeeds | ( | int | value | ) |
Seeds for generating (pseudo-)random projections of iterates during termination checks. For each seed, the projection of the primal and dual solutions onto random planes in primal and dual space will be computed and added the IterationStats if record_iteration_stats is true. The random planes generated will be determined by the seeds, the primal and dual dimensions, and num_threads.
repeated int32 random_projection_seeds = 28 [packed = true];
value | The randomProjectionSeeds to add. |
Definition at line 5291 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.build | ( | ) |
Definition at line 3034 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.buildPartial | ( | ) |
Definition at line 3043 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clear | ( | ) |
Definition at line 2971 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearAdaptiveLinesearchParameters | ( | ) |
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;
Definition at line 4968 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearApplyFeasibilityPolishingAfterLimitsReached | ( | ) |
If true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached. This can result in a solution that is closer to feasibility, at the expense of violating the limit by a moderate amount.
optional bool apply_feasibility_polishing_after_limits_reached = 33 [default = false];
Definition at line 5847 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearApplyFeasibilityPolishingIfSolverIsInterrupted | ( | ) |
If true, feasibility polishing will be applied after the solver is interrupted. This can result in a solution that is closer to feasibility, at the expense of not stopping as promptly when interrupted.
optional bool apply_feasibility_polishing_if_solver_is_interrupted = 34 [default = false];
Definition at line 5911 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearDiagonalQpTrustRegionSolverTolerance | ( | ) |
The solve tolerance of the experimental trust region solver for diagonal QPs, controlling the accuracy of binary search over a one-dimensional scaling parameter. Smaller values imply smaller relative error of the final solution vector. TODO(user): Find an expression for the final relative error.
optional double diagonal_qp_trust_region_solver_tolerance = 24 [default = 1e-08];
Definition at line 5623 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearHandleSomePrimalGradientsOnFiniteBoundsAsResiduals | ( | ) |
See https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.
optional bool handle_some_primal_gradients_on_finite_bounds_as_residuals = 29 [default = true];
Definition at line 5475 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearInfiniteConstraintBoundThreshold | ( | ) |
Constraint bounds with absolute value at least this threshold are replaced with infinities. NOTE: This primarily affects the relative convergence criteria. A smaller value makes the relative convergence criteria stronger. It also affects the problem statistics LOG()ed at the start of the run, and the default initial primal weight, since that is based on the norm of the bounds.
optional double infinite_constraint_bound_threshold = 22 [default = inf];
Definition at line 5411 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearInitialPrimalWeight | ( | ) |
The initial value of the primal weight (i.e., the ratio of primal and dual step sizes). The primal weight remains fixed throughout the solve if primal_weight_update_smoothing = 0.0. If unset, the default is the ratio of the norm of the objective vector to the L2 norm of the combined constraint bounds vector (as defined above). If this ratio is not finite and positive, then the default is 1.0 instead. For tuning, try powers of 10, for example, from 10^{-6} to 10^6.
optional double initial_primal_weight = 8;
Definition at line 4449 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearInitialStepSizeScaling | ( | ) |
Scaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).
optional double initial_step_size_scaling = 25 [default = 1];
Definition at line 5188 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearL2NormRescaling | ( | ) |
If true, applies L_2 norm rescaling after the Ruiz rescaling. Heuristically this has been found to help convergence.
optional bool l2_norm_rescaling = 10 [default = true];
Definition at line 4694 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearLinesearchRule | ( | ) |
Linesearch rule applied at each major iteration.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];
Definition at line 4886 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearLInfRuizIterations | ( | ) |
Number of L_infinity Ruiz rescaling iterations to apply to the constraint matrix. Zero disables this rescaling pass. Recommended values to try when tuning are 0, 5, and 10.
optional int32 l_inf_ruiz_iterations = 9 [default = 5];
Definition at line 4634 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearLogIntervalSeconds | ( | ) |
Time between iteration-level statistics logging (if `verbosity_level > 1`). Since iteration-level statistics are only generated when performing termination checks, logs will be generated from next termination check after `log_interval_seconds` have elapsed. Should be >= 0.0. 0.0 (the default) means log statistics at every termination check.
optional double log_interval_seconds = 31 [default = 0];
Definition at line 4081 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearMajorIterationFrequency | ( | ) |
The frequency at which extra work is performed to make major algorithmic decisions, e.g., performing restarts and updating the primal weight. Major iterations also trigger a termination check. For best performance using the NO_RESTARTS or EVERY_MAJOR_ITERATION rule, one should perform a log-scale grid search over this parameter, for example, over powers of two. ADAPTIVE_HEURISTIC is mostly insensitive to this value.
optional int32 major_iteration_frequency = 4 [default = 64];
Definition at line 4157 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearMalitskyPockParameters | ( | ) |
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;
Definition at line 5089 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearNecessaryReductionForRestart | ( | ) |
For ADAPTIVE_HEURISTIC only: A relative reduction in the potential function by this amount triggers a restart if, additionally, the quality of the iterates appears to be getting worse. The value must be in the interval [sufficient_reduction_for_restart, 1). Smaller values make restarts less frequent, and larger values make them more frequent.
optional double necessary_reduction_for_restart = 17 [default = 0.9];
Definition at line 4830 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearNumShards | ( | ) |
For more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards. Results are computed independently for each shard and then combined. As a consequence, the order of computation, and hence floating point roundoff, depends on the number of shards so reproducible results require using the same value for num_shards. However, for efficiency num_shards should a be at least num_threads, and preferably at least 4*num_threads to allow better load balancing. If num_shards is positive, the computation will use that many shards. Otherwise a default that depends on num_threads will be used.
optional int32 num_shards = 27 [default = 0];
Definition at line 3785 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearNumThreads | ( | ) |
The number of threads to use. Must be positive. Try various values of num_threads, up to the number of physical cores. Performance may not be monotonically increasing with the number of threads because of memory bandwidth limitations.
optional int32 num_threads = 2 [default = 1];
Definition at line 3697 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearPresolveOptions | ( | ) |
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;
Definition at line 4531 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearPrimalWeightUpdateSmoothing | ( | ) |
This parameter controls exponential smoothing of log(primal_weight) when a primal weight update occurs (i.e., when the ratio of primal and dual step sizes is adjusted). At 0.0, the primal weight will be frozen at its initial value and there will be no dynamic updates in the algorithm. At 1.0, there is no smoothing in the updates. The default of 0.5 generally performs well, but has been observed on occasion to trigger unstable swings in the primal weight. We recommend also trying 0.0 (disabling primal weight updates), in which case you must also tune initial_primal_weight.
optional double primal_weight_update_smoothing = 7 [default = 0.5];
Definition at line 4369 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearRandomProjectionSeeds | ( | ) |
Seeds for generating (pseudo-)random projections of iterates during termination checks. For each seed, the projection of the primal and dual solutions onto random planes in primal and dual space will be computed and added the IterationStats if record_iteration_stats is true. The random planes generated will be determined by the seeds, the primal and dual dimensions, and num_threads.
repeated int32 random_projection_seeds = 28 [packed = true];
Definition at line 5335 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearRecordIterationStats | ( | ) |
If true, the iteration_stats field of the SolveLog output will be populated at every iteration. Note that we only compute solution statistics at termination checks. Setting this parameter to true may substantially increase the size of the output.
optional bool record_iteration_stats = 3;
Definition at line 3913 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearRestartStrategy | ( | ) |
NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default. If using a strategy other than ADAPTIVE_HEURISTIC, you must also tune major_iteration_frequency.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.RestartStrategy restart_strategy = 6 [default = ADAPTIVE_HEURISTIC];
Definition at line 4285 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearSchedulerType | ( | ) |
The type of scheduler used for CPU multi-threading. See the documentation of the corresponding enum for more details.
optional .operations_research.pdlp.SchedulerType scheduler_type = 32 [default = SCHEDULER_TYPE_GOOGLE_THREADPOOL];
Definition at line 3845 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearSufficientReductionForRestart | ( | ) |
For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative reduction in the potential function by this amount always triggers a restart. Must be between 0.0 and 1.0.
optional double sufficient_reduction_for_restart = 11 [default = 0.1];
Definition at line 4758 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearTerminationCheckFrequency | ( | ) |
The frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats. Termination checks do not affect algorithmic progress unless termination is triggered.
optional int32 termination_check_frequency = 5 [default = 64];
Definition at line 4221 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearTerminationCriteria | ( | ) |
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;
Definition at line 3590 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearUseDiagonalQpTrustRegionSolver | ( | ) |
When solving QPs with diagonal objective matrices, this option can be turned on to enable an experimental solver that avoids linearization of the quadratic term. The `diagonal_qp_solver_accuracy` parameter controls the solve accuracy. TODO(user): Turn this option on by default for quadratic programs after numerical evaluation.
optional bool use_diagonal_qp_trust_region_solver = 23 [default = false];
Definition at line 5551 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearUseFeasibilityPolishing | ( | ) |
If true, periodically runs feasibility polishing, which attempts to move from latest average iterate to one that is closer to feasibility (i.e., has smaller primal and dual residuals) while probably increasing the objective gap. This is useful primarily when the feasibility tolerances are fairly tight and the objective gap tolerance is somewhat looser. Note that this does not change the termination criteria, but rather can help achieve the termination criteria more quickly when the objective gap is not as important as feasibility. `use_feasibility_polishing` cannot be used with glop presolve, and requires `handle_some_primal_gradients_on_finite_bounds_as_residuals == false`. `use_feasibility_polishing` can only be used with linear programs. Feasibility polishing runs two separate phases, primal feasibility and dual feasibility. The primal feasibility phase runs PDHG on the primal feasibility problem (obtained by changing the objective vector to all zeros), using the average primal iterate and zero dual (which is optimal for the primal feasibility problem) as the initial solution. The dual feasibility phase runs PDHG on the dual feasibility problem (obtained by changing all finite variable and constraint bounds to zero), using the average dual iterate and zero primal (which is optimal for the dual feasibility problem) as the initial solution. The primal solution from the primal feasibility phase and dual solution from the dual feasibility phase are then combined (forming a solution of type `POINT_TYPE_FEASIBILITY_POLISHING_SOLUTION`) and checked against the termination criteria.
optional bool use_feasibility_polishing = 30 [default = false];
Definition at line 5779 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearVerbosityLevel | ( | ) |
The verbosity of logging. 0: No informational logging. (Errors are logged.) 1: Summary statistics only. No iteration-level details. 2: A table of iteration-level statistics is logged. (See ToShortString() in primal_dual_hybrid_gradient.cc). 3: A more detailed table of iteration-level statistics is logged. (See ToString() in primal_dual_hybrid_gradient.cc). 4: For iteration-level details, prints the statistics of both the average (prefixed with A) and the current iterate (prefixed with C). Also prints internal algorithmic state and details. Logging at levels 2-4 also includes messages from level 1.
optional int32 verbosity_level = 26 [default = 0];
Definition at line 4009 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.AdaptiveLinesearchParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getAdaptiveLinesearchParameters | ( | ) |
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4907 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.AdaptiveLinesearchParams.Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getAdaptiveLinesearchParametersBuilder | ( | ) |
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;
Definition at line 4981 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.AdaptiveLinesearchParamsOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getAdaptiveLinesearchParametersOrBuilder | ( | ) |
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4989 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getApplyFeasibilityPolishingAfterLimitsReached | ( | ) |
If true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached. This can result in a solution that is closer to feasibility, at the expense of violating the limit by a moderate amount.
optional bool apply_feasibility_polishing_after_limits_reached = 33 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5814 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getApplyFeasibilityPolishingIfSolverIsInterrupted | ( | ) |
If true, feasibility polishing will be applied after the solver is interrupted. This can result in a solution that is closer to feasibility, at the expense of not stopping as promptly when interrupted.
optional bool apply_feasibility_polishing_if_solver_is_interrupted = 34 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5880 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getDefaultInstanceForType | ( | ) |
Definition at line 3029 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2939 of file PrimalDualHybridGradientParams.java.
com.google.protobuf.Descriptors.Descriptor com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getDescriptorForType | ( | ) |
Definition at line 3024 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getDiagonalQpTrustRegionSolverTolerance | ( | ) |
The solve tolerance of the experimental trust region solver for diagonal QPs, controlling the accuracy of binary search over a one-dimensional scaling parameter. Smaller values imply smaller relative error of the final solution vector. TODO(user): Find an expression for the final relative error.
optional double diagonal_qp_trust_region_solver_tolerance = 24 [default = 1e-08];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5588 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getHandleSomePrimalGradientsOnFiniteBoundsAsResiduals | ( | ) |
See https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.
optional bool handle_some_primal_gradients_on_finite_bounds_as_residuals = 29 [default = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5444 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getInfiniteConstraintBoundThreshold | ( | ) |
Constraint bounds with absolute value at least this threshold are replaced with infinities. NOTE: This primarily affects the relative convergence criteria. A smaller value makes the relative convergence criteria stronger. It also affects the problem statistics LOG()ed at the start of the run, and the default initial primal weight, since that is based on the norm of the bounds.
optional double infinite_constraint_bound_threshold = 22 [default = inf];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5374 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getInitialPrimalWeight | ( | ) |
The initial value of the primal weight (i.e., the ratio of primal and dual step sizes). The primal weight remains fixed throughout the solve if primal_weight_update_smoothing = 0.0. If unset, the default is the ratio of the norm of the objective vector to the L2 norm of the combined constraint bounds vector (as defined above). If this ratio is not finite and positive, then the default is 1.0 instead. For tuning, try powers of 10, for example, from 10^{-6} to 10^6.
optional double initial_primal_weight = 8;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4410 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getInitialStepSizeScaling | ( | ) |
Scaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).
optional double initial_step_size_scaling = 25 [default = 1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5159 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getL2NormRescaling | ( | ) |
If true, applies L_2 norm rescaling after the Ruiz rescaling. Heuristically this has been found to help convergence.
optional bool l2_norm_rescaling = 10 [default = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4665 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams.LinesearchRule com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getLinesearchRule | ( | ) |
Linesearch rule applied at each major iteration.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4858 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getLInfRuizIterations | ( | ) |
Number of L_infinity Ruiz rescaling iterations to apply to the constraint matrix. Zero disables this rescaling pass. Recommended values to try when tuning are 0, 5, and 10.
optional int32 l_inf_ruiz_iterations = 9 [default = 5];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4603 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getLogIntervalSeconds | ( | ) |
Time between iteration-level statistics logging (if `verbosity_level > 1`). Since iteration-level statistics are only generated when performing termination checks, logs will be generated from next termination check after `log_interval_seconds` have elapsed. Should be >= 0.0. 0.0 (the default) means log statistics at every termination check.
optional double log_interval_seconds = 31 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4046 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getMajorIterationFrequency | ( | ) |
The frequency at which extra work is performed to make major algorithmic decisions, e.g., performing restarts and updating the primal weight. Major iterations also trigger a termination check. For best performance using the NO_RESTARTS or EVERY_MAJOR_ITERATION rule, one should perform a log-scale grid search over this parameter, for example, over powers of two. ADAPTIVE_HEURISTIC is mostly insensitive to this value.
optional int32 major_iteration_frequency = 4 [default = 64];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4120 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.MalitskyPockParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getMalitskyPockParameters | ( | ) |
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5028 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.MalitskyPockParams.Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getMalitskyPockParametersBuilder | ( | ) |
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;
Definition at line 5102 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.MalitskyPockParamsOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getMalitskyPockParametersOrBuilder | ( | ) |
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5110 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getNecessaryReductionForRestart | ( | ) |
For ADAPTIVE_HEURISTIC only: A relative reduction in the potential function by this amount triggers a restart if, additionally, the quality of the iterates appears to be getting worse. The value must be in the interval [sufficient_reduction_for_restart, 1). Smaller values make restarts less frequent, and larger values make them more frequent.
optional double necessary_reduction_for_restart = 17 [default = 0.9];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4795 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getNumShards | ( | ) |
For more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards. Results are computed independently for each shard and then combined. As a consequence, the order of computation, and hence floating point roundoff, depends on the number of shards so reproducible results require using the same value for num_shards. However, for efficiency num_shards should a be at least num_threads, and preferably at least 4*num_threads to allow better load balancing. If num_shards is positive, the computation will use that many shards. Otherwise a default that depends on num_threads will be used.
optional int32 num_shards = 27 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3742 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getNumThreads | ( | ) |
The number of threads to use. Must be positive. Try various values of num_threads, up to the number of physical cores. Performance may not be monotonically increasing with the number of threads because of memory bandwidth limitations.
optional int32 num_threads = 2 [default = 1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3664 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getPresolveOptions | ( | ) |
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4470 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions.Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getPresolveOptionsBuilder | ( | ) |
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;
Definition at line 4544 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptionsOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getPresolveOptionsOrBuilder | ( | ) |
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4552 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getPrimalWeightUpdateSmoothing | ( | ) |
This parameter controls exponential smoothing of log(primal_weight) when a primal weight update occurs (i.e., when the ratio of primal and dual step sizes is adjusted). At 0.0, the primal weight will be frozen at its initial value and there will be no dynamic updates in the algorithm. At 1.0, there is no smoothing in the updates. The default of 0.5 generally performs well, but has been observed on occasion to trigger unstable swings in the primal weight. We recommend also trying 0.0 (disabling primal weight updates), in which case you must also tune initial_primal_weight.
optional double primal_weight_update_smoothing = 7 [default = 0.5];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4328 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getRandomProjectionSeeds | ( | int | index | ) |
Seeds for generating (pseudo-)random projections of iterates during termination checks. For each seed, the projection of the primal and dual solutions onto random planes in primal and dual space will be computed and added the IterationStats if record_iteration_stats is true. The random planes generated will be determined by the seeds, the primal and dual dimensions, and num_threads.
repeated int32 random_projection_seeds = 28 [packed = true];
index | The index of the element to return. |
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5250 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getRandomProjectionSeedsCount | ( | ) |
Seeds for generating (pseudo-)random projections of iterates during termination checks. For each seed, the projection of the primal and dual solutions onto random planes in primal and dual space will be computed and added the IterationStats if record_iteration_stats is true. The random planes generated will be determined by the seeds, the primal and dual dimensions, and num_threads.
repeated int32 random_projection_seeds = 28 [packed = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5233 of file PrimalDualHybridGradientParams.java.
java.util.List< java.lang.Integer > com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getRandomProjectionSeedsList | ( | ) |
Seeds for generating (pseudo-)random projections of iterates during termination checks. For each seed, the projection of the primal and dual solutions onto random planes in primal and dual space will be computed and added the IterationStats if record_iteration_stats is true. The random planes generated will be determined by the seeds, the primal and dual dimensions, and num_threads.
repeated int32 random_projection_seeds = 28 [packed = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5216 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getRecordIterationStats | ( | ) |
If true, the iteration_stats field of the SolveLog output will be populated at every iteration. Note that we only compute solution statistics at termination checks. Setting this parameter to true may substantially increase the size of the output.
optional bool record_iteration_stats = 3;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3880 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams.RestartStrategy com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getRestartStrategy | ( | ) |
NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default. If using a strategy other than ADAPTIVE_HEURISTIC, you must also tune major_iteration_frequency.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.RestartStrategy restart_strategy = 6 [default = ADAPTIVE_HEURISTIC];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4253 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.SchedulerType com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getSchedulerType | ( | ) |
The type of scheduler used for CPU multi-threading. See the documentation of the corresponding enum for more details.
optional .operations_research.pdlp.SchedulerType scheduler_type = 32 [default = SCHEDULER_TYPE_GOOGLE_THREADPOOL];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3815 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getSufficientReductionForRestart | ( | ) |
For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative reduction in the potential function by this amount always triggers a restart. Must be between 0.0 and 1.0.
optional double sufficient_reduction_for_restart = 11 [default = 0.1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4727 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getTerminationCheckFrequency | ( | ) |
The frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats. Termination checks do not affect algorithmic progress unless termination is triggered.
optional int32 termination_check_frequency = 5 [default = 64];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4190 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.TerminationCriteria com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getTerminationCriteria | ( | ) |
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3529 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.TerminationCriteria.Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getTerminationCriteriaBuilder | ( | ) |
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;
Definition at line 3603 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.TerminationCriteriaOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getTerminationCriteriaOrBuilder | ( | ) |
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3611 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getUseDiagonalQpTrustRegionSolver | ( | ) |
When solving QPs with diagonal objective matrices, this option can be turned on to enable an experimental solver that avoids linearization of the quadratic term. The `diagonal_qp_solver_accuracy` parameter controls the solve accuracy. TODO(user): Turn this option on by default for quadratic programs after numerical evaluation.
optional bool use_diagonal_qp_trust_region_solver = 23 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5514 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getUseFeasibilityPolishing | ( | ) |
If true, periodically runs feasibility polishing, which attempts to move from latest average iterate to one that is closer to feasibility (i.e., has smaller primal and dual residuals) while probably increasing the objective gap. This is useful primarily when the feasibility tolerances are fairly tight and the objective gap tolerance is somewhat looser. Note that this does not change the termination criteria, but rather can help achieve the termination criteria more quickly when the objective gap is not as important as feasibility. `use_feasibility_polishing` cannot be used with glop presolve, and requires `handle_some_primal_gradients_on_finite_bounds_as_residuals == false`. `use_feasibility_polishing` can only be used with linear programs. Feasibility polishing runs two separate phases, primal feasibility and dual feasibility. The primal feasibility phase runs PDHG on the primal feasibility problem (obtained by changing the objective vector to all zeros), using the average primal iterate and zero dual (which is optimal for the primal feasibility problem) as the initial solution. The dual feasibility phase runs PDHG on the dual feasibility problem (obtained by changing all finite variable and constraint bounds to zero), using the average dual iterate and zero primal (which is optimal for the dual feasibility problem) as the initial solution. The primal solution from the primal feasibility phase and dual solution from the dual feasibility phase are then combined (forming a solution of type `POINT_TYPE_FEASIBILITY_POLISHING_SOLUTION`) and checked against the termination criteria.
optional bool use_feasibility_polishing = 30 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5702 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getVerbosityLevel | ( | ) |
The verbosity of logging. 0: No informational logging. (Errors are logged.) 1: Summary statistics only. No iteration-level details. 2: A table of iteration-level statistics is logged. (See ToShortString() in primal_dual_hybrid_gradient.cc). 3: A more detailed table of iteration-level statistics is logged. (See ToString() in primal_dual_hybrid_gradient.cc). 4: For iteration-level details, prints the statistics of both the average (prefixed with A) and the current iterate (prefixed with C). Also prints internal algorithmic state and details. Logging at levels 2-4 also includes messages from level 1.
optional int32 verbosity_level = 26 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3962 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasAdaptiveLinesearchParameters | ( | ) |
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4900 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasApplyFeasibilityPolishingAfterLimitsReached | ( | ) |
If true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached. This can result in a solution that is closer to feasibility, at the expense of violating the limit by a moderate amount.
optional bool apply_feasibility_polishing_after_limits_reached = 33 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5799 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasApplyFeasibilityPolishingIfSolverIsInterrupted | ( | ) |
If true, feasibility polishing will be applied after the solver is interrupted. This can result in a solution that is closer to feasibility, at the expense of not stopping as promptly when interrupted.
optional bool apply_feasibility_polishing_if_solver_is_interrupted = 34 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5866 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasDiagonalQpTrustRegionSolverTolerance | ( | ) |
The solve tolerance of the experimental trust region solver for diagonal QPs, controlling the accuracy of binary search over a one-dimensional scaling parameter. Smaller values imply smaller relative error of the final solution vector. TODO(user): Find an expression for the final relative error.
optional double diagonal_qp_trust_region_solver_tolerance = 24 [default = 1e-08];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5572 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasHandleSomePrimalGradientsOnFiniteBoundsAsResiduals | ( | ) |
See https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.
optional bool handle_some_primal_gradients_on_finite_bounds_as_residuals = 29 [default = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5430 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasInfiniteConstraintBoundThreshold | ( | ) |
Constraint bounds with absolute value at least this threshold are replaced with infinities. NOTE: This primarily affects the relative convergence criteria. A smaller value makes the relative convergence criteria stronger. It also affects the problem statistics LOG()ed at the start of the run, and the default initial primal weight, since that is based on the norm of the bounds.
optional double infinite_constraint_bound_threshold = 22 [default = inf];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5357 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasInitialPrimalWeight | ( | ) |
The initial value of the primal weight (i.e., the ratio of primal and dual step sizes). The primal weight remains fixed throughout the solve if primal_weight_update_smoothing = 0.0. If unset, the default is the ratio of the norm of the objective vector to the L2 norm of the combined constraint bounds vector (as defined above). If this ratio is not finite and positive, then the default is 1.0 instead. For tuning, try powers of 10, for example, from 10^{-6} to 10^6.
optional double initial_primal_weight = 8;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4392 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasInitialStepSizeScaling | ( | ) |
Scaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).
optional double initial_step_size_scaling = 25 [default = 1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5146 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasL2NormRescaling | ( | ) |
If true, applies L_2 norm rescaling after the Ruiz rescaling. Heuristically this has been found to help convergence.
optional bool l2_norm_rescaling = 10 [default = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4652 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasLinesearchRule | ( | ) |
Linesearch rule applied at each major iteration.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4846 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasLInfRuizIterations | ( | ) |
Number of L_infinity Ruiz rescaling iterations to apply to the constraint matrix. Zero disables this rescaling pass. Recommended values to try when tuning are 0, 5, and 10.
optional int32 l_inf_ruiz_iterations = 9 [default = 5];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4589 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasLogIntervalSeconds | ( | ) |
Time between iteration-level statistics logging (if `verbosity_level > 1`). Since iteration-level statistics are only generated when performing termination checks, logs will be generated from next termination check after `log_interval_seconds` have elapsed. Should be >= 0.0. 0.0 (the default) means log statistics at every termination check.
optional double log_interval_seconds = 31 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4030 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasMajorIterationFrequency | ( | ) |
The frequency at which extra work is performed to make major algorithmic decisions, e.g., performing restarts and updating the primal weight. Major iterations also trigger a termination check. For best performance using the NO_RESTARTS or EVERY_MAJOR_ITERATION rule, one should perform a log-scale grid search over this parameter, for example, over powers of two. ADAPTIVE_HEURISTIC is mostly insensitive to this value.
optional int32 major_iteration_frequency = 4 [default = 64];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4103 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasMalitskyPockParameters | ( | ) |
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5021 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasNecessaryReductionForRestart | ( | ) |
For ADAPTIVE_HEURISTIC only: A relative reduction in the potential function by this amount triggers a restart if, additionally, the quality of the iterates appears to be getting worse. The value must be in the interval [sufficient_reduction_for_restart, 1). Smaller values make restarts less frequent, and larger values make them more frequent.
optional double necessary_reduction_for_restart = 17 [default = 0.9];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4779 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasNumShards | ( | ) |
For more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards. Results are computed independently for each shard and then combined. As a consequence, the order of computation, and hence floating point roundoff, depends on the number of shards so reproducible results require using the same value for num_shards. However, for efficiency num_shards should a be at least num_threads, and preferably at least 4*num_threads to allow better load balancing. If num_shards is positive, the computation will use that many shards. Otherwise a default that depends on num_threads will be used.
optional int32 num_shards = 27 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3722 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasNumThreads | ( | ) |
The number of threads to use. Must be positive. Try various values of num_threads, up to the number of physical cores. Performance may not be monotonically increasing with the number of threads because of memory bandwidth limitations.
optional int32 num_threads = 2 [default = 1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3649 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasPresolveOptions | ( | ) |
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4463 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasPrimalWeightUpdateSmoothing | ( | ) |
This parameter controls exponential smoothing of log(primal_weight) when a primal weight update occurs (i.e., when the ratio of primal and dual step sizes is adjusted). At 0.0, the primal weight will be frozen at its initial value and there will be no dynamic updates in the algorithm. At 1.0, there is no smoothing in the updates. The default of 0.5 generally performs well, but has been observed on occasion to trigger unstable swings in the primal weight. We recommend also trying 0.0 (disabling primal weight updates), in which case you must also tune initial_primal_weight.
optional double primal_weight_update_smoothing = 7 [default = 0.5];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4309 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasRecordIterationStats | ( | ) |
If true, the iteration_stats field of the SolveLog output will be populated at every iteration. Note that we only compute solution statistics at termination checks. Setting this parameter to true may substantially increase the size of the output.
optional bool record_iteration_stats = 3;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3865 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasRestartStrategy | ( | ) |
NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default. If using a strategy other than ADAPTIVE_HEURISTIC, you must also tune major_iteration_frequency.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.RestartStrategy restart_strategy = 6 [default = ADAPTIVE_HEURISTIC];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4239 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasSchedulerType | ( | ) |
The type of scheduler used for CPU multi-threading. See the documentation of the corresponding enum for more details.
optional .operations_research.pdlp.SchedulerType scheduler_type = 32 [default = SCHEDULER_TYPE_GOOGLE_THREADPOOL];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3802 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasSufficientReductionForRestart | ( | ) |
For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative reduction in the potential function by this amount always triggers a restart. Must be between 0.0 and 1.0.
optional double sufficient_reduction_for_restart = 11 [default = 0.1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4713 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasTerminationCheckFrequency | ( | ) |
The frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats. Termination checks do not affect algorithmic progress unless termination is triggered.
optional int32 termination_check_frequency = 5 [default = 64];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 4176 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasTerminationCriteria | ( | ) |
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3522 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasUseDiagonalQpTrustRegionSolver | ( | ) |
When solving QPs with diagonal objective matrices, this option can be turned on to enable an experimental solver that avoids linearization of the quadratic term. The `diagonal_qp_solver_accuracy` parameter controls the solve accuracy. TODO(user): Turn this option on by default for quadratic programs after numerical evaluation.
optional bool use_diagonal_qp_trust_region_solver = 23 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5497 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasUseFeasibilityPolishing | ( | ) |
If true, periodically runs feasibility polishing, which attempts to move from latest average iterate to one that is closer to feasibility (i.e., has smaller primal and dual residuals) while probably increasing the objective gap. This is useful primarily when the feasibility tolerances are fairly tight and the objective gap tolerance is somewhat looser. Note that this does not change the termination criteria, but rather can help achieve the termination criteria more quickly when the objective gap is not as important as feasibility. `use_feasibility_polishing` cannot be used with glop presolve, and requires `handle_some_primal_gradients_on_finite_bounds_as_residuals == false`. `use_feasibility_polishing` can only be used with linear programs. Feasibility polishing runs two separate phases, primal feasibility and dual feasibility. The primal feasibility phase runs PDHG on the primal feasibility problem (obtained by changing the objective vector to all zeros), using the average primal iterate and zero dual (which is optimal for the primal feasibility problem) as the initial solution. The dual feasibility phase runs PDHG on the dual feasibility problem (obtained by changing all finite variable and constraint bounds to zero), using the average dual iterate and zero primal (which is optimal for the dual feasibility problem) as the initial solution. The primal solution from the primal feasibility phase and dual solution from the dual feasibility phase are then combined (forming a solution of type `POINT_TYPE_FEASIBILITY_POLISHING_SOLUTION`) and checked against the termination criteria.
optional bool use_feasibility_polishing = 30 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 5665 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasVerbosityLevel | ( | ) |
The verbosity of logging. 0: No informational logging. (Errors are logged.) 1: Summary statistics only. No iteration-level details. 2: A table of iteration-level statistics is logged. (See ToShortString() in primal_dual_hybrid_gradient.cc). 3: A more detailed table of iteration-level statistics is logged. (See ToString() in primal_dual_hybrid_gradient.cc). 4: For iteration-level details, prints the statistics of both the average (prefixed with A) and the current iterate (prefixed with C). Also prints internal algorithmic state and details. Logging at levels 2-4 also includes messages from level 1.
optional int32 verbosity_level = 26 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 3940 of file PrimalDualHybridGradientParams.java.
|
protected |
Definition at line 2945 of file PrimalDualHybridGradientParams.java.
final boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.isInitialized | ( | ) |
Definition at line 3293 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergeAdaptiveLinesearchParameters | ( | com.google.ortools.pdlp.AdaptiveLinesearchParams | value | ) |
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;
Definition at line 4947 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergeFrom | ( | com.google.ortools.pdlp.PrimalDualHybridGradientParams | other | ) |
Definition at line 3190 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergeFrom | ( | com.google.protobuf.CodedInputStream | input, |
com.google.protobuf.ExtensionRegistryLite | extensionRegistry ) throws java.io.IOException |
Definition at line 3298 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergeFrom | ( | com.google.protobuf.Message | other | ) |
Definition at line 3181 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergeMalitskyPockParameters | ( | com.google.ortools.pdlp.MalitskyPockParams | value | ) |
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;
Definition at line 5068 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergePresolveOptions | ( | com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions | value | ) |
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;
Definition at line 4510 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergeTerminationCriteria | ( | com.google.ortools.pdlp.TerminationCriteria | value | ) |
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;
Definition at line 3569 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setAdaptiveLinesearchParameters | ( | com.google.ortools.pdlp.AdaptiveLinesearchParams | value | ) |
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;
Definition at line 4917 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setAdaptiveLinesearchParameters | ( | com.google.ortools.pdlp.AdaptiveLinesearchParams.Builder | builderForValue | ) |
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;
Definition at line 4933 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setApplyFeasibilityPolishingAfterLimitsReached | ( | boolean | value | ) |
If true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached. This can result in a solution that is closer to feasibility, at the expense of violating the limit by a moderate amount.
optional bool apply_feasibility_polishing_after_limits_reached = 33 [default = false];
value | The applyFeasibilityPolishingAfterLimitsReached to set. |
Definition at line 5829 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setApplyFeasibilityPolishingIfSolverIsInterrupted | ( | boolean | value | ) |
If true, feasibility polishing will be applied after the solver is interrupted. This can result in a solution that is closer to feasibility, at the expense of not stopping as promptly when interrupted.
optional bool apply_feasibility_polishing_if_solver_is_interrupted = 34 [default = false];
value | The applyFeasibilityPolishingIfSolverIsInterrupted to set. |
Definition at line 5894 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setDiagonalQpTrustRegionSolverTolerance | ( | double | value | ) |
The solve tolerance of the experimental trust region solver for diagonal QPs, controlling the accuracy of binary search over a one-dimensional scaling parameter. Smaller values imply smaller relative error of the final solution vector. TODO(user): Find an expression for the final relative error.
optional double diagonal_qp_trust_region_solver_tolerance = 24 [default = 1e-08];
value | The diagonalQpTrustRegionSolverTolerance to set. |
Definition at line 5604 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setHandleSomePrimalGradientsOnFiniteBoundsAsResiduals | ( | boolean | value | ) |
See https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.
optional bool handle_some_primal_gradients_on_finite_bounds_as_residuals = 29 [default = true];
value | The handleSomePrimalGradientsOnFiniteBoundsAsResiduals to set. |
Definition at line 5458 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setInfiniteConstraintBoundThreshold | ( | double | value | ) |
Constraint bounds with absolute value at least this threshold are replaced with infinities. NOTE: This primarily affects the relative convergence criteria. A smaller value makes the relative convergence criteria stronger. It also affects the problem statistics LOG()ed at the start of the run, and the default initial primal weight, since that is based on the norm of the bounds.
optional double infinite_constraint_bound_threshold = 22 [default = inf];
value | The infiniteConstraintBoundThreshold to set. |
Definition at line 5391 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setInitialPrimalWeight | ( | double | value | ) |
The initial value of the primal weight (i.e., the ratio of primal and dual step sizes). The primal weight remains fixed throughout the solve if primal_weight_update_smoothing = 0.0. If unset, the default is the ratio of the norm of the objective vector to the L2 norm of the combined constraint bounds vector (as defined above). If this ratio is not finite and positive, then the default is 1.0 instead. For tuning, try powers of 10, for example, from 10^{-6} to 10^6.
optional double initial_primal_weight = 8;
value | The initialPrimalWeight to set. |
Definition at line 4428 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setInitialStepSizeScaling | ( | double | value | ) |
Scaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).
optional double initial_step_size_scaling = 25 [default = 1];
value | The initialStepSizeScaling to set. |
Definition at line 5172 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setL2NormRescaling | ( | boolean | value | ) |
If true, applies L_2 norm rescaling after the Ruiz rescaling. Heuristically this has been found to help convergence.
optional bool l2_norm_rescaling = 10 [default = true];
value | The l2NormRescaling to set. |
Definition at line 4678 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setLinesearchRule | ( | com.google.ortools.pdlp.PrimalDualHybridGradientParams.LinesearchRule | value | ) |
Linesearch rule applied at each major iteration.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];
value | The linesearchRule to set. |
Definition at line 4871 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setLInfRuizIterations | ( | int | value | ) |
Number of L_infinity Ruiz rescaling iterations to apply to the constraint matrix. Zero disables this rescaling pass. Recommended values to try when tuning are 0, 5, and 10.
optional int32 l_inf_ruiz_iterations = 9 [default = 5];
value | The lInfRuizIterations to set. |
Definition at line 4617 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setLogIntervalSeconds | ( | double | value | ) |
Time between iteration-level statistics logging (if `verbosity_level > 1`). Since iteration-level statistics are only generated when performing termination checks, logs will be generated from next termination check after `log_interval_seconds` have elapsed. Should be >= 0.0. 0.0 (the default) means log statistics at every termination check.
optional double log_interval_seconds = 31 [default = 0];
value | The logIntervalSeconds to set. |
Definition at line 4062 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setMajorIterationFrequency | ( | int | value | ) |
The frequency at which extra work is performed to make major algorithmic decisions, e.g., performing restarts and updating the primal weight. Major iterations also trigger a termination check. For best performance using the NO_RESTARTS or EVERY_MAJOR_ITERATION rule, one should perform a log-scale grid search over this parameter, for example, over powers of two. ADAPTIVE_HEURISTIC is mostly insensitive to this value.
optional int32 major_iteration_frequency = 4 [default = 64];
value | The majorIterationFrequency to set. |
Definition at line 4137 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setMalitskyPockParameters | ( | com.google.ortools.pdlp.MalitskyPockParams | value | ) |
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;
Definition at line 5038 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setMalitskyPockParameters | ( | com.google.ortools.pdlp.MalitskyPockParams.Builder | builderForValue | ) |
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;
Definition at line 5054 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setNecessaryReductionForRestart | ( | double | value | ) |
For ADAPTIVE_HEURISTIC only: A relative reduction in the potential function by this amount triggers a restart if, additionally, the quality of the iterates appears to be getting worse. The value must be in the interval [sufficient_reduction_for_restart, 1). Smaller values make restarts less frequent, and larger values make them more frequent.
optional double necessary_reduction_for_restart = 17 [default = 0.9];
value | The necessaryReductionForRestart to set. |
Definition at line 4811 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setNumShards | ( | int | value | ) |
For more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards. Results are computed independently for each shard and then combined. As a consequence, the order of computation, and hence floating point roundoff, depends on the number of shards so reproducible results require using the same value for num_shards. However, for efficiency num_shards should a be at least num_threads, and preferably at least 4*num_threads to allow better load balancing. If num_shards is positive, the computation will use that many shards. Otherwise a default that depends on num_threads will be used.
optional int32 num_shards = 27 [default = 0];
value | The numShards to set. |
Definition at line 3762 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setNumThreads | ( | int | value | ) |
The number of threads to use. Must be positive. Try various values of num_threads, up to the number of physical cores. Performance may not be monotonically increasing with the number of threads because of memory bandwidth limitations.
optional int32 num_threads = 2 [default = 1];
value | The numThreads to set. |
Definition at line 3679 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setPresolveOptions | ( | com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions | value | ) |
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;
Definition at line 4480 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setPresolveOptions | ( | com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions.Builder | builderForValue | ) |
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;
Definition at line 4496 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setPrimalWeightUpdateSmoothing | ( | double | value | ) |
This parameter controls exponential smoothing of log(primal_weight) when a primal weight update occurs (i.e., when the ratio of primal and dual step sizes is adjusted). At 0.0, the primal weight will be frozen at its initial value and there will be no dynamic updates in the algorithm. At 1.0, there is no smoothing in the updates. The default of 0.5 generally performs well, but has been observed on occasion to trigger unstable swings in the primal weight. We recommend also trying 0.0 (disabling primal weight updates), in which case you must also tune initial_primal_weight.
optional double primal_weight_update_smoothing = 7 [default = 0.5];
value | The primalWeightUpdateSmoothing to set. |
Definition at line 4347 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setRandomProjectionSeeds | ( | int | index, |
int | value ) |
Seeds for generating (pseudo-)random projections of iterates during termination checks. For each seed, the projection of the primal and dual solutions onto random planes in primal and dual space will be computed and added the IterationStats if record_iteration_stats is true. The random planes generated will be determined by the seeds, the primal and dual dimensions, and num_threads.
repeated int32 random_projection_seeds = 28 [packed = true];
index | The index to set the value at. |
value | The randomProjectionSeeds to set. |
Definition at line 5268 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setRecordIterationStats | ( | boolean | value | ) |
If true, the iteration_stats field of the SolveLog output will be populated at every iteration. Note that we only compute solution statistics at termination checks. Setting this parameter to true may substantially increase the size of the output.
optional bool record_iteration_stats = 3;
value | The recordIterationStats to set. |
Definition at line 3895 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setRestartStrategy | ( | com.google.ortools.pdlp.PrimalDualHybridGradientParams.RestartStrategy | value | ) |
NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default. If using a strategy other than ADAPTIVE_HEURISTIC, you must also tune major_iteration_frequency.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.RestartStrategy restart_strategy = 6 [default = ADAPTIVE_HEURISTIC];
value | The restartStrategy to set. |
Definition at line 4268 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setSchedulerType | ( | com.google.ortools.pdlp.SchedulerType | value | ) |
The type of scheduler used for CPU multi-threading. See the documentation of the corresponding enum for more details.
optional .operations_research.pdlp.SchedulerType scheduler_type = 32 [default = SCHEDULER_TYPE_GOOGLE_THREADPOOL];
value | The schedulerType to set. |
Definition at line 3829 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setSufficientReductionForRestart | ( | double | value | ) |
For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative reduction in the potential function by this amount always triggers a restart. Must be between 0.0 and 1.0.
optional double sufficient_reduction_for_restart = 11 [default = 0.1];
value | The sufficientReductionForRestart to set. |
Definition at line 4741 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setTerminationCheckFrequency | ( | int | value | ) |
The frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats. Termination checks do not affect algorithmic progress unless termination is triggered.
optional int32 termination_check_frequency = 5 [default = 64];
value | The terminationCheckFrequency to set. |
Definition at line 4204 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setTerminationCriteria | ( | com.google.ortools.pdlp.TerminationCriteria | value | ) |
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;
Definition at line 3539 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setTerminationCriteria | ( | com.google.ortools.pdlp.TerminationCriteria.Builder | builderForValue | ) |
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;
Definition at line 3555 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setUseDiagonalQpTrustRegionSolver | ( | boolean | value | ) |
When solving QPs with diagonal objective matrices, this option can be turned on to enable an experimental solver that avoids linearization of the quadratic term. The `diagonal_qp_solver_accuracy` parameter controls the solve accuracy. TODO(user): Turn this option on by default for quadratic programs after numerical evaluation.
optional bool use_diagonal_qp_trust_region_solver = 23 [default = false];
value | The useDiagonalQpTrustRegionSolver to set. |
Definition at line 5531 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setUseFeasibilityPolishing | ( | boolean | value | ) |
If true, periodically runs feasibility polishing, which attempts to move from latest average iterate to one that is closer to feasibility (i.e., has smaller primal and dual residuals) while probably increasing the objective gap. This is useful primarily when the feasibility tolerances are fairly tight and the objective gap tolerance is somewhat looser. Note that this does not change the termination criteria, but rather can help achieve the termination criteria more quickly when the objective gap is not as important as feasibility. `use_feasibility_polishing` cannot be used with glop presolve, and requires `handle_some_primal_gradients_on_finite_bounds_as_residuals == false`. `use_feasibility_polishing` can only be used with linear programs. Feasibility polishing runs two separate phases, primal feasibility and dual feasibility. The primal feasibility phase runs PDHG on the primal feasibility problem (obtained by changing the objective vector to all zeros), using the average primal iterate and zero dual (which is optimal for the primal feasibility problem) as the initial solution. The dual feasibility phase runs PDHG on the dual feasibility problem (obtained by changing all finite variable and constraint bounds to zero), using the average dual iterate and zero primal (which is optimal for the dual feasibility problem) as the initial solution. The primal solution from the primal feasibility phase and dual solution from the dual feasibility phase are then combined (forming a solution of type `POINT_TYPE_FEASIBILITY_POLISHING_SOLUTION`) and checked against the termination criteria.
optional bool use_feasibility_polishing = 30 [default = false];
value | The useFeasibilityPolishing to set. |
Definition at line 5739 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setVerbosityLevel | ( | int | value | ) |
The verbosity of logging. 0: No informational logging. (Errors are logged.) 1: Summary statistics only. No iteration-level details. 2: A table of iteration-level statistics is logged. (See ToShortString() in primal_dual_hybrid_gradient.cc). 3: A more detailed table of iteration-level statistics is logged. (See ToString() in primal_dual_hybrid_gradient.cc). 4: For iteration-level details, prints the statistics of both the average (prefixed with A) and the current iterate (prefixed with C). Also prints internal algorithmic state and details. Logging at levels 2-4 also includes messages from level 1.
optional int32 verbosity_level = 26 [default = 0];
value | The verbosityLevel to set. |
Definition at line 3984 of file PrimalDualHybridGradientParams.java.