![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
Classes | |
class | Builder |
enum | LinesearchRule |
class | PresolveOptions |
interface | PresolveOptionsOrBuilder |
enum | RestartStrategy |
Static Public Member Functions | |
static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseFrom (java.io.InputStream input) throws java.io.IOException |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException |
static Builder | newBuilder () |
static Builder | newBuilder (com.google.ortools.pdlp.PrimalDualHybridGradientParams prototype) |
static com.google.ortools.pdlp.PrimalDualHybridGradientParams | getDefaultInstance () |
static com.google.protobuf.Parser< PrimalDualHybridGradientParams > | parser () |
Protected Member Functions | |
com.google.protobuf.GeneratedMessage.FieldAccessorTable | internalGetFieldAccessorTable () |
Builder | newBuilderForType (com.google.protobuf.GeneratedMessage.BuilderParent parent) |
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 24 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.equals | ( | final java.lang.Object | obj | ) |
Definition at line 2444 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.AdaptiveLinesearchParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.getAdaptiveLinesearchParameters | ( | ) |
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1871 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.AdaptiveLinesearchParamsOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.getAdaptiveLinesearchParametersOrBuilder | ( | ) |
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1878 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 5676 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.getDefaultInstanceForType | ( | ) |
Definition at line 5712 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 62 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.getDiagonalQpTrustRegionSolverTolerance | ( | ) |
The solve tolerance of the experimental trust region solver for diagonal QPs, controlling the accuracy of binary search over a one-dimensional scaling parameter. Smaller values imply smaller relative error of the final solution vector. TODO(user): Find an expression for the final relative error.
optional double diagonal_qp_trust_region_solver_tolerance = 24 [default = 1e-08];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 2130 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.getHandleSomePrimalGradientsOnFiniteBoundsAsResiduals | ( | ) |
See https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.
optional bool handle_some_primal_gradients_on_finite_bounds_as_residuals = 29 [default = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 2058 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.getInfiniteConstraintBoundThreshold | ( | ) |
Constraint bounds with absolute value at least this threshold are replaced with infinities. NOTE: This primarily affects the relative convergence criteria. A smaller value makes the relative convergence criteria stronger. It also affects the problem statistics LOG()ed at the start of the run, and the default initial primal weight, since that is based on the norm of the bounds.
optional double infinite_constraint_bound_threshold = 22 [default = inf];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 2027 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.getInitialPrimalWeight | ( | ) |
The initial value of the primal weight (i.e., the ratio of primal and dual step sizes). The primal weight remains fixed throughout the solve if primal_weight_update_smoothing = 0.0. If unset, the default is the ratio of the norm of the objective vector to the L2 norm of the combined constraint bounds vector (as defined above). If this ratio is not finite and positive, then the default is 1.0 instead. For tuning, try powers of 10, for example, from 10^{-6} to 10^6.
optional double initial_primal_weight = 8;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1674 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.getInitialStepSizeScaling | ( | ) |
Scaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).
optional double initial_step_size_scaling = 25 [default = 1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1933 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.getL2NormRescaling | ( | ) |
If true, applies L_2 norm rescaling after the Ruiz rescaling. Heuristically this has been found to help convergence.
optional bool l2_norm_rescaling = 10 [default = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1760 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams.LinesearchRule com.google.ortools.pdlp.PrimalDualHybridGradientParams.getLinesearchRule | ( | ) |
Linesearch rule applied at each major iteration.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1851 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.getLInfRuizIterations | ( | ) |
Number of L_infinity Ruiz rescaling iterations to apply to the constraint matrix. Zero disables this rescaling pass. Recommended values to try when tuning are 0, 5, and 10.
optional int32 l_inf_ruiz_iterations = 9 [default = 5];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1731 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.getLogIntervalSeconds | ( | ) |
Time between iteration-level statistics logging (if `verbosity_level > 1`). Since iteration-level statistics are only generated when performing termination checks, logs will be generated from next termination check after `log_interval_seconds` have elapsed. Should be >= 0.0. 0.0 (the default) means log statistics at every termination check.
optional double log_interval_seconds = 31 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1496 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.getMajorIterationFrequency | ( | ) |
The frequency at which extra work is performed to make major algorithmic decisions, e.g., performing restarts and updating the primal weight. Major iterations also trigger a termination check. For best performance using the NO_RESTARTS or EVERY_MAJOR_ITERATION rule, one should perform a log-scale grid search over this parameter, for example, over powers of two. ADAPTIVE_HEURISTIC is mostly insensitive to this value.
optional int32 major_iteration_frequency = 4 [default = 64];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1533 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.MalitskyPockParams com.google.ortools.pdlp.PrimalDualHybridGradientParams.getMalitskyPockParameters | ( | ) |
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1897 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.MalitskyPockParamsOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.getMalitskyPockParametersOrBuilder | ( | ) |
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1904 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.getNecessaryReductionForRestart | ( | ) |
For ADAPTIVE_HEURISTIC only: A relative reduction in the potential function by this amount triggers a restart if, additionally, the quality of the iterates appears to be getting worse. The value must be in the interval [sufficient_reduction_for_restart, 1). Smaller values make restarts less frequent, and larger values make them more frequent.
optional double necessary_reduction_for_restart = 17 [default = 0.9];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1826 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.getNumShards | ( | ) |
For more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards. Results are computed independently for each shard and then combined. As a consequence, the order of computation, and hence floating point roundoff, depends on the number of shards so reproducible results require using the same value for num_shards. However, for efficiency num_shards should a be at least num_threads, and preferably at least 4*num_threads to allow better load balancing. If num_shards is positive, the computation will use that many shards. Otherwise a default that depends on num_threads will be used.
optional int32 num_shards = 27 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1353 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.getNumThreads | ( | ) |
The number of threads to use. Must be positive. Try various values of num_threads, up to the number of physical cores. Performance may not be monotonically increasing with the number of threads because of memory bandwidth limitations.
optional int32 num_threads = 2 [default = 1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1310 of file PrimalDualHybridGradientParams.java.
com.google.protobuf.Parser< PrimalDualHybridGradientParams > com.google.ortools.pdlp.PrimalDualHybridGradientParams.getParserForType | ( | ) |
Definition at line 5707 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptions com.google.ortools.pdlp.PrimalDualHybridGradientParams.getPresolveOptions | ( | ) |
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1693 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams.PresolveOptionsOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.getPresolveOptionsOrBuilder | ( | ) |
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1700 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.getPrimalWeightUpdateSmoothing | ( | ) |
This parameter controls exponential smoothing of log(primal_weight) when a primal weight update occurs (i.e., when the ratio of primal and dual step sizes is adjusted). At 0.0, the primal weight will be frozen at its initial value and there will be no dynamic updates in the algorithm. At 1.0, there is no smoothing in the updates. The default of 0.5 generally performs well, but has been observed on occasion to trigger unstable swings in the primal weight. We recommend also trying 0.0 (disabling primal weight updates), in which case you must also tune initial_primal_weight.
optional double primal_weight_update_smoothing = 7 [default = 0.5];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1635 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.getRandomProjectionSeeds | ( | int | index | ) |
Seeds for generating (pseudo-)random projections of iterates during termination checks. For each seed, the projection of the primal and dual solutions onto random planes in primal and dual space will be computed and added the IterationStats if record_iteration_stats is true. The random planes generated will be determined by the seeds, the primal and dual dimensions, and num_threads.
repeated int32 random_projection_seeds = 28 [packed = true];
index | The index of the element to return. |
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1989 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.getRandomProjectionSeedsCount | ( | ) |
Seeds for generating (pseudo-)random projections of iterates during termination checks. For each seed, the projection of the primal and dual solutions onto random planes in primal and dual space will be computed and added the IterationStats if record_iteration_stats is true. The random planes generated will be determined by the seeds, the primal and dual dimensions, and num_threads.
repeated int32 random_projection_seeds = 28 [packed = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1972 of file PrimalDualHybridGradientParams.java.
java.util.List< java.lang.Integer > com.google.ortools.pdlp.PrimalDualHybridGradientParams.getRandomProjectionSeedsList | ( | ) |
Seeds for generating (pseudo-)random projections of iterates during termination checks. For each seed, the projection of the primal and dual solutions onto random planes in primal and dual space will be computed and added the IterationStats if record_iteration_stats is true. The random planes generated will be determined by the seeds, the primal and dual dimensions, and num_threads.
repeated int32 random_projection_seeds = 28 [packed = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1956 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.getRecordIterationStats | ( | ) |
If true, the iteration_stats field of the SolveLog output will be populated at every iteration. Note that we only compute solution statistics at termination checks. Setting this parameter to true may substantially increase the size of the output.
optional bool record_iteration_stats = 3;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1414 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.PrimalDualHybridGradientParams.RestartStrategy com.google.ortools.pdlp.PrimalDualHybridGradientParams.getRestartStrategy | ( | ) |
NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default. If using a strategy other than ADAPTIVE_HEURISTIC, you must also tune major_iteration_frequency.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.RestartStrategy restart_strategy = 6 [default = ADAPTIVE_HEURISTIC];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1593 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.SchedulerType com.google.ortools.pdlp.PrimalDualHybridGradientParams.getSchedulerType | ( | ) |
The type of scheduler used for CPU multi-threading. See the documentation of the corresponding enum for more details.
optional .operations_research.pdlp.SchedulerType scheduler_type = 32 [default = SCHEDULER_TYPE_GOOGLE_THREADPOOL];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1380 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.getSerializedSize | ( | ) |
Definition at line 2315 of file PrimalDualHybridGradientParams.java.
double com.google.ortools.pdlp.PrimalDualHybridGradientParams.getSufficientReductionForRestart | ( | ) |
For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative reduction in the potential function by this amount always triggers a restart. Must be between 0.0 and 1.0.
optional double sufficient_reduction_for_restart = 11 [default = 0.1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1791 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.getTerminationCheckFrequency | ( | ) |
The frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats. Termination checks do not affect algorithmic progress unless termination is triggered.
optional int32 termination_check_frequency = 5 [default = 64];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1564 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.TerminationCriteria com.google.ortools.pdlp.PrimalDualHybridGradientParams.getTerminationCriteria | ( | ) |
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1270 of file PrimalDualHybridGradientParams.java.
com.google.ortools.pdlp.TerminationCriteriaOrBuilder com.google.ortools.pdlp.PrimalDualHybridGradientParams.getTerminationCriteriaOrBuilder | ( | ) |
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1277 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.getUseDiagonalQpTrustRegionSolver | ( | ) |
When solving QPs with diagonal objective matrices, this option can be turned on to enable an experimental solver that avoids linearization of the quadratic term. The `diagonal_qp_solver_accuracy` parameter controls the solve accuracy. TODO(user): Turn this option on by default for quadratic programs after numerical evaluation.
optional bool use_diagonal_qp_trust_region_solver = 23 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 2095 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.getUseFeasibilityPolishing | ( | ) |
If true, periodically runs feasibility polishing, which attempts to move from latest average iterate to one that is closer to feasibility (i.e., has smaller primal and dual residuals) while probably increasing the objective gap. This is useful primarily when the feasibility tolerances are fairly tight and the objective gap tolerance is somewhat looser. Note that this does not change the termination criteria, but rather can help achieve the termination criteria more quickly when the objective gap is not as important as feasibility. `use_feasibility_polishing` cannot be used with glop presolve, and requires `handle_some_primal_gradients_on_finite_bounds_as_residuals == false`. `use_feasibility_polishing` can only be used with linear programs. Feasibility polishing runs two separate phases, primal feasibility and dual feasibility. The primal feasibility phase runs PDHG on the primal feasibility problem (obtained by changing the objective vector to all zeros), using the average primal iterate and zero dual (which is optimal for the primal feasibility problem) as the initial solution. The dual feasibility phase runs PDHG on the dual feasibility problem (obtained by changing all finite variable and constraint bounds to zero), using the average dual iterate and zero primal (which is optimal for the dual feasibility problem) as the initial solution. The primal solution from the primal feasibility phase and dual solution from the dual feasibility phase are then combined (forming a solution of type `POINT_TYPE_FEASIBILITY_POLISHING_SOLUTION`) and checked against the termination criteria.
optional bool use_feasibility_polishing = 30 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 2207 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.getVerbosityLevel | ( | ) |
The verbosity of logging. 0: No informational logging. (Errors are logged.) 1: Summary statistics only. No iteration-level details. 2: A table of iteration-level statistics is logged. (See ToShortString() in primal_dual_hybrid_gradient.cc). 3: A more detailed table of iteration-level statistics is logged. (See ToString() in primal_dual_hybrid_gradient.cc). 4: For iteration-level details, prints the statistics of both the average (prefixed with A) and the current iterate (prefixed with C). Also prints internal algorithmic state and details. Logging at levels 2-4 also includes messages from level 1.
optional int32 verbosity_level = 26 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1461 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasAdaptiveLinesearchParameters | ( | ) |
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1863 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasDiagonalQpTrustRegionSolverTolerance | ( | ) |
The solve tolerance of the experimental trust region solver for diagonal QPs, controlling the accuracy of binary search over a one-dimensional scaling parameter. Smaller values imply smaller relative error of the final solution vector. TODO(user): Find an expression for the final relative error.
optional double diagonal_qp_trust_region_solver_tolerance = 24 [default = 1e-08];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 2114 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasHandleSomePrimalGradientsOnFiniteBoundsAsResiduals | ( | ) |
See https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.
optional bool handle_some_primal_gradients_on_finite_bounds_as_residuals = 29 [default = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 2044 of file PrimalDualHybridGradientParams.java.
int com.google.ortools.pdlp.PrimalDualHybridGradientParams.hashCode | ( | ) |
Definition at line 2595 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasInfiniteConstraintBoundThreshold | ( | ) |
Constraint bounds with absolute value at least this threshold are replaced with infinities. NOTE: This primarily affects the relative convergence criteria. A smaller value makes the relative convergence criteria stronger. It also affects the problem statistics LOG()ed at the start of the run, and the default initial primal weight, since that is based on the norm of the bounds.
optional double infinite_constraint_bound_threshold = 22 [default = inf];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 2010 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasInitialPrimalWeight | ( | ) |
The initial value of the primal weight (i.e., the ratio of primal and dual step sizes). The primal weight remains fixed throughout the solve if primal_weight_update_smoothing = 0.0. If unset, the default is the ratio of the norm of the objective vector to the L2 norm of the combined constraint bounds vector (as defined above). If this ratio is not finite and positive, then the default is 1.0 instead. For tuning, try powers of 10, for example, from 10^{-6} to 10^6.
optional double initial_primal_weight = 8;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1656 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasInitialStepSizeScaling | ( | ) |
Scaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).
optional double initial_step_size_scaling = 25 [default = 1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1920 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasL2NormRescaling | ( | ) |
If true, applies L_2 norm rescaling after the Ruiz rescaling. Heuristically this has been found to help convergence.
optional bool l2_norm_rescaling = 10 [default = true];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1747 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasLinesearchRule | ( | ) |
Linesearch rule applied at each major iteration.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1840 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasLInfRuizIterations | ( | ) |
Number of L_infinity Ruiz rescaling iterations to apply to the constraint matrix. Zero disables this rescaling pass. Recommended values to try when tuning are 0, 5, and 10.
optional int32 l_inf_ruiz_iterations = 9 [default = 5];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1717 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasLogIntervalSeconds | ( | ) |
Time between iteration-level statistics logging (if `verbosity_level > 1`). Since iteration-level statistics are only generated when performing termination checks, logs will be generated from next termination check after `log_interval_seconds` have elapsed. Should be >= 0.0. 0.0 (the default) means log statistics at every termination check.
optional double log_interval_seconds = 31 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1480 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasMajorIterationFrequency | ( | ) |
The frequency at which extra work is performed to make major algorithmic decisions, e.g., performing restarts and updating the primal weight. Major iterations also trigger a termination check. For best performance using the NO_RESTARTS or EVERY_MAJOR_ITERATION rule, one should perform a log-scale grid search over this parameter, for example, over powers of two. ADAPTIVE_HEURISTIC is mostly insensitive to this value.
optional int32 major_iteration_frequency = 4 [default = 64];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1516 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasMalitskyPockParameters | ( | ) |
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1889 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasNecessaryReductionForRestart | ( | ) |
For ADAPTIVE_HEURISTIC only: A relative reduction in the potential function by this amount triggers a restart if, additionally, the quality of the iterates appears to be getting worse. The value must be in the interval [sufficient_reduction_for_restart, 1). Smaller values make restarts less frequent, and larger values make them more frequent.
optional double necessary_reduction_for_restart = 17 [default = 0.9];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1810 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasNumShards | ( | ) |
For more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards. Results are computed independently for each shard and then combined. As a consequence, the order of computation, and hence floating point roundoff, depends on the number of shards so reproducible results require using the same value for num_shards. However, for efficiency num_shards should a be at least num_threads, and preferably at least 4*num_threads to allow better load balancing. If num_shards is positive, the computation will use that many shards. Otherwise a default that depends on num_threads will be used.
optional int32 num_shards = 27 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1333 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasNumThreads | ( | ) |
The number of threads to use. Must be positive. Try various values of num_threads, up to the number of physical cores. Performance may not be monotonically increasing with the number of threads because of memory bandwidth limitations.
optional int32 num_threads = 2 [default = 1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1295 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasPresolveOptions | ( | ) |
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1685 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasPrimalWeightUpdateSmoothing | ( | ) |
This parameter controls exponential smoothing of log(primal_weight) when a primal weight update occurs (i.e., when the ratio of primal and dual step sizes is adjusted). At 0.0, the primal weight will be frozen at its initial value and there will be no dynamic updates in the algorithm. At 1.0, there is no smoothing in the updates. The default of 0.5 generally performs well, but has been observed on occasion to trigger unstable swings in the primal weight. We recommend also trying 0.0 (disabling primal weight updates), in which case you must also tune initial_primal_weight.
optional double primal_weight_update_smoothing = 7 [default = 0.5];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1616 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasRecordIterationStats | ( | ) |
If true, the iteration_stats field of the SolveLog output will be populated at every iteration. Note that we only compute solution statistics at termination checks. Setting this parameter to true may substantially increase the size of the output.
optional bool record_iteration_stats = 3;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1399 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasRestartStrategy | ( | ) |
NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default. If using a strategy other than ADAPTIVE_HEURISTIC, you must also tune major_iteration_frequency.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.RestartStrategy restart_strategy = 6 [default = ADAPTIVE_HEURISTIC];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1580 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasSchedulerType | ( | ) |
The type of scheduler used for CPU multi-threading. See the documentation of the corresponding enum for more details.
optional .operations_research.pdlp.SchedulerType scheduler_type = 32 [default = SCHEDULER_TYPE_GOOGLE_THREADPOOL];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1368 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasSufficientReductionForRestart | ( | ) |
For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative reduction in the potential function by this amount always triggers a restart. Must be between 0.0 and 1.0.
optional double sufficient_reduction_for_restart = 11 [default = 0.1];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1777 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasTerminationCheckFrequency | ( | ) |
The frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats. Termination checks do not affect algorithmic progress unless termination is triggered.
optional int32 termination_check_frequency = 5 [default = 64];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1550 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasTerminationCriteria | ( | ) |
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1262 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasUseDiagonalQpTrustRegionSolver | ( | ) |
When solving QPs with diagonal objective matrices, this option can be turned on to enable an experimental solver that avoids linearization of the quadratic term. The `diagonal_qp_solver_accuracy` parameter controls the solve accuracy. TODO(user): Turn this option on by default for quadratic programs after numerical evaluation.
optional bool use_diagonal_qp_trust_region_solver = 23 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 2078 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasUseFeasibilityPolishing | ( | ) |
If true, periodically runs feasibility polishing, which attempts to move from latest average iterate to one that is closer to feasibility (i.e., has smaller primal and dual residuals) while probably increasing the objective gap. This is useful primarily when the feasibility tolerances are fairly tight and the objective gap tolerance is somewhat looser. Note that this does not change the termination criteria, but rather can help achieve the termination criteria more quickly when the objective gap is not as important as feasibility. `use_feasibility_polishing` cannot be used with glop presolve, and requires `handle_some_primal_gradients_on_finite_bounds_as_residuals == false`. `use_feasibility_polishing` can only be used with linear programs. Feasibility polishing runs two separate phases, primal feasibility and dual feasibility. The primal feasibility phase runs PDHG on the primal feasibility problem (obtained by changing the objective vector to all zeros), using the average primal iterate and zero dual (which is optimal for the primal feasibility problem) as the initial solution. The dual feasibility phase runs PDHG on the dual feasibility problem (obtained by changing all finite variable and constraint bounds to zero), using the average dual iterate and zero primal (which is optimal for the dual feasibility problem) as the initial solution. The primal solution from the primal feasibility phase and dual solution from the dual feasibility phase are then combined (forming a solution of type `POINT_TYPE_FEASIBILITY_POLISHING_SOLUTION`) and checked against the termination criteria.
optional bool use_feasibility_polishing = 30 [default = false];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 2170 of file PrimalDualHybridGradientParams.java.
boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.hasVerbosityLevel | ( | ) |
The verbosity of logging. 0: No informational logging. (Errors are logged.) 1: Summary statistics only. No iteration-level details. 2: A table of iteration-level statistics is logged. (See ToShortString() in primal_dual_hybrid_gradient.cc). 3: A more detailed table of iteration-level statistics is logged. (See ToString() in primal_dual_hybrid_gradient.cc). 4: For iteration-level details, prints the statistics of both the average (prefixed with A) and the current iterate (prefixed with C). Also prints internal algorithmic state and details. Logging at levels 2-4 also includes messages from level 1.
optional int32 verbosity_level = 26 [default = 0];
Implements com.google.ortools.pdlp.PrimalDualHybridGradientParamsOrBuilder.
Definition at line 1439 of file PrimalDualHybridGradientParams.java.
|
protected |
Definition at line 68 of file PrimalDualHybridGradientParams.java.
final boolean com.google.ortools.pdlp.PrimalDualHybridGradientParams.isInitialized | ( | ) |
Definition at line 2213 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2801 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2804 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.newBuilderForType | ( | ) |
Definition at line 2800 of file PrimalDualHybridGradientParams.java.
|
protected |
Definition at line 2814 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2772 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2778 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2749 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2753 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2738 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2743 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2785 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2791 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2759 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2764 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2727 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2732 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 5702 of file PrimalDualHybridGradientParams.java.
Builder com.google.ortools.pdlp.PrimalDualHybridGradientParams.toBuilder | ( | ) |
Definition at line 2808 of file PrimalDualHybridGradientParams.java.
void com.google.ortools.pdlp.PrimalDualHybridGradientParams.writeTo | ( | com.google.protobuf.CodedOutputStream | output | ) | throws java.io.IOException |
Definition at line 2223 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1856 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2099 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2031 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1994 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1639 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1908 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1735 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1704 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1830 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1465 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1500 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1882 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1795 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1314 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1281 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1678 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1598 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1937 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1385 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1568 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1357 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1764 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1537 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1255 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2062 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 2134 of file PrimalDualHybridGradientParams.java.
|
static |
Definition at line 1418 of file PrimalDualHybridGradientParams.java.