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

Public Member Functions

Builder clear ()
 
com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams getDefaultInstanceForType ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams build ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams buildPartial ()
 
Builder clone ()
 
Builder setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
Builder clearField (com.google.protobuf.Descriptors.FieldDescriptor field)
 
Builder clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof)
 
Builder setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
 
Builder addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (operations_research.pdlp.Solvers.PrimalDualHybridGradientParams other)
 
final boolean isInitialized ()
 
Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
boolean hasTerminationCriteria ()
 
operations_research.pdlp.Solvers.TerminationCriteria getTerminationCriteria ()
 
Builder setTerminationCriteria (operations_research.pdlp.Solvers.TerminationCriteria value)
 
Builder setTerminationCriteria (operations_research.pdlp.Solvers.TerminationCriteria.Builder builderForValue)
 
Builder mergeTerminationCriteria (operations_research.pdlp.Solvers.TerminationCriteria value)
 
Builder clearTerminationCriteria ()
 
operations_research.pdlp.Solvers.TerminationCriteria.Builder getTerminationCriteriaBuilder ()
 
operations_research.pdlp.Solvers.TerminationCriteriaOrBuilder getTerminationCriteriaOrBuilder ()
 
boolean hasNumThreads ()
 
int getNumThreads ()
 
Builder setNumThreads (int value)
 
Builder clearNumThreads ()
 
boolean hasNumShards ()
 
int getNumShards ()
 
Builder setNumShards (int value)
 
Builder clearNumShards ()
 
boolean hasRecordIterationStats ()
 
boolean getRecordIterationStats ()
 
Builder setRecordIterationStats (boolean value)
 
Builder clearRecordIterationStats ()
 
boolean hasVerbosityLevel ()
 
int getVerbosityLevel ()
 
Builder setVerbosityLevel (int value)
 
Builder clearVerbosityLevel ()
 
boolean hasLogIntervalSeconds ()
 
double getLogIntervalSeconds ()
 
Builder setLogIntervalSeconds (double value)
 
Builder clearLogIntervalSeconds ()
 
boolean hasMajorIterationFrequency ()
 
int getMajorIterationFrequency ()
 
Builder setMajorIterationFrequency (int value)
 
Builder clearMajorIterationFrequency ()
 
boolean hasTerminationCheckFrequency ()
 
int getTerminationCheckFrequency ()
 
Builder setTerminationCheckFrequency (int value)
 
Builder clearTerminationCheckFrequency ()
 
boolean hasRestartStrategy ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.RestartStrategy getRestartStrategy ()
 
Builder setRestartStrategy (operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.RestartStrategy value)
 
Builder clearRestartStrategy ()
 
boolean hasPrimalWeightUpdateSmoothing ()
 
double getPrimalWeightUpdateSmoothing ()
 
Builder setPrimalWeightUpdateSmoothing (double value)
 
Builder clearPrimalWeightUpdateSmoothing ()
 
boolean hasInitialPrimalWeight ()
 
double getInitialPrimalWeight ()
 
Builder setInitialPrimalWeight (double value)
 
Builder clearInitialPrimalWeight ()
 
boolean hasPresolveOptions ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptions getPresolveOptions ()
 
Builder setPresolveOptions (operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptions value)
 
Builder setPresolveOptions (operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptions.Builder builderForValue)
 
Builder mergePresolveOptions (operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptions value)
 
Builder clearPresolveOptions ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptions.Builder getPresolveOptionsBuilder ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptionsOrBuilder getPresolveOptionsOrBuilder ()
 
boolean hasLInfRuizIterations ()
 
int getLInfRuizIterations ()
 
Builder setLInfRuizIterations (int value)
 
Builder clearLInfRuizIterations ()
 
boolean hasL2NormRescaling ()
 
boolean getL2NormRescaling ()
 
Builder setL2NormRescaling (boolean value)
 
Builder clearL2NormRescaling ()
 
boolean hasSufficientReductionForRestart ()
 
double getSufficientReductionForRestart ()
 
Builder setSufficientReductionForRestart (double value)
 
Builder clearSufficientReductionForRestart ()
 
boolean hasNecessaryReductionForRestart ()
 
double getNecessaryReductionForRestart ()
 
Builder setNecessaryReductionForRestart (double value)
 
Builder clearNecessaryReductionForRestart ()
 
boolean hasLinesearchRule ()
 
operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.LinesearchRule getLinesearchRule ()
 
Builder setLinesearchRule (operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.LinesearchRule value)
 
Builder clearLinesearchRule ()
 
boolean hasAdaptiveLinesearchParameters ()
 
operations_research.pdlp.Solvers.AdaptiveLinesearchParams getAdaptiveLinesearchParameters ()
 
Builder setAdaptiveLinesearchParameters (operations_research.pdlp.Solvers.AdaptiveLinesearchParams value)
 
Builder setAdaptiveLinesearchParameters (operations_research.pdlp.Solvers.AdaptiveLinesearchParams.Builder builderForValue)
 
Builder mergeAdaptiveLinesearchParameters (operations_research.pdlp.Solvers.AdaptiveLinesearchParams value)
 
Builder clearAdaptiveLinesearchParameters ()
 
operations_research.pdlp.Solvers.AdaptiveLinesearchParams.Builder getAdaptiveLinesearchParametersBuilder ()
 
operations_research.pdlp.Solvers.AdaptiveLinesearchParamsOrBuilder getAdaptiveLinesearchParametersOrBuilder ()
 
boolean hasMalitskyPockParameters ()
 
operations_research.pdlp.Solvers.MalitskyPockParams getMalitskyPockParameters ()
 
Builder setMalitskyPockParameters (operations_research.pdlp.Solvers.MalitskyPockParams value)
 
Builder setMalitskyPockParameters (operations_research.pdlp.Solvers.MalitskyPockParams.Builder builderForValue)
 
Builder mergeMalitskyPockParameters (operations_research.pdlp.Solvers.MalitskyPockParams value)
 
Builder clearMalitskyPockParameters ()
 
operations_research.pdlp.Solvers.MalitskyPockParams.Builder getMalitskyPockParametersBuilder ()
 
operations_research.pdlp.Solvers.MalitskyPockParamsOrBuilder getMalitskyPockParametersOrBuilder ()
 
boolean hasInitialStepSizeScaling ()
 
double getInitialStepSizeScaling ()
 
Builder setInitialStepSizeScaling (double value)
 
Builder clearInitialStepSizeScaling ()
 
java.util.List< java.lang.Integer > getRandomProjectionSeedsList ()
 
int getRandomProjectionSeedsCount ()
 
int getRandomProjectionSeeds (int index)
 
Builder setRandomProjectionSeeds (int index, int value)
 
Builder addRandomProjectionSeeds (int value)
 
Builder addAllRandomProjectionSeeds (java.lang.Iterable<? extends java.lang.Integer > values)
 
Builder clearRandomProjectionSeeds ()
 
boolean hasInfiniteConstraintBoundThreshold ()
 
double getInfiniteConstraintBoundThreshold ()
 
Builder setInfiniteConstraintBoundThreshold (double value)
 
Builder clearInfiniteConstraintBoundThreshold ()
 
boolean hasHandleSomePrimalGradientsOnFiniteBoundsAsResiduals ()
 
boolean getHandleSomePrimalGradientsOnFiniteBoundsAsResiduals ()
 
Builder setHandleSomePrimalGradientsOnFiniteBoundsAsResiduals (boolean value)
 
Builder clearHandleSomePrimalGradientsOnFiniteBoundsAsResiduals ()
 
boolean hasUseDiagonalQpTrustRegionSolver ()
 
boolean getUseDiagonalQpTrustRegionSolver ()
 
Builder setUseDiagonalQpTrustRegionSolver (boolean value)
 
Builder clearUseDiagonalQpTrustRegionSolver ()
 
boolean hasDiagonalQpTrustRegionSolverTolerance ()
 
double getDiagonalQpTrustRegionSolverTolerance ()
 
Builder setDiagonalQpTrustRegionSolverTolerance (double value)
 
Builder clearDiagonalQpTrustRegionSolverTolerance ()
 
boolean hasUseFeasibilityPolishing ()
 
boolean getUseFeasibilityPolishing ()
 
Builder setUseFeasibilityPolishing (boolean value)
 
Builder clearUseFeasibilityPolishing ()
 
final Builder setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 
final Builder mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
 

Protected Member Functions

com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ()
 

Detailed Description

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 9447 of file Solvers.java.

Member Function Documentation

◆ addAllRandomProjectionSeeds()

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

Parameters
valuesThe randomProjectionSeeds to add.
Returns
This builder for chaining.

Definition at line 11756 of file Solvers.java.

◆ addRandomProjectionSeeds()

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

Parameters
valueThe randomProjectionSeeds to add.
Returns
This builder for chaining.

Definition at line 11734 of file Solvers.java.

◆ addRepeatedField()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.addRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value )

Definition at line 9705 of file Solvers.java.

◆ build()

operations_research.pdlp.Solvers.PrimalDualHybridGradientParams operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.build ( )

Definition at line 9544 of file Solvers.java.

◆ buildPartial()

operations_research.pdlp.Solvers.PrimalDualHybridGradientParams operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.buildPartial ( )

Definition at line 9553 of file Solvers.java.

◆ clear()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.clear ( )

Definition at line 9484 of file Solvers.java.

◆ clearAdaptiveLinesearchParameters()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.clearAdaptiveLinesearchParameters ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Definition at line 11411 of file Solvers.java.

◆ clearDiagonalQpTrustRegionSolverTolerance()

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

Returns
This builder for chaining.

Definition at line 12066 of file Solvers.java.

◆ clearField()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.clearField ( com.google.protobuf.Descriptors.FieldDescriptor field)

Definition at line 9689 of file Solvers.java.

◆ clearHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()

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

Returns
This builder for chaining.

Definition at line 11918 of file Solvers.java.

◆ clearInfiniteConstraintBoundThreshold()

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

Returns
This builder for chaining.

Definition at line 11854 of file Solvers.java.

◆ clearInitialPrimalWeight()

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

Returns
This builder for chaining.

Definition at line 10890 of file Solvers.java.

◆ clearInitialStepSizeScaling()

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

Returns
This builder for chaining.

Definition at line 11631 of file Solvers.java.

◆ clearL2NormRescaling()

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

Returns
This builder for chaining.

Definition at line 11135 of file Solvers.java.

◆ clearLinesearchRule()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.clearLinesearchRule ( )
Linesearch rule applied at each major iteration.

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

Returns
This builder for chaining.

Definition at line 11329 of file Solvers.java.

◆ clearLInfRuizIterations()

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

Returns
This builder for chaining.

Definition at line 11075 of file Solvers.java.

◆ clearLogIntervalSeconds()

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

Returns
This builder for chaining.

Definition at line 10520 of file Solvers.java.

◆ clearMajorIterationFrequency()

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

Returns
This builder for chaining.

Definition at line 10596 of file Solvers.java.

◆ clearMalitskyPockParameters()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.clearMalitskyPockParameters ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Definition at line 11532 of file Solvers.java.

◆ clearNecessaryReductionForRestart()

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

Returns
This builder for chaining.

Definition at line 11271 of file Solvers.java.

◆ clearNumShards()

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

Returns
This builder for chaining.

Definition at line 10284 of file Solvers.java.

◆ clearNumThreads()

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

Returns
This builder for chaining.

Definition at line 10196 of file Solvers.java.

◆ clearOneof()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.clearOneof ( com.google.protobuf.Descriptors.OneofDescriptor oneof)

Definition at line 9694 of file Solvers.java.

◆ clearPresolveOptions()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.clearPresolveOptions ( )

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

Definition at line 10972 of file Solvers.java.

◆ clearPrimalWeightUpdateSmoothing()

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

Returns
This builder for chaining.

Definition at line 10810 of file Solvers.java.

◆ clearRandomProjectionSeeds()

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

Returns
This builder for chaining.

Definition at line 11778 of file Solvers.java.

◆ clearRecordIterationStats()

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

Returns
This builder for chaining.

Definition at line 10352 of file Solvers.java.

◆ clearRestartStrategy()

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

Returns
This builder for chaining.

Definition at line 10726 of file Solvers.java.

◆ clearSufficientReductionForRestart()

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

Returns
This builder for chaining.

Definition at line 11199 of file Solvers.java.

◆ clearTerminationCheckFrequency()

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

Returns
This builder for chaining.

Definition at line 10660 of file Solvers.java.

◆ clearTerminationCriteria()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.clearTerminationCriteria ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Definition at line 10089 of file Solvers.java.

◆ clearUseDiagonalQpTrustRegionSolver()

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

Returns
This builder for chaining.

Definition at line 11994 of file Solvers.java.

◆ clearUseFeasibilityPolishing()

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

Returns
This builder for chaining.

Definition at line 12222 of file Solvers.java.

◆ clearVerbosityLevel()

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

Returns
This builder for chaining.

Definition at line 10448 of file Solvers.java.

◆ clone()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.clone ( )

Definition at line 9679 of file Solvers.java.

◆ getAdaptiveLinesearchParameters()

operations_research.pdlp.Solvers.AdaptiveLinesearchParams operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getAdaptiveLinesearchParameters ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Returns
The adaptiveLinesearchParameters.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11350 of file Solvers.java.

◆ getAdaptiveLinesearchParametersBuilder()

operations_research.pdlp.Solvers.AdaptiveLinesearchParams.Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getAdaptiveLinesearchParametersBuilder ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Definition at line 11424 of file Solvers.java.

◆ getAdaptiveLinesearchParametersOrBuilder()

operations_research.pdlp.Solvers.AdaptiveLinesearchParamsOrBuilder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getAdaptiveLinesearchParametersOrBuilder ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11432 of file Solvers.java.

◆ getDefaultInstanceForType()

operations_research.pdlp.Solvers.PrimalDualHybridGradientParams operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getDefaultInstanceForType ( )

Definition at line 9539 of file Solvers.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getDescriptor ( )
static

Definition at line 9452 of file Solvers.java.

◆ getDescriptorForType()

com.google.protobuf.Descriptors.Descriptor operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getDescriptorForType ( )

Definition at line 9534 of file Solvers.java.

◆ getDiagonalQpTrustRegionSolverTolerance()

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

Returns
The diagonalQpTrustRegionSolverTolerance.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 12031 of file Solvers.java.

◆ getHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()

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

Returns
The handleSomePrimalGradientsOnFiniteBoundsAsResiduals.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11887 of file Solvers.java.

◆ getInfiniteConstraintBoundThreshold()

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

Returns
The infiniteConstraintBoundThreshold.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11817 of file Solvers.java.

◆ getInitialPrimalWeight()

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

Returns
The initialPrimalWeight.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10851 of file Solvers.java.

◆ getInitialStepSizeScaling()

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

Returns
The initialStepSizeScaling.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11602 of file Solvers.java.

◆ getL2NormRescaling()

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

Returns
The l2NormRescaling.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11106 of file Solvers.java.

◆ getLinesearchRule()

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

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

Returns
The linesearchRule.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11299 of file Solvers.java.

◆ getLInfRuizIterations()

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

Returns
The lInfRuizIterations.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11044 of file Solvers.java.

◆ getLogIntervalSeconds()

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

Returns
The logIntervalSeconds.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10485 of file Solvers.java.

◆ getMajorIterationFrequency()

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

Returns
The majorIterationFrequency.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10559 of file Solvers.java.

◆ getMalitskyPockParameters()

operations_research.pdlp.Solvers.MalitskyPockParams operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getMalitskyPockParameters ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Returns
The malitskyPockParameters.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11471 of file Solvers.java.

◆ getMalitskyPockParametersBuilder()

operations_research.pdlp.Solvers.MalitskyPockParams.Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getMalitskyPockParametersBuilder ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Definition at line 11545 of file Solvers.java.

◆ getMalitskyPockParametersOrBuilder()

operations_research.pdlp.Solvers.MalitskyPockParamsOrBuilder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getMalitskyPockParametersOrBuilder ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11553 of file Solvers.java.

◆ getNecessaryReductionForRestart()

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

Returns
The necessaryReductionForRestart.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11236 of file Solvers.java.

◆ getNumShards()

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

Returns
The numShards.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10241 of file Solvers.java.

◆ getNumThreads()

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

Returns
The numThreads.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10163 of file Solvers.java.

◆ getPresolveOptions()

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

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

Returns
The presolveOptions.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10911 of file Solvers.java.

◆ getPresolveOptionsBuilder()

operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptions.Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getPresolveOptionsBuilder ( )

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

Definition at line 10985 of file Solvers.java.

◆ getPresolveOptionsOrBuilder()

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

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

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10993 of file Solvers.java.

◆ getPrimalWeightUpdateSmoothing()

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

Returns
The primalWeightUpdateSmoothing.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10769 of file Solvers.java.

◆ getRandomProjectionSeeds()

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

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

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11693 of file Solvers.java.

◆ getRandomProjectionSeedsCount()

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

Returns
The count of randomProjectionSeeds.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11676 of file Solvers.java.

◆ getRandomProjectionSeedsList()

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

Returns
A list containing the randomProjectionSeeds.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11659 of file Solvers.java.

◆ getRecordIterationStats()

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

Returns
The recordIterationStats.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10319 of file Solvers.java.

◆ getRestartStrategy()

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

Returns
The restartStrategy.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10692 of file Solvers.java.

◆ getSufficientReductionForRestart()

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

Returns
The sufficientReductionForRestart.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11168 of file Solvers.java.

◆ getTerminationCheckFrequency()

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

Returns
The terminationCheckFrequency.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10629 of file Solvers.java.

◆ getTerminationCriteria()

operations_research.pdlp.Solvers.TerminationCriteria operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getTerminationCriteria ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Returns
The terminationCriteria.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10028 of file Solvers.java.

◆ getTerminationCriteriaBuilder()

operations_research.pdlp.Solvers.TerminationCriteria.Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getTerminationCriteriaBuilder ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Definition at line 10102 of file Solvers.java.

◆ getTerminationCriteriaOrBuilder()

operations_research.pdlp.Solvers.TerminationCriteriaOrBuilder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.getTerminationCriteriaOrBuilder ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10110 of file Solvers.java.

◆ getUseDiagonalQpTrustRegionSolver()

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

Returns
The useDiagonalQpTrustRegionSolver.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11957 of file Solvers.java.

◆ getUseFeasibilityPolishing()

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

Returns
The useFeasibilityPolishing.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 12145 of file Solvers.java.

◆ getVerbosityLevel()

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

Returns
The verbosityLevel.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10401 of file Solvers.java.

◆ hasAdaptiveLinesearchParameters()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.hasAdaptiveLinesearchParameters ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Returns
Whether the adaptiveLinesearchParameters field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11343 of file Solvers.java.

◆ hasDiagonalQpTrustRegionSolverTolerance()

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

Returns
Whether the diagonalQpTrustRegionSolverTolerance field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 12015 of file Solvers.java.

◆ hasHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()

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

Returns
Whether the handleSomePrimalGradientsOnFiniteBoundsAsResiduals field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11873 of file Solvers.java.

◆ hasInfiniteConstraintBoundThreshold()

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

Returns
Whether the infiniteConstraintBoundThreshold field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11800 of file Solvers.java.

◆ hasInitialPrimalWeight()

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

Returns
Whether the initialPrimalWeight field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10833 of file Solvers.java.

◆ hasInitialStepSizeScaling()

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

Returns
Whether the initialStepSizeScaling field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11589 of file Solvers.java.

◆ hasL2NormRescaling()

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

Returns
Whether the l2NormRescaling field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11093 of file Solvers.java.

◆ hasLinesearchRule()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.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.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11287 of file Solvers.java.

◆ hasLInfRuizIterations()

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

Returns
Whether the lInfRuizIterations field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11030 of file Solvers.java.

◆ hasLogIntervalSeconds()

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

Returns
Whether the logIntervalSeconds field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10469 of file Solvers.java.

◆ hasMajorIterationFrequency()

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

Returns
Whether the majorIterationFrequency field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10542 of file Solvers.java.

◆ hasMalitskyPockParameters()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.hasMalitskyPockParameters ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Returns
Whether the malitskyPockParameters field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11464 of file Solvers.java.

◆ hasNecessaryReductionForRestart()

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

Returns
Whether the necessaryReductionForRestart field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11220 of file Solvers.java.

◆ hasNumShards()

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

Returns
Whether the numShards field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10221 of file Solvers.java.

◆ hasNumThreads()

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

Returns
Whether the numThreads field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10148 of file Solvers.java.

◆ hasPresolveOptions()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.hasPresolveOptions ( )

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

Returns
Whether the presolveOptions field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10904 of file Solvers.java.

◆ hasPrimalWeightUpdateSmoothing()

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

Returns
Whether the primalWeightUpdateSmoothing field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10750 of file Solvers.java.

◆ hasRecordIterationStats()

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

Returns
Whether the recordIterationStats field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10304 of file Solvers.java.

◆ hasRestartStrategy()

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

Returns
Whether the restartStrategy field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10678 of file Solvers.java.

◆ hasSufficientReductionForRestart()

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

Returns
Whether the sufficientReductionForRestart field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11154 of file Solvers.java.

◆ hasTerminationCheckFrequency()

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

Returns
Whether the terminationCheckFrequency field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10615 of file Solvers.java.

◆ hasTerminationCriteria()

boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.hasTerminationCriteria ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Returns
Whether the terminationCriteria field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10021 of file Solvers.java.

◆ hasUseDiagonalQpTrustRegionSolver()

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

Returns
Whether the useDiagonalQpTrustRegionSolver field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 11940 of file Solvers.java.

◆ hasUseFeasibilityPolishing()

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

Returns
Whether the useFeasibilityPolishing field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 12108 of file Solvers.java.

◆ hasVerbosityLevel()

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

Returns
Whether the verbosityLevel field is set.

Implements operations_research.pdlp.Solvers.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 10379 of file Solvers.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessageV3.FieldAccessorTable operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.internalGetFieldAccessorTable ( )
protected

Definition at line 9458 of file Solvers.java.

◆ isInitialized()

final boolean operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.isInitialized ( )

Definition at line 9814 of file Solvers.java.

◆ mergeAdaptiveLinesearchParameters()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.mergeAdaptiveLinesearchParameters ( operations_research.pdlp.Solvers.AdaptiveLinesearchParams value)

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Definition at line 11390 of file Solvers.java.

◆ mergeFrom() [1/3]

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.mergeFrom ( com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException

Definition at line 9819 of file Solvers.java.

◆ mergeFrom() [2/3]

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.mergeFrom ( com.google.protobuf.Message other)

Definition at line 9711 of file Solvers.java.

◆ mergeFrom() [3/3]

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.mergeFrom ( operations_research.pdlp.Solvers.PrimalDualHybridGradientParams other)

Definition at line 9720 of file Solvers.java.

◆ mergeMalitskyPockParameters()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.mergeMalitskyPockParameters ( operations_research.pdlp.Solvers.MalitskyPockParams value)

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Definition at line 11511 of file Solvers.java.

◆ mergePresolveOptions()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.mergePresolveOptions ( operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptions value)

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

Definition at line 10951 of file Solvers.java.

◆ mergeTerminationCriteria()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.mergeTerminationCriteria ( operations_research.pdlp.Solvers.TerminationCriteria value)

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Definition at line 10068 of file Solvers.java.

◆ mergeUnknownFields()

final Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.mergeUnknownFields ( final com.google.protobuf.UnknownFieldSet unknownFields)

Definition at line 12235 of file Solvers.java.

◆ setAdaptiveLinesearchParameters() [1/2]

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setAdaptiveLinesearchParameters ( operations_research.pdlp.Solvers.AdaptiveLinesearchParams value)

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Definition at line 11360 of file Solvers.java.

◆ setAdaptiveLinesearchParameters() [2/2]

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setAdaptiveLinesearchParameters ( operations_research.pdlp.Solvers.AdaptiveLinesearchParams.Builder builderForValue)

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Definition at line 11376 of file Solvers.java.

◆ setDiagonalQpTrustRegionSolverTolerance()

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

Parameters
valueThe diagonalQpTrustRegionSolverTolerance to set.
Returns
This builder for chaining.

Definition at line 12047 of file Solvers.java.

◆ setField()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setField ( com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value )

Definition at line 9683 of file Solvers.java.

◆ setHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()

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

Parameters
valueThe handleSomePrimalGradientsOnFiniteBoundsAsResiduals to set.
Returns
This builder for chaining.

Definition at line 11901 of file Solvers.java.

◆ setInfiniteConstraintBoundThreshold()

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

Parameters
valueThe infiniteConstraintBoundThreshold to set.
Returns
This builder for chaining.

Definition at line 11834 of file Solvers.java.

◆ setInitialPrimalWeight()

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

Parameters
valueThe initialPrimalWeight to set.
Returns
This builder for chaining.

Definition at line 10869 of file Solvers.java.

◆ setInitialStepSizeScaling()

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

Parameters
valueThe initialStepSizeScaling to set.
Returns
This builder for chaining.

Definition at line 11615 of file Solvers.java.

◆ setL2NormRescaling()

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

Parameters
valueThe l2NormRescaling to set.
Returns
This builder for chaining.

Definition at line 11119 of file Solvers.java.

◆ setLinesearchRule()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setLinesearchRule ( operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.LinesearchRule value)
Linesearch rule applied at each major iteration.

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

Parameters
valueThe linesearchRule to set.
Returns
This builder for chaining.

Definition at line 11312 of file Solvers.java.

◆ setLInfRuizIterations()

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

Parameters
valueThe lInfRuizIterations to set.
Returns
This builder for chaining.

Definition at line 11058 of file Solvers.java.

◆ setLogIntervalSeconds()

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

Parameters
valueThe logIntervalSeconds to set.
Returns
This builder for chaining.

Definition at line 10501 of file Solvers.java.

◆ setMajorIterationFrequency()

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

Parameters
valueThe majorIterationFrequency to set.
Returns
This builder for chaining.

Definition at line 10576 of file Solvers.java.

◆ setMalitskyPockParameters() [1/2]

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setMalitskyPockParameters ( operations_research.pdlp.Solvers.MalitskyPockParams value)

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Definition at line 11481 of file Solvers.java.

◆ setMalitskyPockParameters() [2/2]

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setMalitskyPockParameters ( operations_research.pdlp.Solvers.MalitskyPockParams.Builder builderForValue)

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Definition at line 11497 of file Solvers.java.

◆ setNecessaryReductionForRestart()

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

Parameters
valueThe necessaryReductionForRestart to set.
Returns
This builder for chaining.

Definition at line 11252 of file Solvers.java.

◆ setNumShards()

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

Parameters
valueThe numShards to set.
Returns
This builder for chaining.

Definition at line 10261 of file Solvers.java.

◆ setNumThreads()

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

Parameters
valueThe numThreads to set.
Returns
This builder for chaining.

Definition at line 10178 of file Solvers.java.

◆ setPresolveOptions() [1/2]

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setPresolveOptions ( operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptions value)

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

Definition at line 10921 of file Solvers.java.

◆ setPresolveOptions() [2/2]

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setPresolveOptions ( operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.PresolveOptions.Builder builderForValue)

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

Definition at line 10937 of file Solvers.java.

◆ setPrimalWeightUpdateSmoothing()

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

Parameters
valueThe primalWeightUpdateSmoothing to set.
Returns
This builder for chaining.

Definition at line 10788 of file Solvers.java.

◆ setRandomProjectionSeeds()

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

Parameters
indexThe index to set the value at.
valueThe randomProjectionSeeds to set.
Returns
This builder for chaining.

Definition at line 11711 of file Solvers.java.

◆ setRecordIterationStats()

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

Parameters
valueThe recordIterationStats to set.
Returns
This builder for chaining.

Definition at line 10334 of file Solvers.java.

◆ setRepeatedField()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value )

