Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder Interface Reference
Inheritance diagram for operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder:
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder

Public Member Functions

boolean hasTerminationCriteria ()
 
operations_research.pdlp.Solvers.TerminationCriteria getTerminationCriteria ()
 
operations_research.pdlp.Solvers.TerminationCriteriaOrBuilder getTerminationCriteriaOrBuilder ()
 
boolean hasNumThreads ()
 
int getNumThreads ()
 
boolean hasNumShards ()
 
int getNumShards ()
 
boolean hasRecordIterationStats ()
 
boolean getRecordIterationStats ()
 
boolean hasVerbosityLevel ()
 
int getVerbosityLevel ()
 
boolean hasLogIntervalSeconds ()
 
double getLogIntervalSeconds ()
 
boolean hasMajorIterationFrequency ()
 
int getMajorIterationFrequency ()
 
boolean hasTerminationCheckFrequency ()
 
int getTerminationCheckFrequency ()
 
boolean hasRestartStrategy ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.RestartStrategy getRestartStrategy ()
 
boolean hasPrimalWeightUpdateSmoothing ()
 
double getPrimalWeightUpdateSmoothing ()
 
boolean hasInitialPrimalWeight ()
 
double getInitialPrimalWeight ()
 
boolean hasPresolveOptions ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptions getPresolveOptions ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptionsOrBuilder getPresolveOptionsOrBuilder ()
 
boolean hasLInfRuizIterations ()
 
int getLInfRuizIterations ()
 
boolean hasL2NormRescaling ()
 
boolean getL2NormRescaling ()
 
boolean hasSufficientReductionForRestart ()
 
double getSufficientReductionForRestart ()
 
boolean hasNecessaryReductionForRestart ()
 
double getNecessaryReductionForRestart ()
 
boolean hasLinesearchRule ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.LinesearchRule getLinesearchRule ()
 
boolean hasAdaptiveLinesearchParameters ()
 
operations_research.pdlp.Solvers.AdaptiveLinesearchParams getAdaptiveLinesearchParameters ()
 
operations_research.pdlp.Solvers.AdaptiveLinesearchParamsOrBuilder getAdaptiveLinesearchParametersOrBuilder ()
 
boolean hasMalitskyPockParameters ()
 
operations_research.pdlp.Solvers.MalitskyPockParams getMalitskyPockParameters ()
 
operations_research.pdlp.Solvers.MalitskyPockParamsOrBuilder getMalitskyPockParametersOrBuilder ()
 
boolean hasInitialStepSizeScaling ()
 
double getInitialStepSizeScaling ()
 
java.util.List< java.lang.Integer > getRandomProjectionSeedsList ()
 
int getRandomProjectionSeedsCount ()
 
int getRandomProjectionSeeds (int index)
 
boolean hasInfiniteConstraintBoundThreshold ()
 
double getInfiniteConstraintBoundThreshold ()
 
boolean hasHandleSomePrimalGradientsOnFiniteBoundsAsResiduals ()
 
boolean getHandleSomePrimalGradientsOnFiniteBoundsAsResiduals ()
 
boolean hasUseDiagonalQpTrustRegionSolver ()
 
boolean getUseDiagonalQpTrustRegionSolver ()
 
boolean hasDiagonalQpTrustRegionSolverTolerance ()
 
double getDiagonalQpTrustRegionSolverTolerance ()
 
boolean hasUseFeasibilityPolishing ()
 
boolean getUseFeasibilityPolishing ()
 

Detailed Description

Definition at line 5933 of file Solvers.java.

Member Function Documentation

◆ getAdaptiveLinesearchParameters()

operations_research.pdlp.Solvers.AdaptiveLinesearchParams operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.getAdaptiveLinesearchParameters ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Returns
The adaptiveLinesearchParameters.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getAdaptiveLinesearchParametersOrBuilder()

operations_research.pdlp.Solvers.AdaptiveLinesearchParamsOrBuilder operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.getAdaptiveLinesearchParametersOrBuilder ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getDiagonalQpTrustRegionSolverTolerance()

double operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The diagonalQpTrustRegionSolverTolerance.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The handleSomePrimalGradientsOnFiniteBoundsAsResiduals.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getInfiniteConstraintBoundThreshold()

double operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The infiniteConstraintBoundThreshold.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getInitialPrimalWeight()

double operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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;

Returns
The initialPrimalWeight.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getInitialStepSizeScaling()

double operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The initialStepSizeScaling.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getL2NormRescaling()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The l2NormRescaling.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getLinesearchRule()

operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.LinesearchRule operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.getLinesearchRule ( )
Linesearch rule applied at each major iteration.

optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];

Returns
The linesearchRule.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getLInfRuizIterations()

int operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The lInfRuizIterations.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getLogIntervalSeconds()

double operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The logIntervalSeconds.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getMajorIterationFrequency()

int operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The majorIterationFrequency.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getMalitskyPockParameters()

operations_research.pdlp.Solvers.MalitskyPockParams operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.getMalitskyPockParameters ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Returns
The malitskyPockParameters.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getMalitskyPockParametersOrBuilder()

operations_research.pdlp.Solvers.MalitskyPockParamsOrBuilder operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.getMalitskyPockParametersOrBuilder ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getNecessaryReductionForRestart()

double operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The necessaryReductionForRestart.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getNumShards()

int operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The numShards.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getNumThreads()

int operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The numThreads.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getPresolveOptions()

operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptions operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.getPresolveOptions ( )

optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;

Returns
The presolveOptions.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getPresolveOptionsOrBuilder()

operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptionsOrBuilder operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.getPresolveOptionsOrBuilder ( )

optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getPrimalWeightUpdateSmoothing()

double operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The primalWeightUpdateSmoothing.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getRandomProjectionSeeds()

int operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Parameters
indexThe index of the element to return.
Returns
The randomProjectionSeeds at the given index.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getRandomProjectionSeedsCount()

int operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The count of randomProjectionSeeds.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getRandomProjectionSeedsList()

java.util.List< java.lang.Integer > operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
A list containing the randomProjectionSeeds.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getRecordIterationStats()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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;

Returns
The recordIterationStats.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getRestartStrategy()

operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.RestartStrategy operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The restartStrategy.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getSufficientReductionForRestart()

double operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The sufficientReductionForRestart.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getTerminationCheckFrequency()

int operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The terminationCheckFrequency.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getTerminationCriteria()

operations_research.pdlp.Solvers.TerminationCriteria operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.getTerminationCriteria ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Returns
The terminationCriteria.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getTerminationCriteriaOrBuilder()

operations_research.pdlp.Solvers.TerminationCriteriaOrBuilder operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.getTerminationCriteriaOrBuilder ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getUseDiagonalQpTrustRegionSolver()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The useDiagonalQpTrustRegionSolver.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getUseFeasibilityPolishing()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The useFeasibilityPolishing.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ getVerbosityLevel()

int operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
The verbosityLevel.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasAdaptiveLinesearchParameters()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.hasAdaptiveLinesearchParameters ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Returns
Whether the adaptiveLinesearchParameters field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasDiagonalQpTrustRegionSolverTolerance()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the diagonalQpTrustRegionSolverTolerance field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the handleSomePrimalGradientsOnFiniteBoundsAsResiduals field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasInfiniteConstraintBoundThreshold()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the infiniteConstraintBoundThreshold field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasInitialPrimalWeight()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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;

Returns
Whether the initialPrimalWeight field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasInitialStepSizeScaling()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the initialStepSizeScaling field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasL2NormRescaling()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the l2NormRescaling field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasLinesearchRule()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.hasLinesearchRule ( )
Linesearch rule applied at each major iteration.

optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];

Returns
Whether the linesearchRule field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasLInfRuizIterations()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the lInfRuizIterations field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasLogIntervalSeconds()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the logIntervalSeconds field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasMajorIterationFrequency()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the majorIterationFrequency field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasMalitskyPockParameters()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.hasMalitskyPockParameters ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Returns
Whether the malitskyPockParameters field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasNecessaryReductionForRestart()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the necessaryReductionForRestart field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasNumShards()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the numShards field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasNumThreads()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the numThreads field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasPresolveOptions()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.hasPresolveOptions ( )

optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;

Returns
Whether the presolveOptions field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasPrimalWeightUpdateSmoothing()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the primalWeightUpdateSmoothing field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasRecordIterationStats()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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;

Returns
Whether the recordIterationStats field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasRestartStrategy()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the restartStrategy field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasSufficientReductionForRestart()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the sufficientReductionForRestart field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasTerminationCheckFrequency()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the terminationCheckFrequency field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasTerminationCriteria()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.hasTerminationCriteria ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Returns
Whether the terminationCriteria field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasUseDiagonalQpTrustRegionSolver()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the useDiagonalQpTrustRegionSolver field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasUseFeasibilityPolishing()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the useFeasibilityPolishing field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.

◆ hasVerbosityLevel()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.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];

Returns
Whether the verbosityLevel field is set.

Implemented in operations_research.pdlp.Solvers.PrimalDualHybridGradientParams, and operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.


The documentation for this interface was generated from the following file: