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

Public Member Functions

Builder clear ()
 
com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
com.google.ortools.pdlp.PrimalDualHybridGradientParams getDefaultInstanceForType ()
 
com.google.ortools.pdlp.PrimalDualHybridGradientParams build ()
 
com.google.ortools.pdlp.PrimalDualHybridGradientParams buildPartial ()
 
Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (com.google.ortools.pdlp.PrimalDualHybridGradientParams other)
 
final boolean isInitialized ()
 
Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
boolean hasTerminationCriteria ()
 
com.google.ortools.pdlp.TerminationCriteria getTerminationCriteria ()
 
Builder setTerminationCriteria (com.google.ortools.pdlp.TerminationCriteria value)
 
Builder setTerminationCriteria (com.google.ortools.pdlp.TerminationCriteria.Builder builderForValue)
 
Builder mergeTerminationCriteria (com.google.ortools.pdlp.TerminationCriteria value)
 
Builder clearTerminationCriteria ()
 
com.google.ortools.pdlp.TerminationCriteria.Builder getTerminationCriteriaBuilder ()
 
com.google.ortools.pdlp.TerminationCriteriaOrBuilder getTerminationCriteriaOrBuilder ()
 
boolean hasNumThreads ()
 
int getNumThreads ()
 
Builder setNumThreads (int value)
 
Builder clearNumThreads ()
 
boolean hasNumShards ()
 
int getNumShards ()
 
Builder setNumShards (int value)
 
Builder clearNumShards ()
 
boolean hasSchedulerType ()
 
com.google.ortools.pdlp.SchedulerType getSchedulerType ()
 
Builder setSchedulerType (com.google.ortools.pdlp.SchedulerType value)
 
Builder clearSchedulerType ()
 
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 ()
 
com.google.ortools.pdlp.PrimalDualHybridGradientParams.RestartStrategy getRestartStrategy ()
 
Builder setRestartStrategy (com.google.ortools.pdlp.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 ()
 
com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions getPresolveOptions ()
 
Builder setPresolveOptions (com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions value)
 
Builder setPresolveOptions (com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions.Builder builderForValue)
 
Builder mergePresolveOptions (com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions value)
 
Builder clearPresolveOptions ()
 
com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions.Builder getPresolveOptionsBuilder ()
 
com.google.ortools.pdlp.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 ()
 
com.google.ortools.pdlp.PrimalDualHybridGradientParams.LinesearchRule getLinesearchRule ()
 
Builder setLinesearchRule (com.google.ortools.pdlp.PrimalDualHybridGradientParams.LinesearchRule value)
 
Builder clearLinesearchRule ()
 
boolean hasAdaptiveLinesearchParameters ()
 
com.google.ortools.pdlp.AdaptiveLinesearchParams getAdaptiveLinesearchParameters ()
 
Builder setAdaptiveLinesearchParameters (com.google.ortools.pdlp.AdaptiveLinesearchParams value)
 
Builder setAdaptiveLinesearchParameters (com.google.ortools.pdlp.AdaptiveLinesearchParams.Builder builderForValue)
 
Builder mergeAdaptiveLinesearchParameters (com.google.ortools.pdlp.AdaptiveLinesearchParams value)
 
Builder clearAdaptiveLinesearchParameters ()
 
com.google.ortools.pdlp.AdaptiveLinesearchParams.Builder getAdaptiveLinesearchParametersBuilder ()
 
com.google.ortools.pdlp.AdaptiveLinesearchParamsOrBuilder getAdaptiveLinesearchParametersOrBuilder ()
 
boolean hasMalitskyPockParameters ()
 
com.google.ortools.pdlp.MalitskyPockParams getMalitskyPockParameters ()
 
Builder setMalitskyPockParameters (com.google.ortools.pdlp.MalitskyPockParams value)
 
Builder setMalitskyPockParameters (com.google.ortools.pdlp.MalitskyPockParams.Builder builderForValue)
 
Builder mergeMalitskyPockParameters (com.google.ortools.pdlp.MalitskyPockParams value)
 
Builder clearMalitskyPockParameters ()
 
com.google.ortools.pdlp.MalitskyPockParams.Builder getMalitskyPockParametersBuilder ()
 
com.google.ortools.pdlp.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 ()
 

Static Public Member Functions

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

Protected Member Functions

com.google.protobuf.GeneratedMessage.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 2835 of file PrimalDualHybridGradientParams.java.

Member Function Documentation

◆ addAllRandomProjectionSeeds()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.addAllRandomProjectionSeeds ( java.lang.Iterable<? extends java.lang.Integer > values)
Seeds for generating (pseudo-)random projections of iterates during
termination checks. For each seed, the projection of the primal and dual
solutions onto random planes in primal and dual space will be computed and
added the IterationStats if record_iteration_stats is true. The random
planes generated will be determined by the seeds, the primal and dual
dimensions, and num_threads.

repeated int32 random_projection_seeds = 28 [packed = true];

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

Definition at line 5194 of file PrimalDualHybridGradientParams.java.

◆ addRandomProjectionSeeds()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.addRandomProjectionSeeds ( int value)
Seeds for generating (pseudo-)random projections of iterates during
termination checks. For each seed, the projection of the primal and dual
solutions onto random planes in primal and dual space will be computed and
added the IterationStats if record_iteration_stats is true. The random
planes generated will be determined by the seeds, the primal and dual
dimensions, and num_threads.

repeated int32 random_projection_seeds = 28 [packed = true];

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

Definition at line 5172 of file PrimalDualHybridGradientParams.java.

◆ build()

com.google.ortools.pdlp.PrimalDualHybridGradientParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.build ( )

Definition at line 2933 of file PrimalDualHybridGradientParams.java.

◆ buildPartial()

com.google.ortools.pdlp.PrimalDualHybridGradientParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.buildPartial ( )

Definition at line 2942 of file PrimalDualHybridGradientParams.java.

◆ clear()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clear ( )

Definition at line 2872 of file PrimalDualHybridGradientParams.java.

◆ clearAdaptiveLinesearchParameters()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearAdaptiveLinesearchParameters ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Definition at line 4849 of file PrimalDualHybridGradientParams.java.

◆ clearDiagonalQpTrustRegionSolverTolerance()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearDiagonalQpTrustRegionSolverTolerance ( )
The solve tolerance of the experimental trust region solver for diagonal
QPs, controlling the accuracy of binary search over a one-dimensional
scaling parameter. Smaller values imply smaller relative error of the final
solution vector.
TODO(user): Find an expression for the final relative error.

optional double diagonal_qp_trust_region_solver_tolerance = 24 [default = 1e-08];

Returns
This builder for chaining.

Definition at line 5504 of file PrimalDualHybridGradientParams.java.

◆ clearHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearHandleSomePrimalGradientsOnFiniteBoundsAsResiduals ( )
See
https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite
for a description of this flag.

optional bool handle_some_primal_gradients_on_finite_bounds_as_residuals = 29 [default = true];

Returns
This builder for chaining.

Definition at line 5356 of file PrimalDualHybridGradientParams.java.

◆ clearInfiniteConstraintBoundThreshold()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearInfiniteConstraintBoundThreshold ( )
Constraint bounds with absolute value at least this threshold are replaced
with infinities.
NOTE: This primarily affects the relative convergence criteria. A smaller
value makes the relative convergence criteria stronger. It also affects the
problem statistics LOG()ed at the start of the run, and the default initial
primal weight, since that is based on the norm of the bounds.

optional double infinite_constraint_bound_threshold = 22 [default = inf];

Returns
This builder for chaining.

Definition at line 5292 of file PrimalDualHybridGradientParams.java.

◆ clearInitialPrimalWeight()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearInitialPrimalWeight ( )
The initial value of the primal weight (i.e., the ratio of primal and dual
step sizes). The primal weight remains fixed throughout the solve if
primal_weight_update_smoothing = 0.0. If unset, the default is the ratio of
the norm of the objective vector to the L2 norm of the combined constraint
bounds vector (as defined above). If this ratio is not finite and positive,
then the default is 1.0 instead. For tuning, try powers of 10, for example,
from 10^{-6} to 10^6.

optional double initial_primal_weight = 8;

Returns
This builder for chaining.

Definition at line 4328 of file PrimalDualHybridGradientParams.java.

◆ clearInitialStepSizeScaling()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearInitialStepSizeScaling ( )
Scaling factor applied to the initial step size (all step sizes if
linesearch_rule == CONSTANT_STEP_SIZE_RULE).

optional double initial_step_size_scaling = 25 [default = 1];

Returns
This builder for chaining.

Definition at line 5069 of file PrimalDualHybridGradientParams.java.

◆ clearL2NormRescaling()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearL2NormRescaling ( )
If true, applies L_2 norm rescaling after the Ruiz rescaling. Heuristically
this has been found to help convergence.

optional bool l2_norm_rescaling = 10 [default = true];

Returns
This builder for chaining.

Definition at line 4573 of file PrimalDualHybridGradientParams.java.

◆ clearLinesearchRule()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearLinesearchRule ( )
Linesearch rule applied at each major iteration.

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

Returns
This builder for chaining.

Definition at line 4767 of file PrimalDualHybridGradientParams.java.

◆ clearLInfRuizIterations()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearLInfRuizIterations ( )
Number of L_infinity Ruiz rescaling iterations to apply to the constraint
matrix. Zero disables this rescaling pass. Recommended values to try when
tuning are 0, 5, and 10.

optional int32 l_inf_ruiz_iterations = 9 [default = 5];

Returns
This builder for chaining.

Definition at line 4513 of file PrimalDualHybridGradientParams.java.

◆ clearLogIntervalSeconds()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearLogIntervalSeconds ( )
Time between iteration-level statistics logging (if `verbosity_level > 1`).
Since iteration-level statistics are only generated when performing
termination checks, logs will be generated from next termination check
after `log_interval_seconds` have elapsed. Should be >= 0.0. 0.0 (the
default) means log statistics at every termination check.

optional double log_interval_seconds = 31 [default = 0];

Returns
This builder for chaining.

Definition at line 3958 of file PrimalDualHybridGradientParams.java.

◆ clearMajorIterationFrequency()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearMajorIterationFrequency ( )
The frequency at which extra work is performed to make major algorithmic
decisions, e.g., performing restarts and updating the primal weight. Major
iterations also trigger a termination check. For best performance using the
NO_RESTARTS or EVERY_MAJOR_ITERATION rule, one should perform a log-scale
grid search over this parameter, for example, over powers of two.
ADAPTIVE_HEURISTIC is mostly insensitive to this value.

optional int32 major_iteration_frequency = 4 [default = 64];

Returns
This builder for chaining.

Definition at line 4034 of file PrimalDualHybridGradientParams.java.

◆ clearMalitskyPockParameters()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearMalitskyPockParameters ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Definition at line 4970 of file PrimalDualHybridGradientParams.java.

◆ clearNecessaryReductionForRestart()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearNecessaryReductionForRestart ( )
For ADAPTIVE_HEURISTIC only: A relative reduction in the potential function
by this amount triggers a restart if, additionally, the quality of the
iterates appears to be getting worse. The value must be in the interval
[sufficient_reduction_for_restart, 1). Smaller values make restarts less
frequent, and larger values make them more frequent.

optional double necessary_reduction_for_restart = 17 [default = 0.9];

Returns
This builder for chaining.

Definition at line 4709 of file PrimalDualHybridGradientParams.java.

◆ clearNumShards()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearNumShards ( )
For more efficient parallel computation, the matrices and vectors are
divided (virtually) into num_shards shards. Results are computed
independently for each shard and then combined. As a consequence, the order
of computation, and hence floating point roundoff, depends on the number of
shards so reproducible results require using the same value for num_shards.
However, for efficiency num_shards should a be at least num_threads, and
preferably at least 4*num_threads to allow better load balancing. If
num_shards is positive, the computation will use that many shards.
Otherwise a default that depends on num_threads will be used.

optional int32 num_shards = 27 [default = 0];

Returns
This builder for chaining.

Definition at line 3660 of file PrimalDualHybridGradientParams.java.

◆ clearNumThreads()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearNumThreads ( )
The number of threads to use. Must be positive.
Try various values of num_threads, up to the number of physical cores.
Performance may not be monotonically increasing with the number of threads
because of memory bandwidth limitations.

optional int32 num_threads = 2 [default = 1];

Returns
This builder for chaining.

Definition at line 3572 of file PrimalDualHybridGradientParams.java.

◆ clearPresolveOptions()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearPresolveOptions ( )

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

Definition at line 4410 of file PrimalDualHybridGradientParams.java.

◆ clearPrimalWeightUpdateSmoothing()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearPrimalWeightUpdateSmoothing ( )
This parameter controls exponential smoothing of log(primal_weight) when a
primal weight update occurs (i.e., when the ratio of primal and dual step
sizes is adjusted). At 0.0, the primal weight will be frozen at its initial
value and there will be no dynamic updates in the algorithm. At 1.0, there
is no smoothing in the updates. The default of 0.5 generally performs well,
but has been observed on occasion to trigger unstable swings in the primal
weight. We recommend also trying 0.0 (disabling primal weight updates), in
which case you must also tune initial_primal_weight.

optional double primal_weight_update_smoothing = 7 [default = 0.5];

Returns
This builder for chaining.

Definition at line 4248 of file PrimalDualHybridGradientParams.java.

◆ clearRandomProjectionSeeds()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearRandomProjectionSeeds ( )
Seeds for generating (pseudo-)random projections of iterates during
termination checks. For each seed, the projection of the primal and dual
solutions onto random planes in primal and dual space will be computed and
added the IterationStats if record_iteration_stats is true. The random
planes generated will be determined by the seeds, the primal and dual
dimensions, and num_threads.

repeated int32 random_projection_seeds = 28 [packed = true];

Returns
This builder for chaining.

Definition at line 5216 of file PrimalDualHybridGradientParams.java.

◆ clearRecordIterationStats()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearRecordIterationStats ( )
If true, the iteration_stats field of the SolveLog output will be populated
at every iteration. Note that we only compute solution statistics at
termination checks. Setting this parameter to true may substantially
increase the size of the output.

optional bool record_iteration_stats = 3;

Returns
This builder for chaining.

Definition at line 3790 of file PrimalDualHybridGradientParams.java.

◆ clearRestartStrategy()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearRestartStrategy ( )
NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default.
If using a strategy other than ADAPTIVE_HEURISTIC, you must also tune
major_iteration_frequency.

optional .operations_research.pdlp.PrimalDualHybridGradientParams.RestartStrategy restart_strategy = 6 [default = ADAPTIVE_HEURISTIC];

Returns
This builder for chaining.

Definition at line 4164 of file PrimalDualHybridGradientParams.java.

◆ clearSchedulerType()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearSchedulerType ( )
The type of scheduler used for CPU multi-threading. See the documentation
of the corresponding enum for more details.

optional .operations_research.pdlp.SchedulerType scheduler_type = 32 [default = SCHEDULER_TYPE_GOOGLE_THREADPOOL];

Returns
This builder for chaining.

Definition at line 3722 of file PrimalDualHybridGradientParams.java.

◆ clearSufficientReductionForRestart()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearSufficientReductionForRestart ( )
For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative
reduction in the potential function by this amount always triggers a
restart. Must be between 0.0 and 1.0.

optional double sufficient_reduction_for_restart = 11 [default = 0.1];

Returns
This builder for chaining.

Definition at line 4637 of file PrimalDualHybridGradientParams.java.

◆ clearTerminationCheckFrequency()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearTerminationCheckFrequency ( )
The frequency (based on a counter reset every major iteration) to check for
termination (involves extra work) and log iteration stats. Termination
checks do not affect algorithmic progress unless termination is triggered.

optional int32 termination_check_frequency = 5 [default = 64];

Returns
This builder for chaining.

Definition at line 4098 of file PrimalDualHybridGradientParams.java.

◆ clearTerminationCriteria()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearTerminationCriteria ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Definition at line 3465 of file PrimalDualHybridGradientParams.java.

◆ clearUseDiagonalQpTrustRegionSolver()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearUseDiagonalQpTrustRegionSolver ( )
When solving QPs with diagonal objective matrices, this option can be
turned on to enable an experimental solver that avoids linearization of the
quadratic term. The `diagonal_qp_solver_accuracy` parameter controls the
solve accuracy.
TODO(user): Turn this option on by default for quadratic
programs after numerical evaluation.

optional bool use_diagonal_qp_trust_region_solver = 23 [default = false];

Returns
This builder for chaining.

Definition at line 5432 of file PrimalDualHybridGradientParams.java.

◆ clearUseFeasibilityPolishing()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearUseFeasibilityPolishing ( )
If true, periodically runs feasibility polishing, which attempts to move
from latest average iterate to one that is closer to feasibility (i.e., has
smaller primal and dual residuals) while probably increasing the objective
gap. This is useful primarily when the feasibility tolerances are fairly
tight and the objective gap tolerance is somewhat looser. Note that this
does not change the termination criteria, but rather can help achieve the
termination criteria more quickly when the objective gap is not as
important as feasibility.

`use_feasibility_polishing` cannot be used with glop presolve, and requires
`handle_some_primal_gradients_on_finite_bounds_as_residuals == false`.
`use_feasibility_polishing` can only be used with linear programs.

Feasibility polishing runs two separate phases, primal feasibility and dual
feasibility. The primal feasibility phase runs PDHG on the primal
feasibility problem (obtained by changing the objective vector to all
zeros), using the average primal iterate and zero dual (which is optimal
for the primal feasibility problem) as the initial solution. The dual
feasibility phase runs PDHG on the dual feasibility problem (obtained by
changing all finite variable and constraint bounds to zero), using the
average dual iterate and zero primal (which is optimal for the dual
feasibility problem) as the initial solution. The primal solution from the
primal feasibility phase and dual solution from the dual feasibility phase
are then combined (forming a solution of type
`POINT_TYPE_FEASIBILITY_POLISHING_SOLUTION`) and checked against the
termination criteria.

optional bool use_feasibility_polishing = 30 [default = false];

Returns
This builder for chaining.

Definition at line 5660 of file PrimalDualHybridGradientParams.java.

◆ clearVerbosityLevel()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.clearVerbosityLevel ( )
The verbosity of logging.
0: No informational logging. (Errors are logged.)
1: Summary statistics only. No iteration-level details.
2: A table of iteration-level statistics is logged.
(See ToShortString() in primal_dual_hybrid_gradient.cc).
3: A more detailed table of iteration-level statistics is logged.
(See ToString() in primal_dual_hybrid_gradient.cc).
4: For iteration-level details, prints the statistics of both the average
(prefixed with A) and the current iterate (prefixed with C). Also prints
internal algorithmic state and details.
Logging at levels 2-4 also includes messages from level 1.

optional int32 verbosity_level = 26 [default = 0];

Returns
This builder for chaining.

Definition at line 3886 of file PrimalDualHybridGradientParams.java.

◆ getAdaptiveLinesearchParameters()

com.google.ortools.pdlp.AdaptiveLinesearchParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getAdaptiveLinesearchParameters ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Returns
The adaptiveLinesearchParameters.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4788 of file PrimalDualHybridGradientParams.java.

◆ getAdaptiveLinesearchParametersBuilder()

com.google.ortools.pdlp.AdaptiveLinesearchParams.Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getAdaptiveLinesearchParametersBuilder ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Definition at line 4862 of file PrimalDualHybridGradientParams.java.

◆ getAdaptiveLinesearchParametersOrBuilder()

com.google.ortools.pdlp.AdaptiveLinesearchParamsOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getAdaptiveLinesearchParametersOrBuilder ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4870 of file PrimalDualHybridGradientParams.java.

◆ getDefaultInstanceForType()

com.google.ortools.pdlp.PrimalDualHybridGradientParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getDefaultInstanceForType ( )

Definition at line 2928 of file PrimalDualHybridGradientParams.java.

◆ getDescriptor()

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

Definition at line 2840 of file PrimalDualHybridGradientParams.java.

◆ getDescriptorForType()

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

Definition at line 2923 of file PrimalDualHybridGradientParams.java.

◆ getDiagonalQpTrustRegionSolverTolerance()

double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getDiagonalQpTrustRegionSolverTolerance ( )
The solve tolerance of the experimental trust region solver for diagonal
QPs, controlling the accuracy of binary search over a one-dimensional
scaling parameter. Smaller values imply smaller relative error of the final
solution vector.
TODO(user): Find an expression for the final relative error.

optional double diagonal_qp_trust_region_solver_tolerance = 24 [default = 1e-08];

Returns
The diagonalQpTrustRegionSolverTolerance.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5469 of file PrimalDualHybridGradientParams.java.

◆ getHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getHandleSomePrimalGradientsOnFiniteBoundsAsResiduals ( )
See
https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite
for a description of this flag.

optional bool handle_some_primal_gradients_on_finite_bounds_as_residuals = 29 [default = true];

Returns
The handleSomePrimalGradientsOnFiniteBoundsAsResiduals.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5325 of file PrimalDualHybridGradientParams.java.

◆ getInfiniteConstraintBoundThreshold()

double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getInfiniteConstraintBoundThreshold ( )
Constraint bounds with absolute value at least this threshold are replaced
with infinities.
NOTE: This primarily affects the relative convergence criteria. A smaller
value makes the relative convergence criteria stronger. It also affects the
problem statistics LOG()ed at the start of the run, and the default initial
primal weight, since that is based on the norm of the bounds.

optional double infinite_constraint_bound_threshold = 22 [default = inf];

Returns
The infiniteConstraintBoundThreshold.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5255 of file PrimalDualHybridGradientParams.java.

◆ getInitialPrimalWeight()

double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getInitialPrimalWeight ( )
The initial value of the primal weight (i.e., the ratio of primal and dual
step sizes). The primal weight remains fixed throughout the solve if
primal_weight_update_smoothing = 0.0. If unset, the default is the ratio of
the norm of the objective vector to the L2 norm of the combined constraint
bounds vector (as defined above). If this ratio is not finite and positive,
then the default is 1.0 instead. For tuning, try powers of 10, for example,
from 10^{-6} to 10^6.

optional double initial_primal_weight = 8;

Returns
The initialPrimalWeight.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4289 of file PrimalDualHybridGradientParams.java.

◆ getInitialStepSizeScaling()

double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getInitialStepSizeScaling ( )
Scaling factor applied to the initial step size (all step sizes if
linesearch_rule == CONSTANT_STEP_SIZE_RULE).

optional double initial_step_size_scaling = 25 [default = 1];

Returns
The initialStepSizeScaling.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5040 of file PrimalDualHybridGradientParams.java.

◆ getL2NormRescaling()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getL2NormRescaling ( )
If true, applies L_2 norm rescaling after the Ruiz rescaling. Heuristically
this has been found to help convergence.

optional bool l2_norm_rescaling = 10 [default = true];

Returns
The l2NormRescaling.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4544 of file PrimalDualHybridGradientParams.java.

◆ getLinesearchRule()

com.google.ortools.pdlp.PrimalDualHybridGradientParams.LinesearchRule com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getLinesearchRule ( )
Linesearch rule applied at each major iteration.

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

Returns
The linesearchRule.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4737 of file PrimalDualHybridGradientParams.java.

◆ getLInfRuizIterations()

int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getLInfRuizIterations ( )
Number of L_infinity Ruiz rescaling iterations to apply to the constraint
matrix. Zero disables this rescaling pass. Recommended values to try when
tuning are 0, 5, and 10.

optional int32 l_inf_ruiz_iterations = 9 [default = 5];

Returns
The lInfRuizIterations.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4482 of file PrimalDualHybridGradientParams.java.

◆ getLogIntervalSeconds()

double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getLogIntervalSeconds ( )
Time between iteration-level statistics logging (if `verbosity_level > 1`).
Since iteration-level statistics are only generated when performing
termination checks, logs will be generated from next termination check
after `log_interval_seconds` have elapsed. Should be >= 0.0. 0.0 (the
default) means log statistics at every termination check.

optional double log_interval_seconds = 31 [default = 0];

Returns
The logIntervalSeconds.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3923 of file PrimalDualHybridGradientParams.java.

◆ getMajorIterationFrequency()

int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getMajorIterationFrequency ( )
The frequency at which extra work is performed to make major algorithmic
decisions, e.g., performing restarts and updating the primal weight. Major
iterations also trigger a termination check. For best performance using the
NO_RESTARTS or EVERY_MAJOR_ITERATION rule, one should perform a log-scale
grid search over this parameter, for example, over powers of two.
ADAPTIVE_HEURISTIC is mostly insensitive to this value.

optional int32 major_iteration_frequency = 4 [default = 64];

Returns
The majorIterationFrequency.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3997 of file PrimalDualHybridGradientParams.java.

◆ getMalitskyPockParameters()

com.google.ortools.pdlp.MalitskyPockParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getMalitskyPockParameters ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Returns
The malitskyPockParameters.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4909 of file PrimalDualHybridGradientParams.java.

◆ getMalitskyPockParametersBuilder()

com.google.ortools.pdlp.MalitskyPockParams.Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getMalitskyPockParametersBuilder ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Definition at line 4983 of file PrimalDualHybridGradientParams.java.

◆ getMalitskyPockParametersOrBuilder()

com.google.ortools.pdlp.MalitskyPockParamsOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getMalitskyPockParametersOrBuilder ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4991 of file PrimalDualHybridGradientParams.java.

◆ getNecessaryReductionForRestart()

double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getNecessaryReductionForRestart ( )
For ADAPTIVE_HEURISTIC only: A relative reduction in the potential function
by this amount triggers a restart if, additionally, the quality of the
iterates appears to be getting worse. The value must be in the interval
[sufficient_reduction_for_restart, 1). Smaller values make restarts less
frequent, and larger values make them more frequent.

optional double necessary_reduction_for_restart = 17 [default = 0.9];

Returns
The necessaryReductionForRestart.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4674 of file PrimalDualHybridGradientParams.java.

◆ getNumShards()

int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getNumShards ( )
For more efficient parallel computation, the matrices and vectors are
divided (virtually) into num_shards shards. Results are computed
independently for each shard and then combined. As a consequence, the order
of computation, and hence floating point roundoff, depends on the number of
shards so reproducible results require using the same value for num_shards.
However, for efficiency num_shards should a be at least num_threads, and
preferably at least 4*num_threads to allow better load balancing. If
num_shards is positive, the computation will use that many shards.
Otherwise a default that depends on num_threads will be used.

optional int32 num_shards = 27 [default = 0];

Returns
The numShards.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3617 of file PrimalDualHybridGradientParams.java.

◆ getNumThreads()

int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getNumThreads ( )
The number of threads to use. Must be positive.
Try various values of num_threads, up to the number of physical cores.
Performance may not be monotonically increasing with the number of threads
because of memory bandwidth limitations.

optional int32 num_threads = 2 [default = 1];

Returns
The numThreads.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3539 of file PrimalDualHybridGradientParams.java.

◆ getPresolveOptions()

com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getPresolveOptions ( )

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

Returns
The presolveOptions.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4349 of file PrimalDualHybridGradientParams.java.

◆ getPresolveOptionsBuilder()

com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions.Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getPresolveOptionsBuilder ( )

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

Definition at line 4423 of file PrimalDualHybridGradientParams.java.

◆ getPresolveOptionsOrBuilder()

com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptionsOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getPresolveOptionsOrBuilder ( )

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

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4431 of file PrimalDualHybridGradientParams.java.

◆ getPrimalWeightUpdateSmoothing()

double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getPrimalWeightUpdateSmoothing ( )
This parameter controls exponential smoothing of log(primal_weight) when a
primal weight update occurs (i.e., when the ratio of primal and dual step
sizes is adjusted). At 0.0, the primal weight will be frozen at its initial
value and there will be no dynamic updates in the algorithm. At 1.0, there
is no smoothing in the updates. The default of 0.5 generally performs well,
but has been observed on occasion to trigger unstable swings in the primal
weight. We recommend also trying 0.0 (disabling primal weight updates), in
which case you must also tune initial_primal_weight.

optional double primal_weight_update_smoothing = 7 [default = 0.5];

Returns
The primalWeightUpdateSmoothing.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4207 of file PrimalDualHybridGradientParams.java.

◆ getRandomProjectionSeeds()

int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getRandomProjectionSeeds ( int index)
Seeds for generating (pseudo-)random projections of iterates during
termination checks. For each seed, the projection of the primal and dual
solutions onto random planes in primal and dual space will be computed and
added the IterationStats if record_iteration_stats is true. The random
planes generated will be determined by the seeds, the primal and dual
dimensions, and num_threads.

repeated int32 random_projection_seeds = 28 [packed = true];

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

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5131 of file PrimalDualHybridGradientParams.java.

◆ getRandomProjectionSeedsCount()

int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getRandomProjectionSeedsCount ( )
Seeds for generating (pseudo-)random projections of iterates during
termination checks. For each seed, the projection of the primal and dual
solutions onto random planes in primal and dual space will be computed and
added the IterationStats if record_iteration_stats is true. The random
planes generated will be determined by the seeds, the primal and dual
dimensions, and num_threads.

repeated int32 random_projection_seeds = 28 [packed = true];

Returns
The count of randomProjectionSeeds.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5114 of file PrimalDualHybridGradientParams.java.

◆ getRandomProjectionSeedsList()

java.util.List< java.lang.Integer > com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getRandomProjectionSeedsList ( )
Seeds for generating (pseudo-)random projections of iterates during
termination checks. For each seed, the projection of the primal and dual
solutions onto random planes in primal and dual space will be computed and
added the IterationStats if record_iteration_stats is true. The random
planes generated will be determined by the seeds, the primal and dual
dimensions, and num_threads.

repeated int32 random_projection_seeds = 28 [packed = true];

Returns
A list containing the randomProjectionSeeds.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5097 of file PrimalDualHybridGradientParams.java.

◆ getRecordIterationStats()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getRecordIterationStats ( )
If true, the iteration_stats field of the SolveLog output will be populated
at every iteration. Note that we only compute solution statistics at
termination checks. Setting this parameter to true may substantially
increase the size of the output.

optional bool record_iteration_stats = 3;

Returns
The recordIterationStats.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3757 of file PrimalDualHybridGradientParams.java.

◆ getRestartStrategy()

com.google.ortools.pdlp.PrimalDualHybridGradientParams.RestartStrategy com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getRestartStrategy ( )
NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default.
If using a strategy other than ADAPTIVE_HEURISTIC, you must also tune
major_iteration_frequency.

optional .operations_research.pdlp.PrimalDualHybridGradientParams.RestartStrategy restart_strategy = 6 [default = ADAPTIVE_HEURISTIC];

Returns
The restartStrategy.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4130 of file PrimalDualHybridGradientParams.java.

◆ getSchedulerType()

com.google.ortools.pdlp.SchedulerType com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getSchedulerType ( )
The type of scheduler used for CPU multi-threading. See the documentation
of the corresponding enum for more details.

optional .operations_research.pdlp.SchedulerType scheduler_type = 32 [default = SCHEDULER_TYPE_GOOGLE_THREADPOOL];

Returns
The schedulerType.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3690 of file PrimalDualHybridGradientParams.java.

◆ getSufficientReductionForRestart()

double com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getSufficientReductionForRestart ( )
For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative
reduction in the potential function by this amount always triggers a
restart. Must be between 0.0 and 1.0.

optional double sufficient_reduction_for_restart = 11 [default = 0.1];

Returns
The sufficientReductionForRestart.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4606 of file PrimalDualHybridGradientParams.java.

◆ getTerminationCheckFrequency()

int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getTerminationCheckFrequency ( )
The frequency (based on a counter reset every major iteration) to check for
termination (involves extra work) and log iteration stats. Termination
checks do not affect algorithmic progress unless termination is triggered.

optional int32 termination_check_frequency = 5 [default = 64];

Returns
The terminationCheckFrequency.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4067 of file PrimalDualHybridGradientParams.java.

◆ getTerminationCriteria()

com.google.ortools.pdlp.TerminationCriteria com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getTerminationCriteria ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Returns
The terminationCriteria.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3404 of file PrimalDualHybridGradientParams.java.

◆ getTerminationCriteriaBuilder()

com.google.ortools.pdlp.TerminationCriteria.Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getTerminationCriteriaBuilder ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Definition at line 3478 of file PrimalDualHybridGradientParams.java.

◆ getTerminationCriteriaOrBuilder()

com.google.ortools.pdlp.TerminationCriteriaOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getTerminationCriteriaOrBuilder ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3486 of file PrimalDualHybridGradientParams.java.

◆ getUseDiagonalQpTrustRegionSolver()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getUseDiagonalQpTrustRegionSolver ( )
When solving QPs with diagonal objective matrices, this option can be
turned on to enable an experimental solver that avoids linearization of the
quadratic term. The `diagonal_qp_solver_accuracy` parameter controls the
solve accuracy.
TODO(user): Turn this option on by default for quadratic
programs after numerical evaluation.

optional bool use_diagonal_qp_trust_region_solver = 23 [default = false];

Returns
The useDiagonalQpTrustRegionSolver.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5395 of file PrimalDualHybridGradientParams.java.

◆ getUseFeasibilityPolishing()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getUseFeasibilityPolishing ( )
If true, periodically runs feasibility polishing, which attempts to move
from latest average iterate to one that is closer to feasibility (i.e., has
smaller primal and dual residuals) while probably increasing the objective
gap. This is useful primarily when the feasibility tolerances are fairly
tight and the objective gap tolerance is somewhat looser. Note that this
does not change the termination criteria, but rather can help achieve the
termination criteria more quickly when the objective gap is not as
important as feasibility.

`use_feasibility_polishing` cannot be used with glop presolve, and requires
`handle_some_primal_gradients_on_finite_bounds_as_residuals == false`.
`use_feasibility_polishing` can only be used with linear programs.

Feasibility polishing runs two separate phases, primal feasibility and dual
feasibility. The primal feasibility phase runs PDHG on the primal
feasibility problem (obtained by changing the objective vector to all
zeros), using the average primal iterate and zero dual (which is optimal
for the primal feasibility problem) as the initial solution. The dual
feasibility phase runs PDHG on the dual feasibility problem (obtained by
changing all finite variable and constraint bounds to zero), using the
average dual iterate and zero primal (which is optimal for the dual
feasibility problem) as the initial solution. The primal solution from the
primal feasibility phase and dual solution from the dual feasibility phase
are then combined (forming a solution of type
`POINT_TYPE_FEASIBILITY_POLISHING_SOLUTION`) and checked against the
termination criteria.

optional bool use_feasibility_polishing = 30 [default = false];

Returns
The useFeasibilityPolishing.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5583 of file PrimalDualHybridGradientParams.java.

◆ getVerbosityLevel()

int com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.getVerbosityLevel ( )
The verbosity of logging.
0: No informational logging. (Errors are logged.)
1: Summary statistics only. No iteration-level details.
2: A table of iteration-level statistics is logged.
(See ToShortString() in primal_dual_hybrid_gradient.cc).
3: A more detailed table of iteration-level statistics is logged.
(See ToString() in primal_dual_hybrid_gradient.cc).
4: For iteration-level details, prints the statistics of both the average
(prefixed with A) and the current iterate (prefixed with C). Also prints
internal algorithmic state and details.
Logging at levels 2-4 also includes messages from level 1.

optional int32 verbosity_level = 26 [default = 0];

Returns
The verbosityLevel.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3839 of file PrimalDualHybridGradientParams.java.

◆ hasAdaptiveLinesearchParameters()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasAdaptiveLinesearchParameters ( )

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Returns
Whether the adaptiveLinesearchParameters field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4781 of file PrimalDualHybridGradientParams.java.

◆ hasDiagonalQpTrustRegionSolverTolerance()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasDiagonalQpTrustRegionSolverTolerance ( )
The solve tolerance of the experimental trust region solver for diagonal
QPs, controlling the accuracy of binary search over a one-dimensional
scaling parameter. Smaller values imply smaller relative error of the final
solution vector.
TODO(user): Find an expression for the final relative error.

optional double diagonal_qp_trust_region_solver_tolerance = 24 [default = 1e-08];

Returns
Whether the diagonalQpTrustRegionSolverTolerance field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5453 of file PrimalDualHybridGradientParams.java.

◆ hasHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasHandleSomePrimalGradientsOnFiniteBoundsAsResiduals ( )
See
https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite
for a description of this flag.

optional bool handle_some_primal_gradients_on_finite_bounds_as_residuals = 29 [default = true];

Returns
Whether the handleSomePrimalGradientsOnFiniteBoundsAsResiduals field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5311 of file PrimalDualHybridGradientParams.java.

◆ hasInfiniteConstraintBoundThreshold()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasInfiniteConstraintBoundThreshold ( )
Constraint bounds with absolute value at least this threshold are replaced
with infinities.
NOTE: This primarily affects the relative convergence criteria. A smaller
value makes the relative convergence criteria stronger. It also affects the
problem statistics LOG()ed at the start of the run, and the default initial
primal weight, since that is based on the norm of the bounds.

optional double infinite_constraint_bound_threshold = 22 [default = inf];

Returns
Whether the infiniteConstraintBoundThreshold field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5238 of file PrimalDualHybridGradientParams.java.

◆ hasInitialPrimalWeight()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasInitialPrimalWeight ( )
The initial value of the primal weight (i.e., the ratio of primal and dual
step sizes). The primal weight remains fixed throughout the solve if
primal_weight_update_smoothing = 0.0. If unset, the default is the ratio of
the norm of the objective vector to the L2 norm of the combined constraint
bounds vector (as defined above). If this ratio is not finite and positive,
then the default is 1.0 instead. For tuning, try powers of 10, for example,
from 10^{-6} to 10^6.

optional double initial_primal_weight = 8;

Returns
Whether the initialPrimalWeight field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4271 of file PrimalDualHybridGradientParams.java.

◆ hasInitialStepSizeScaling()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasInitialStepSizeScaling ( )
Scaling factor applied to the initial step size (all step sizes if
linesearch_rule == CONSTANT_STEP_SIZE_RULE).

optional double initial_step_size_scaling = 25 [default = 1];

Returns
Whether the initialStepSizeScaling field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5027 of file PrimalDualHybridGradientParams.java.

◆ hasL2NormRescaling()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasL2NormRescaling ( )
If true, applies L_2 norm rescaling after the Ruiz rescaling. Heuristically
this has been found to help convergence.

optional bool l2_norm_rescaling = 10 [default = true];

Returns
Whether the l2NormRescaling field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4531 of file PrimalDualHybridGradientParams.java.

◆ hasLinesearchRule()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasLinesearchRule ( )
Linesearch rule applied at each major iteration.

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

Returns
Whether the linesearchRule field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4725 of file PrimalDualHybridGradientParams.java.

◆ hasLInfRuizIterations()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasLInfRuizIterations ( )
Number of L_infinity Ruiz rescaling iterations to apply to the constraint
matrix. Zero disables this rescaling pass. Recommended values to try when
tuning are 0, 5, and 10.

optional int32 l_inf_ruiz_iterations = 9 [default = 5];

Returns
Whether the lInfRuizIterations field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4468 of file PrimalDualHybridGradientParams.java.

◆ hasLogIntervalSeconds()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasLogIntervalSeconds ( )
Time between iteration-level statistics logging (if `verbosity_level > 1`).
Since iteration-level statistics are only generated when performing
termination checks, logs will be generated from next termination check
after `log_interval_seconds` have elapsed. Should be >= 0.0. 0.0 (the
default) means log statistics at every termination check.

optional double log_interval_seconds = 31 [default = 0];

Returns
Whether the logIntervalSeconds field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3907 of file PrimalDualHybridGradientParams.java.

◆ hasMajorIterationFrequency()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasMajorIterationFrequency ( )
The frequency at which extra work is performed to make major algorithmic
decisions, e.g., performing restarts and updating the primal weight. Major
iterations also trigger a termination check. For best performance using the
NO_RESTARTS or EVERY_MAJOR_ITERATION rule, one should perform a log-scale
grid search over this parameter, for example, over powers of two.
ADAPTIVE_HEURISTIC is mostly insensitive to this value.

optional int32 major_iteration_frequency = 4 [default = 64];

Returns
Whether the majorIterationFrequency field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3980 of file PrimalDualHybridGradientParams.java.

◆ hasMalitskyPockParameters()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasMalitskyPockParameters ( )

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Returns
Whether the malitskyPockParameters field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4902 of file PrimalDualHybridGradientParams.java.

◆ hasNecessaryReductionForRestart()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasNecessaryReductionForRestart ( )
For ADAPTIVE_HEURISTIC only: A relative reduction in the potential function
by this amount triggers a restart if, additionally, the quality of the
iterates appears to be getting worse. The value must be in the interval
[sufficient_reduction_for_restart, 1). Smaller values make restarts less
frequent, and larger values make them more frequent.

optional double necessary_reduction_for_restart = 17 [default = 0.9];

Returns
Whether the necessaryReductionForRestart field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4658 of file PrimalDualHybridGradientParams.java.

◆ hasNumShards()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasNumShards ( )
For more efficient parallel computation, the matrices and vectors are
divided (virtually) into num_shards shards. Results are computed
independently for each shard and then combined. As a consequence, the order
of computation, and hence floating point roundoff, depends on the number of
shards so reproducible results require using the same value for num_shards.
However, for efficiency num_shards should a be at least num_threads, and
preferably at least 4*num_threads to allow better load balancing. If
num_shards is positive, the computation will use that many shards.
Otherwise a default that depends on num_threads will be used.

optional int32 num_shards = 27 [default = 0];

Returns
Whether the numShards field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3597 of file PrimalDualHybridGradientParams.java.

◆ hasNumThreads()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasNumThreads ( )
The number of threads to use. Must be positive.
Try various values of num_threads, up to the number of physical cores.
Performance may not be monotonically increasing with the number of threads
because of memory bandwidth limitations.

optional int32 num_threads = 2 [default = 1];

Returns
Whether the numThreads field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3524 of file PrimalDualHybridGradientParams.java.

◆ hasPresolveOptions()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasPresolveOptions ( )

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

Returns
Whether the presolveOptions field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4342 of file PrimalDualHybridGradientParams.java.

◆ hasPrimalWeightUpdateSmoothing()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasPrimalWeightUpdateSmoothing ( )
This parameter controls exponential smoothing of log(primal_weight) when a
primal weight update occurs (i.e., when the ratio of primal and dual step
sizes is adjusted). At 0.0, the primal weight will be frozen at its initial
value and there will be no dynamic updates in the algorithm. At 1.0, there
is no smoothing in the updates. The default of 0.5 generally performs well,
but has been observed on occasion to trigger unstable swings in the primal
weight. We recommend also trying 0.0 (disabling primal weight updates), in
which case you must also tune initial_primal_weight.

optional double primal_weight_update_smoothing = 7 [default = 0.5];

Returns
Whether the primalWeightUpdateSmoothing field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4188 of file PrimalDualHybridGradientParams.java.

◆ hasRecordIterationStats()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasRecordIterationStats ( )
If true, the iteration_stats field of the SolveLog output will be populated
at every iteration. Note that we only compute solution statistics at
termination checks. Setting this parameter to true may substantially
increase the size of the output.

optional bool record_iteration_stats = 3;

Returns
Whether the recordIterationStats field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3742 of file PrimalDualHybridGradientParams.java.

◆ hasRestartStrategy()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasRestartStrategy ( )
NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default.
If using a strategy other than ADAPTIVE_HEURISTIC, you must also tune
major_iteration_frequency.

optional .operations_research.pdlp.PrimalDualHybridGradientParams.RestartStrategy restart_strategy = 6 [default = ADAPTIVE_HEURISTIC];

Returns
Whether the restartStrategy field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4116 of file PrimalDualHybridGradientParams.java.

◆ hasSchedulerType()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasSchedulerType ( )
The type of scheduler used for CPU multi-threading. See the documentation
of the corresponding enum for more details.

optional .operations_research.pdlp.SchedulerType scheduler_type = 32 [default = SCHEDULER_TYPE_GOOGLE_THREADPOOL];

Returns
Whether the schedulerType field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3677 of file PrimalDualHybridGradientParams.java.

◆ hasSufficientReductionForRestart()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasSufficientReductionForRestart ( )
For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative
reduction in the potential function by this amount always triggers a
restart. Must be between 0.0 and 1.0.

optional double sufficient_reduction_for_restart = 11 [default = 0.1];

Returns
Whether the sufficientReductionForRestart field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4592 of file PrimalDualHybridGradientParams.java.

◆ hasTerminationCheckFrequency()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasTerminationCheckFrequency ( )
The frequency (based on a counter reset every major iteration) to check for
termination (involves extra work) and log iteration stats. Termination
checks do not affect algorithmic progress unless termination is triggered.

optional int32 termination_check_frequency = 5 [default = 64];

Returns
Whether the terminationCheckFrequency field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 4053 of file PrimalDualHybridGradientParams.java.

◆ hasTerminationCriteria()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasTerminationCriteria ( )

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Returns
Whether the terminationCriteria field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3397 of file PrimalDualHybridGradientParams.java.

◆ hasUseDiagonalQpTrustRegionSolver()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasUseDiagonalQpTrustRegionSolver ( )
When solving QPs with diagonal objective matrices, this option can be
turned on to enable an experimental solver that avoids linearization of the
quadratic term. The `diagonal_qp_solver_accuracy` parameter controls the
solve accuracy.
TODO(user): Turn this option on by default for quadratic
programs after numerical evaluation.

optional bool use_diagonal_qp_trust_region_solver = 23 [default = false];

Returns
Whether the useDiagonalQpTrustRegionSolver field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5378 of file PrimalDualHybridGradientParams.java.

◆ hasUseFeasibilityPolishing()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasUseFeasibilityPolishing ( )
If true, periodically runs feasibility polishing, which attempts to move
from latest average iterate to one that is closer to feasibility (i.e., has
smaller primal and dual residuals) while probably increasing the objective
gap. This is useful primarily when the feasibility tolerances are fairly
tight and the objective gap tolerance is somewhat looser. Note that this
does not change the termination criteria, but rather can help achieve the
termination criteria more quickly when the objective gap is not as
important as feasibility.

`use_feasibility_polishing` cannot be used with glop presolve, and requires
`handle_some_primal_gradients_on_finite_bounds_as_residuals == false`.
`use_feasibility_polishing` can only be used with linear programs.

Feasibility polishing runs two separate phases, primal feasibility and dual
feasibility. The primal feasibility phase runs PDHG on the primal
feasibility problem (obtained by changing the objective vector to all
zeros), using the average primal iterate and zero dual (which is optimal
for the primal feasibility problem) as the initial solution. The dual
feasibility phase runs PDHG on the dual feasibility problem (obtained by
changing all finite variable and constraint bounds to zero), using the
average dual iterate and zero primal (which is optimal for the dual
feasibility problem) as the initial solution. The primal solution from the
primal feasibility phase and dual solution from the dual feasibility phase
are then combined (forming a solution of type
`POINT_TYPE_FEASIBILITY_POLISHING_SOLUTION`) and checked against the
termination criteria.

optional bool use_feasibility_polishing = 30 [default = false];

Returns
Whether the useFeasibilityPolishing field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 5546 of file PrimalDualHybridGradientParams.java.

◆ hasVerbosityLevel()

boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.hasVerbosityLevel ( )
The verbosity of logging.
0: No informational logging. (Errors are logged.)
1: Summary statistics only. No iteration-level details.
2: A table of iteration-level statistics is logged.
(See ToShortString() in primal_dual_hybrid_gradient.cc).
3: A more detailed table of iteration-level statistics is logged.
(See ToString() in primal_dual_hybrid_gradient.cc).
4: For iteration-level details, prints the statistics of both the average
(prefixed with A) and the current iterate (prefixed with C). Also prints
internal algorithmic state and details.
Logging at levels 2-4 also includes messages from level 1.

optional int32 verbosity_level = 26 [default = 0];

Returns
Whether the verbosityLevel field is set.

Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.

Definition at line 3817 of file PrimalDualHybridGradientParams.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.internalGetFieldAccessorTable ( )
protected

Definition at line 2846 of file PrimalDualHybridGradientParams.java.

◆ isInitialized()

final boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.isInitialized ( )

Definition at line 3178 of file PrimalDualHybridGradientParams.java.

◆ mergeAdaptiveLinesearchParameters()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergeAdaptiveLinesearchParameters ( com.google.ortools.pdlp.AdaptiveLinesearchParams value)

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Definition at line 4828 of file PrimalDualHybridGradientParams.java.

◆ mergeFrom() [1/3]

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergeFrom ( com.google.ortools.pdlp.PrimalDualHybridGradientParams other)

Definition at line 3081 of file PrimalDualHybridGradientParams.java.

◆ mergeFrom() [2/3]

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

Definition at line 3183 of file PrimalDualHybridGradientParams.java.

◆ mergeFrom() [3/3]

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

Definition at line 3072 of file PrimalDualHybridGradientParams.java.

◆ mergeMalitskyPockParameters()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergeMalitskyPockParameters ( com.google.ortools.pdlp.MalitskyPockParams value)

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Definition at line 4949 of file PrimalDualHybridGradientParams.java.

◆ mergePresolveOptions()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergePresolveOptions ( com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions value)

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

Definition at line 4389 of file PrimalDualHybridGradientParams.java.

◆ mergeTerminationCriteria()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.mergeTerminationCriteria ( com.google.ortools.pdlp.TerminationCriteria value)

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Definition at line 3444 of file PrimalDualHybridGradientParams.java.

◆ setAdaptiveLinesearchParameters() [1/2]

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setAdaptiveLinesearchParameters ( com.google.ortools.pdlp.AdaptiveLinesearchParams value)

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Definition at line 4798 of file PrimalDualHybridGradientParams.java.

◆ setAdaptiveLinesearchParameters() [2/2]

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setAdaptiveLinesearchParameters ( com.google.ortools.pdlp.AdaptiveLinesearchParams.Builder builderForValue)

optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;

Definition at line 4814 of file PrimalDualHybridGradientParams.java.

◆ setDiagonalQpTrustRegionSolverTolerance()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setDiagonalQpTrustRegionSolverTolerance ( double value)
The solve tolerance of the experimental trust region solver for diagonal
QPs, controlling the accuracy of binary search over a one-dimensional
scaling parameter. Smaller values imply smaller relative error of the final
solution vector.
TODO(user): Find an expression for the final relative error.

optional double diagonal_qp_trust_region_solver_tolerance = 24 [default = 1e-08];

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

Definition at line 5485 of file PrimalDualHybridGradientParams.java.

◆ setHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setHandleSomePrimalGradientsOnFiniteBoundsAsResiduals ( boolean value)
See
https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite
for a description of this flag.

optional bool handle_some_primal_gradients_on_finite_bounds_as_residuals = 29 [default = true];

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

Definition at line 5339 of file PrimalDualHybridGradientParams.java.

◆ setInfiniteConstraintBoundThreshold()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setInfiniteConstraintBoundThreshold ( double value)
Constraint bounds with absolute value at least this threshold are replaced
with infinities.
NOTE: This primarily affects the relative convergence criteria. A smaller
value makes the relative convergence criteria stronger. It also affects the
problem statistics LOG()ed at the start of the run, and the default initial
primal weight, since that is based on the norm of the bounds.

optional double infinite_constraint_bound_threshold = 22 [default = inf];

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

Definition at line 5272 of file PrimalDualHybridGradientParams.java.

◆ setInitialPrimalWeight()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setInitialPrimalWeight ( double value)
The initial value of the primal weight (i.e., the ratio of primal and dual
step sizes). The primal weight remains fixed throughout the solve if
primal_weight_update_smoothing = 0.0. If unset, the default is the ratio of
the norm of the objective vector to the L2 norm of the combined constraint
bounds vector (as defined above). If this ratio is not finite and positive,
then the default is 1.0 instead. For tuning, try powers of 10, for example,
from 10^{-6} to 10^6.

optional double initial_primal_weight = 8;

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

Definition at line 4307 of file PrimalDualHybridGradientParams.java.

◆ setInitialStepSizeScaling()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setInitialStepSizeScaling ( double value)
Scaling factor applied to the initial step size (all step sizes if
linesearch_rule == CONSTANT_STEP_SIZE_RULE).

optional double initial_step_size_scaling = 25 [default = 1];

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

Definition at line 5053 of file PrimalDualHybridGradientParams.java.

◆ setL2NormRescaling()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setL2NormRescaling ( boolean value)
If true, applies L_2 norm rescaling after the Ruiz rescaling. Heuristically
this has been found to help convergence.

optional bool l2_norm_rescaling = 10 [default = true];

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

Definition at line 4557 of file PrimalDualHybridGradientParams.java.

◆ setLinesearchRule()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setLinesearchRule ( com.google.ortools.pdlp.PrimalDualHybridGradientParams.LinesearchRule value)
Linesearch rule applied at each major iteration.

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

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

Definition at line 4750 of file PrimalDualHybridGradientParams.java.

◆ setLInfRuizIterations()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setLInfRuizIterations ( int value)
Number of L_infinity Ruiz rescaling iterations to apply to the constraint
matrix. Zero disables this rescaling pass. Recommended values to try when
tuning are 0, 5, and 10.

optional int32 l_inf_ruiz_iterations = 9 [default = 5];

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

Definition at line 4496 of file PrimalDualHybridGradientParams.java.

◆ setLogIntervalSeconds()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setLogIntervalSeconds ( double value)
Time between iteration-level statistics logging (if `verbosity_level > 1`).
Since iteration-level statistics are only generated when performing
termination checks, logs will be generated from next termination check
after `log_interval_seconds` have elapsed. Should be >= 0.0. 0.0 (the
default) means log statistics at every termination check.

optional double log_interval_seconds = 31 [default = 0];

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

Definition at line 3939 of file PrimalDualHybridGradientParams.java.

◆ setMajorIterationFrequency()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setMajorIterationFrequency ( int value)
The frequency at which extra work is performed to make major algorithmic
decisions, e.g., performing restarts and updating the primal weight. Major
iterations also trigger a termination check. For best performance using the
NO_RESTARTS or EVERY_MAJOR_ITERATION rule, one should perform a log-scale
grid search over this parameter, for example, over powers of two.
ADAPTIVE_HEURISTIC is mostly insensitive to this value.

optional int32 major_iteration_frequency = 4 [default = 64];

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

Definition at line 4014 of file PrimalDualHybridGradientParams.java.

◆ setMalitskyPockParameters() [1/2]

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setMalitskyPockParameters ( com.google.ortools.pdlp.MalitskyPockParams value)

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Definition at line 4919 of file PrimalDualHybridGradientParams.java.

◆ setMalitskyPockParameters() [2/2]

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setMalitskyPockParameters ( com.google.ortools.pdlp.MalitskyPockParams.Builder builderForValue)

optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;

Definition at line 4935 of file PrimalDualHybridGradientParams.java.

◆ setNecessaryReductionForRestart()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setNecessaryReductionForRestart ( double value)
For ADAPTIVE_HEURISTIC only: A relative reduction in the potential function
by this amount triggers a restart if, additionally, the quality of the
iterates appears to be getting worse. The value must be in the interval
[sufficient_reduction_for_restart, 1). Smaller values make restarts less
frequent, and larger values make them more frequent.

optional double necessary_reduction_for_restart = 17 [default = 0.9];

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

Definition at line 4690 of file PrimalDualHybridGradientParams.java.

◆ setNumShards()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setNumShards ( int value)
For more efficient parallel computation, the matrices and vectors are
divided (virtually) into num_shards shards. Results are computed
independently for each shard and then combined. As a consequence, the order
of computation, and hence floating point roundoff, depends on the number of
shards so reproducible results require using the same value for num_shards.
However, for efficiency num_shards should a be at least num_threads, and
preferably at least 4*num_threads to allow better load balancing. If
num_shards is positive, the computation will use that many shards.
Otherwise a default that depends on num_threads will be used.

optional int32 num_shards = 27 [default = 0];

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

Definition at line 3637 of file PrimalDualHybridGradientParams.java.

◆ setNumThreads()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setNumThreads ( int value)
The number of threads to use. Must be positive.
Try various values of num_threads, up to the number of physical cores.
Performance may not be monotonically increasing with the number of threads
because of memory bandwidth limitations.

optional int32 num_threads = 2 [default = 1];

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

Definition at line 3554 of file PrimalDualHybridGradientParams.java.

◆ setPresolveOptions() [1/2]

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setPresolveOptions ( com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions value)

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

Definition at line 4359 of file PrimalDualHybridGradientParams.java.

◆ setPresolveOptions() [2/2]

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setPresolveOptions ( com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions.Builder builderForValue)

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

Definition at line 4375 of file PrimalDualHybridGradientParams.java.

◆ setPrimalWeightUpdateSmoothing()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setPrimalWeightUpdateSmoothing ( double value)
This parameter controls exponential smoothing of log(primal_weight) when a
primal weight update occurs (i.e., when the ratio of primal and dual step
sizes is adjusted). At 0.0, the primal weight will be frozen at its initial
value and there will be no dynamic updates in the algorithm. At 1.0, there
is no smoothing in the updates. The default of 0.5 generally performs well,
but has been observed on occasion to trigger unstable swings in the primal
weight. We recommend also trying 0.0 (disabling primal weight updates), in
which case you must also tune initial_primal_weight.

optional double primal_weight_update_smoothing = 7 [default = 0.5];

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

Definition at line 4226 of file PrimalDualHybridGradientParams.java.

◆ setRandomProjectionSeeds()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setRandomProjectionSeeds ( int index,
int value )
Seeds for generating (pseudo-)random projections of iterates during
termination checks. For each seed, the projection of the primal and dual
solutions onto random planes in primal and dual space will be computed and
added the IterationStats if record_iteration_stats is true. The random
planes generated will be determined by the seeds, the primal and dual
dimensions, and num_threads.

repeated int32 random_projection_seeds = 28 [packed = true];

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

Definition at line 5149 of file PrimalDualHybridGradientParams.java.

◆ setRecordIterationStats()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setRecordIterationStats ( boolean value)
If true, the iteration_stats field of the SolveLog output will be populated
at every iteration. Note that we only compute solution statistics at
termination checks. Setting this parameter to true may substantially
increase the size of the output.

optional bool record_iteration_stats = 3;

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

Definition at line 3772 of file PrimalDualHybridGradientParams.java.

◆ setRestartStrategy()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setRestartStrategy ( com.google.ortools.pdlp.PrimalDualHybridGradientParams.RestartStrategy value)
NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default.
If using a strategy other than ADAPTIVE_HEURISTIC, you must also tune
major_iteration_frequency.

optional .operations_research.pdlp.PrimalDualHybridGradientParams.RestartStrategy restart_strategy = 6 [default = ADAPTIVE_HEURISTIC];

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

Definition at line 4145 of file PrimalDualHybridGradientParams.java.

◆ setSchedulerType()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setSchedulerType ( com.google.ortools.pdlp.SchedulerType value)
The type of scheduler used for CPU multi-threading. See the documentation
of the corresponding enum for more details.

optional .operations_research.pdlp.SchedulerType scheduler_type = 32 [default = SCHEDULER_TYPE_GOOGLE_THREADPOOL];

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

Definition at line 3704 of file PrimalDualHybridGradientParams.java.

◆ setSufficientReductionForRestart()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setSufficientReductionForRestart ( double value)
For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative
reduction in the potential function by this amount always triggers a
restart. Must be between 0.0 and 1.0.

optional double sufficient_reduction_for_restart = 11 [default = 0.1];

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

Definition at line 4620 of file PrimalDualHybridGradientParams.java.

◆ setTerminationCheckFrequency()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setTerminationCheckFrequency ( int value)
The frequency (based on a counter reset every major iteration) to check for
termination (involves extra work) and log iteration stats. Termination
checks do not affect algorithmic progress unless termination is triggered.

optional int32 termination_check_frequency = 5 [default = 64];

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

Definition at line 4081 of file PrimalDualHybridGradientParams.java.

◆ setTerminationCriteria() [1/2]

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setTerminationCriteria ( com.google.ortools.pdlp.TerminationCriteria value)

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Definition at line 3414 of file PrimalDualHybridGradientParams.java.

◆ setTerminationCriteria() [2/2]

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setTerminationCriteria ( com.google.ortools.pdlp.TerminationCriteria.Builder builderForValue)

optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;

Definition at line 3430 of file PrimalDualHybridGradientParams.java.

◆ setUseDiagonalQpTrustRegionSolver()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setUseDiagonalQpTrustRegionSolver ( boolean value)
When solving QPs with diagonal objective matrices, this option can be
turned on to enable an experimental solver that avoids linearization of the
quadratic term. The `diagonal_qp_solver_accuracy` parameter controls the
solve accuracy.
TODO(user): Turn this option on by default for quadratic
programs after numerical evaluation.

optional bool use_diagonal_qp_trust_region_solver = 23 [default = false];

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

Definition at line 5412 of file PrimalDualHybridGradientParams.java.

◆ setUseFeasibilityPolishing()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setUseFeasibilityPolishing ( boolean value)
If true, periodically runs feasibility polishing, which attempts to move
from latest average iterate to one that is closer to feasibility (i.e., has
smaller primal and dual residuals) while probably increasing the objective
gap. This is useful primarily when the feasibility tolerances are fairly
tight and the objective gap tolerance is somewhat looser. Note that this
does not change the termination criteria, but rather can help achieve the
termination criteria more quickly when the objective gap is not as
important as feasibility.

`use_feasibility_polishing` cannot be used with glop presolve, and requires
`handle_some_primal_gradients_on_finite_bounds_as_residuals == false`.
`use_feasibility_polishing` can only be used with linear programs.

Feasibility polishing runs two separate phases, primal feasibility and dual
feasibility. The primal feasibility phase runs PDHG on the primal
feasibility problem (obtained by changing the objective vector to all
zeros), using the average primal iterate and zero dual (which is optimal
for the primal feasibility problem) as the initial solution. The dual
feasibility phase runs PDHG on the dual feasibility problem (obtained by
changing all finite variable and constraint bounds to zero), using the
average dual iterate and zero primal (which is optimal for the dual
feasibility problem) as the initial solution. The primal solution from the
primal feasibility phase and dual solution from the dual feasibility phase
are then combined (forming a solution of type
`POINT_TYPE_FEASIBILITY_POLISHING_SOLUTION`) and checked against the
termination criteria.

optional bool use_feasibility_polishing = 30 [default = false];

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

Definition at line 5620 of file PrimalDualHybridGradientParams.java.

◆ setVerbosityLevel()

Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder.setVerbosityLevel ( int value)
The verbosity of logging.
0: No informational logging. (Errors are logged.)
1: Summary statistics only. No iteration-level details.
2: A table of iteration-level statistics is logged.
(See ToShortString() in primal_dual_hybrid_gradient.cc).
3: A more detailed table of iteration-level statistics is logged.
(See ToString() in primal_dual_hybrid_gradient.cc).
4: For iteration-level details, prints the statistics of both the average
(prefixed with A) and the current iterate (prefixed with C). Also prints
internal algorithmic state and details.
Logging at levels 2-4 also includes messages from level 1.

optional int32 verbosity_level = 26 [default = 0];

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

Definition at line 3861 of file PrimalDualHybridGradientParams.java.


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