Definition at line 9699 of file Solvers.java.

◆ setRestartStrategy()

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setRestartStrategy ( operations_research.pdlp.Solvers.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];

Parameters
valueThe restartStrategy to set.
Returns
This builder for chaining.

Definition at line 10707 of file Solvers.java.

◆ setSufficientReductionForRestart()

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

Parameters
valueThe sufficientReductionForRestart to set.
Returns
This builder for chaining.

Definition at line 11182 of file Solvers.java.

◆ setTerminationCheckFrequency()

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

Parameters
valueThe terminationCheckFrequency to set.
Returns
This builder for chaining.

Definition at line 10643 of file Solvers.java.

◆ setTerminationCriteria() [1/2]

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setTerminationCriteria ( operations_research.pdlp.Solvers.TerminationCriteria value)

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Definition at line 10038 of file Solvers.java.

◆ setTerminationCriteria() [2/2]

Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setTerminationCriteria ( operations_research.pdlp.Solvers.TerminationCriteria.Builder builderForValue)

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Definition at line 10054 of file Solvers.java.

◆ setUnknownFields()

final Builder operations_research.pdlp.Solvers.PrimalDualHybridGradientParams.Builder.setUnknownFields ( final com.google.protobuf.UnknownFieldSet unknownFields)

Definition at line 12229 of file Solvers.java.

◆ setUseDiagonalQpTrustRegionSolver()

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

Parameters
valueThe useDiagonalQpTrustRegionSolver to set.
Returns
This builder for chaining.

Definition at line 11974 of file Solvers.java.

◆ setUseFeasibilityPolishing()

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

Parameters
valueThe useFeasibilityPolishing to set.
Returns
This builder for chaining.

Definition at line 12182 of file Solvers.java.

◆ setVerbosityLevel()

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

Parameters
valueThe verbosityLevel to set.
Returns
This builder for chaining.

Definition at line 10423 of file Solvers.java.


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