Class PrimalDualHybridGradientParams.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<PrimalDualHybridGradientParams.Builder>
com.google.protobuf.GeneratedMessage.Builder<PrimalDualHybridGradientParams.Builder>
com.google.ortools.pdlp.PrimalDualHybridGradientParams.Builder
- All Implemented Interfaces:
PrimalDualHybridGradientParamsOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
PrimalDualHybridGradientParams
public static final class PrimalDualHybridGradientParams.Builder
extends com.google.protobuf.GeneratedMessage.Builder<PrimalDualHybridGradientParams.Builder>
implements PrimalDualHybridGradientParamsOrBuilder
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-
Method Summary
Modifier and TypeMethodDescriptionaddAllRandomProjectionSeeds(Iterable<? extends Integer> values) Seeds for generating (pseudo-)random projections of iterates during termination checks.addRandomProjectionSeeds(int value) Seeds for generating (pseudo-)random projections of iterates during termination checks.build()clear()optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;If true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached.If true, feasibility polishing will be applied after the solver is interrupted.The solve tolerance of the experimental trust region solver for diagonal QPs, controlling the accuracy of binary search over a one-dimensional scaling parameter.See https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.Constraint bounds with absolute value at least this threshold are replaced with infinities.The initial value of the primal weight (i.e., the ratio of primal and dual step sizes).Scaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).If true, applies L_2 norm rescaling after the Ruiz rescaling.Linesearch rule applied at each major iteration.Number of L_infinity Ruiz rescaling iterations to apply to the constraint matrix.Time between iteration-level statistics logging (if `verbosity_level > 1`).The frequency at which extra work is performed to make major algorithmic decisions, e.g., performing restarts and updating the primal weight.optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;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.For more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards.The number of threads to use.optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;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).Seeds for generating (pseudo-)random projections of iterates during termination checks.If true, the iteration_stats field of the SolveLog output will be populated at every iteration.NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default.The type of scheduler used for CPU multi-threading.For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative reduction in the potential function by this amount always triggers a restart.The frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats.optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;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.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.The verbosity of logging. 0: No informational logging.optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;booleanIf true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached.booleanIf true, feasibility polishing will be applied after the solver is interrupted.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptordoubleThe solve tolerance of the experimental trust region solver for diagonal QPs, controlling the accuracy of binary search over a one-dimensional scaling parameter.booleanSee https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.doubleConstraint bounds with absolute value at least this threshold are replaced with infinities.doubleThe initial value of the primal weight (i.e., the ratio of primal and dual step sizes).doubleScaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).booleanIf true, applies L_2 norm rescaling after the Ruiz rescaling.Linesearch rule applied at each major iteration.intNumber of L_infinity Ruiz rescaling iterations to apply to the constraint matrix.doubleTime between iteration-level statistics logging (if `verbosity_level > 1`).intThe frequency at which extra work is performed to make major algorithmic decisions, e.g., performing restarts and updating the primal weight.optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;doubleFor 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.intFor more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards.intThe number of threads to use.optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;doubleThis 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).intgetRandomProjectionSeeds(int index) Seeds for generating (pseudo-)random projections of iterates during termination checks.intSeeds for generating (pseudo-)random projections of iterates during termination checks.Seeds for generating (pseudo-)random projections of iterates during termination checks.booleanIf true, the iteration_stats field of the SolveLog output will be populated at every iteration.NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default.The type of scheduler used for CPU multi-threading.doubleFor ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative reduction in the potential function by this amount always triggers a restart.intThe frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats.optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;booleanWhen solving QPs with diagonal objective matrices, this option can be turned on to enable an experimental solver that avoids linearization of the quadratic term.booleanIf 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.intThe verbosity of logging. 0: No informational logging.booleanoptional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;booleanIf true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached.booleanIf true, feasibility polishing will be applied after the solver is interrupted.booleanThe solve tolerance of the experimental trust region solver for diagonal QPs, controlling the accuracy of binary search over a one-dimensional scaling parameter.booleanSee https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.booleanConstraint bounds with absolute value at least this threshold are replaced with infinities.booleanThe initial value of the primal weight (i.e., the ratio of primal and dual step sizes).booleanScaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).booleanIf true, applies L_2 norm rescaling after the Ruiz rescaling.booleanLinesearch rule applied at each major iteration.booleanNumber of L_infinity Ruiz rescaling iterations to apply to the constraint matrix.booleanTime between iteration-level statistics logging (if `verbosity_level > 1`).booleanThe frequency at which extra work is performed to make major algorithmic decisions, e.g., performing restarts and updating the primal weight.booleanoptional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;booleanFor 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.booleanFor more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards.booleanThe number of threads to use.booleanoptional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;booleanThis 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).booleanIf true, the iteration_stats field of the SolveLog output will be populated at every iteration.booleanNO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default.booleanThe type of scheduler used for CPU multi-threading.booleanFor ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative reduction in the potential function by this amount always triggers a restart.booleanThe frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats.booleanoptional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;booleanWhen solving QPs with diagonal objective matrices, this option can be turned on to enable an experimental solver that avoids linearization of the quadratic term.booleanIf 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.booleanThe verbosity of logging. 0: No informational logging.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanoptional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;setAdaptiveLinesearchParameters(AdaptiveLinesearchParams.Builder builderForValue) optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;setApplyFeasibilityPolishingAfterLimitsReached(boolean value) If true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached.setApplyFeasibilityPolishingIfSolverIsInterrupted(boolean value) If true, feasibility polishing will be applied after the solver is interrupted.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.setHandleSomePrimalGradientsOnFiniteBoundsAsResiduals(boolean value) See https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.setInfiniteConstraintBoundThreshold(double value) Constraint bounds with absolute value at least this threshold are replaced with infinities.setInitialPrimalWeight(double value) The initial value of the primal weight (i.e., the ratio of primal and dual step sizes).setInitialStepSizeScaling(double value) Scaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).setL2NormRescaling(boolean value) If true, applies L_2 norm rescaling after the Ruiz rescaling.Linesearch rule applied at each major iteration.setLInfRuizIterations(int value) Number of L_infinity Ruiz rescaling iterations to apply to the constraint matrix.setLogIntervalSeconds(double value) Time between iteration-level statistics logging (if `verbosity_level > 1`).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.optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;setMalitskyPockParameters(MalitskyPockParams.Builder builderForValue) optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;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.setNumShards(int value) For more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards.setNumThreads(int value) The number of threads to use.optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;setPresolveOptions(PrimalDualHybridGradientParams.PresolveOptions.Builder builderForValue) optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;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).setRandomProjectionSeeds(int index, int value) Seeds for generating (pseudo-)random projections of iterates during termination checks.setRecordIterationStats(boolean value) If true, the iteration_stats field of the SolveLog output will be populated at every iteration.NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default.setSchedulerType(SchedulerType value) The type of scheduler used for CPU multi-threading.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.setTerminationCheckFrequency(int value) The frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats.optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;setTerminationCriteria(TerminationCriteria.Builder builderForValue) optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;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.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.setVerbosityLevel(int value) The verbosity of logging. 0: No informational logging.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<PrimalDualHybridGradientParams.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<PrimalDualHybridGradientParams.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<PrimalDualHybridGradientParams.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PrimalDualHybridGradientParams.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<PrimalDualHybridGradientParams.Builder>
-
mergeFrom
public PrimalDualHybridGradientParams.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<PrimalDualHybridGradientParams.Builder>- Throws:
IOException
-
hasTerminationCriteria
public boolean hasTerminationCriteria()optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;- Specified by:
hasTerminationCriteriain interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the terminationCriteria field is set.
-
getTerminationCriteria
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;- Specified by:
getTerminationCriteriain interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The terminationCriteria.
-
setTerminationCriteria
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1; -
setTerminationCriteria
public PrimalDualHybridGradientParams.Builder setTerminationCriteria(TerminationCriteria.Builder builderForValue) optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1; -
mergeTerminationCriteria
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1; -
clearTerminationCriteria
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1; -
getTerminationCriteriaBuilder
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1; -
getTerminationCriteriaOrBuilder
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;- Specified by:
getTerminationCriteriaOrBuilderin interfacePrimalDualHybridGradientParamsOrBuilder
-
hasNumThreads
public boolean 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];- Specified by:
hasNumThreadsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the numThreads field is set.
-
getNumThreads
public int 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];- Specified by:
getNumThreadsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The numThreads.
-
setNumThreads
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:
value- The numThreads to set.- Returns:
- This builder for chaining.
-
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.
-
hasNumShards
public boolean 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];- Specified by:
hasNumShardsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the numShards field is set.
-
getNumShards
public int 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];- Specified by:
getNumShardsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The numShards.
-
setNumShards
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:
value- The numShards to set.- Returns:
- This builder for chaining.
-
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.
-
hasSchedulerType
public boolean 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];- Specified by:
hasSchedulerTypein interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the schedulerType field is set.
-
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];- Specified by:
getSchedulerTypein interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The schedulerType.
-
setSchedulerType
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:
value- The schedulerType to set.- Returns:
- This builder for chaining.
-
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.
-
hasRecordIterationStats
public boolean 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;- Specified by:
hasRecordIterationStatsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the recordIterationStats field is set.
-
getRecordIterationStats
public boolean 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;- Specified by:
getRecordIterationStatsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The recordIterationStats.
-
setRecordIterationStats
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:
value- The recordIterationStats to set.- Returns:
- This builder for chaining.
-
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.
-
hasVerbosityLevel
public boolean 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];- Specified by:
hasVerbosityLevelin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the verbosityLevel field is set.
-
getVerbosityLevel
public int 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];- Specified by:
getVerbosityLevelin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The verbosityLevel.
-
setVerbosityLevel
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:
value- The verbosityLevel to set.- Returns:
- This builder for chaining.
-
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.
-
hasLogIntervalSeconds
public boolean 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];- Specified by:
hasLogIntervalSecondsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the logIntervalSeconds field is set.
-
getLogIntervalSeconds
public double 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];- Specified by:
getLogIntervalSecondsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The logIntervalSeconds.
-
setLogIntervalSeconds
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:
value- The logIntervalSeconds to set.- Returns:
- This builder for chaining.
-
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.
-
hasMajorIterationFrequency
public boolean 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];- Specified by:
hasMajorIterationFrequencyin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the majorIterationFrequency field is set.
-
getMajorIterationFrequency
public int 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];- Specified by:
getMajorIterationFrequencyin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The majorIterationFrequency.
-
setMajorIterationFrequency
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:
value- The majorIterationFrequency to set.- Returns:
- This builder for chaining.
-
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.
-
hasTerminationCheckFrequency
public boolean 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];- Specified by:
hasTerminationCheckFrequencyin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the terminationCheckFrequency field is set.
-
getTerminationCheckFrequency
public int 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];- Specified by:
getTerminationCheckFrequencyin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The terminationCheckFrequency.
-
setTerminationCheckFrequency
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:
value- The terminationCheckFrequency to set.- Returns:
- This builder for chaining.
-
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.
-
hasRestartStrategy
public boolean 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];- Specified by:
hasRestartStrategyin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the restartStrategy field is set.
-
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];- Specified by:
getRestartStrategyin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The restartStrategy.
-
setRestartStrategy
public PrimalDualHybridGradientParams.Builder setRestartStrategy(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:
value- The restartStrategy to set.- Returns:
- This builder for chaining.
-
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.
-
hasPrimalWeightUpdateSmoothing
public boolean 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];- Specified by:
hasPrimalWeightUpdateSmoothingin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the primalWeightUpdateSmoothing field is set.
-
getPrimalWeightUpdateSmoothing
public double 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];- Specified by:
getPrimalWeightUpdateSmoothingin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The primalWeightUpdateSmoothing.
-
setPrimalWeightUpdateSmoothing
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:
value- The primalWeightUpdateSmoothing to set.- Returns:
- This builder for chaining.
-
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.
-
hasInitialPrimalWeight
public boolean 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;- Specified by:
hasInitialPrimalWeightin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the initialPrimalWeight field is set.
-
getInitialPrimalWeight
public double 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;- Specified by:
getInitialPrimalWeightin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The initialPrimalWeight.
-
setInitialPrimalWeight
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:
value- The initialPrimalWeight to set.- Returns:
- This builder for chaining.
-
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.
-
hasPresolveOptions
public boolean hasPresolveOptions()optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;- Specified by:
hasPresolveOptionsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the presolveOptions field is set.
-
getPresolveOptions
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;- Specified by:
getPresolveOptionsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The presolveOptions.
-
setPresolveOptions
public PrimalDualHybridGradientParams.Builder setPresolveOptions(PrimalDualHybridGradientParams.PresolveOptions value) optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16; -
setPresolveOptions
public PrimalDualHybridGradientParams.Builder setPresolveOptions(PrimalDualHybridGradientParams.PresolveOptions.Builder builderForValue) optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16; -
mergePresolveOptions
public PrimalDualHybridGradientParams.Builder mergePresolveOptions(PrimalDualHybridGradientParams.PresolveOptions value) optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16; -
clearPresolveOptions
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16; -
getPresolveOptionsBuilder
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16; -
getPresolveOptionsOrBuilder
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;- Specified by:
getPresolveOptionsOrBuilderin interfacePrimalDualHybridGradientParamsOrBuilder
-
hasLInfRuizIterations
public boolean 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];- Specified by:
hasLInfRuizIterationsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the lInfRuizIterations field is set.
-
getLInfRuizIterations
public int 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];- Specified by:
getLInfRuizIterationsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The lInfRuizIterations.
-
setLInfRuizIterations
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:
value- The lInfRuizIterations to set.- Returns:
- This builder for chaining.
-
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.
-
hasL2NormRescaling
public boolean 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];- Specified by:
hasL2NormRescalingin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the l2NormRescaling field is set.
-
getL2NormRescaling
public boolean 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];- Specified by:
getL2NormRescalingin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The l2NormRescaling.
-
setL2NormRescaling
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:
value- The l2NormRescaling to set.- Returns:
- This builder for chaining.
-
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.
-
hasSufficientReductionForRestart
public boolean 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];- Specified by:
hasSufficientReductionForRestartin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the sufficientReductionForRestart field is set.
-
getSufficientReductionForRestart
public double 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];- Specified by:
getSufficientReductionForRestartin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The sufficientReductionForRestart.
-
setSufficientReductionForRestart
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:
value- The sufficientReductionForRestart to set.- Returns:
- This builder for chaining.
-
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.
-
hasNecessaryReductionForRestart
public boolean 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];- Specified by:
hasNecessaryReductionForRestartin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the necessaryReductionForRestart field is set.
-
getNecessaryReductionForRestart
public double 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];- Specified by:
getNecessaryReductionForRestartin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The necessaryReductionForRestart.
-
setNecessaryReductionForRestart
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:
value- The necessaryReductionForRestart to set.- Returns:
- This builder for chaining.
-
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.
-
hasLinesearchRule
public boolean hasLinesearchRule()Linesearch rule applied at each major iteration.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];- Specified by:
hasLinesearchRulein interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the linesearchRule field is set.
-
getLinesearchRule
Linesearch rule applied at each major iteration.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];- Specified by:
getLinesearchRulein interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The linesearchRule.
-
setLinesearchRule
public PrimalDualHybridGradientParams.Builder setLinesearchRule(PrimalDualHybridGradientParams.LinesearchRule value) Linesearch rule applied at each major iteration.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];- Parameters:
value- The linesearchRule to set.- Returns:
- This builder for chaining.
-
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.
-
hasAdaptiveLinesearchParameters
public boolean hasAdaptiveLinesearchParameters()optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;- Specified by:
hasAdaptiveLinesearchParametersin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the adaptiveLinesearchParameters field is set.
-
getAdaptiveLinesearchParameters
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;- Specified by:
getAdaptiveLinesearchParametersin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The adaptiveLinesearchParameters.
-
setAdaptiveLinesearchParameters
public PrimalDualHybridGradientParams.Builder setAdaptiveLinesearchParameters(AdaptiveLinesearchParams value) optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18; -
setAdaptiveLinesearchParameters
public PrimalDualHybridGradientParams.Builder setAdaptiveLinesearchParameters(AdaptiveLinesearchParams.Builder builderForValue) optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18; -
mergeAdaptiveLinesearchParameters
public PrimalDualHybridGradientParams.Builder mergeAdaptiveLinesearchParameters(AdaptiveLinesearchParams value) optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18; -
clearAdaptiveLinesearchParameters
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18; -
getAdaptiveLinesearchParametersBuilder
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18; -
getAdaptiveLinesearchParametersOrBuilder
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;- Specified by:
getAdaptiveLinesearchParametersOrBuilderin interfacePrimalDualHybridGradientParamsOrBuilder
-
hasMalitskyPockParameters
public boolean hasMalitskyPockParameters()optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;- Specified by:
hasMalitskyPockParametersin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the malitskyPockParameters field is set.
-
getMalitskyPockParameters
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;- Specified by:
getMalitskyPockParametersin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The malitskyPockParameters.
-
setMalitskyPockParameters
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19; -
setMalitskyPockParameters
public PrimalDualHybridGradientParams.Builder setMalitskyPockParameters(MalitskyPockParams.Builder builderForValue) optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19; -
mergeMalitskyPockParameters
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19; -
clearMalitskyPockParameters
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19; -
getMalitskyPockParametersBuilder
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19; -
getMalitskyPockParametersOrBuilder
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;- Specified by:
getMalitskyPockParametersOrBuilderin interfacePrimalDualHybridGradientParamsOrBuilder
-
hasInitialStepSizeScaling
public boolean 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];- Specified by:
hasInitialStepSizeScalingin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the initialStepSizeScaling field is set.
-
getInitialStepSizeScaling
public double 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];- Specified by:
getInitialStepSizeScalingin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The initialStepSizeScaling.
-
setInitialStepSizeScaling
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:
value- The initialStepSizeScaling to set.- Returns:
- This builder for chaining.
-
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.
-
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];- Specified by:
getRandomProjectionSeedsListin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- A list containing the randomProjectionSeeds.
-
getRandomProjectionSeedsCount
public int 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];- Specified by:
getRandomProjectionSeedsCountin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The count of randomProjectionSeeds.
-
getRandomProjectionSeeds
public int 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];- Specified by:
getRandomProjectionSeedsin interfacePrimalDualHybridGradientParamsOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The randomProjectionSeeds at the given index.
-
setRandomProjectionSeeds
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:
index- The index to set the value at.value- The randomProjectionSeeds to set.- Returns:
- This builder for chaining.
-
addRandomProjectionSeeds
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:
value- The randomProjectionSeeds to add.- Returns:
- This builder for chaining.
-
addAllRandomProjectionSeeds
public PrimalDualHybridGradientParams.Builder addAllRandomProjectionSeeds(Iterable<? extends 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:
values- The randomProjectionSeeds to add.- Returns:
- This builder for chaining.
-
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.
-
hasInfiniteConstraintBoundThreshold
public boolean 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];- Specified by:
hasInfiniteConstraintBoundThresholdin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the infiniteConstraintBoundThreshold field is set.
-
getInfiniteConstraintBoundThreshold
public double 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];- Specified by:
getInfiniteConstraintBoundThresholdin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The infiniteConstraintBoundThreshold.
-
setInfiniteConstraintBoundThreshold
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:
value- The infiniteConstraintBoundThreshold to set.- Returns:
- This builder for chaining.
-
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.
-
hasHandleSomePrimalGradientsOnFiniteBoundsAsResiduals
public boolean 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];- Specified by:
hasHandleSomePrimalGradientsOnFiniteBoundsAsResidualsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the handleSomePrimalGradientsOnFiniteBoundsAsResiduals field is set.
-
getHandleSomePrimalGradientsOnFiniteBoundsAsResiduals
public boolean 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];- Specified by:
getHandleSomePrimalGradientsOnFiniteBoundsAsResidualsin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The handleSomePrimalGradientsOnFiniteBoundsAsResiduals.
-
setHandleSomePrimalGradientsOnFiniteBoundsAsResiduals
public 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:
value- The handleSomePrimalGradientsOnFiniteBoundsAsResiduals to set.- Returns:
- This builder for chaining.
-
clearHandleSomePrimalGradientsOnFiniteBoundsAsResiduals
public 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.
-
hasUseDiagonalQpTrustRegionSolver
public boolean 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];- Specified by:
hasUseDiagonalQpTrustRegionSolverin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the useDiagonalQpTrustRegionSolver field is set.
-
getUseDiagonalQpTrustRegionSolver
public boolean 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];- Specified by:
getUseDiagonalQpTrustRegionSolverin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The useDiagonalQpTrustRegionSolver.
-
setUseDiagonalQpTrustRegionSolver
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:
value- The useDiagonalQpTrustRegionSolver to set.- Returns:
- This builder for chaining.
-
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.
-
hasDiagonalQpTrustRegionSolverTolerance
public boolean 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];- Specified by:
hasDiagonalQpTrustRegionSolverTolerancein interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the diagonalQpTrustRegionSolverTolerance field is set.
-
getDiagonalQpTrustRegionSolverTolerance
public double 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];- Specified by:
getDiagonalQpTrustRegionSolverTolerancein interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The diagonalQpTrustRegionSolverTolerance.
-
setDiagonalQpTrustRegionSolverTolerance
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:
value- The diagonalQpTrustRegionSolverTolerance to set.- Returns:
- This builder for chaining.
-
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.
-
hasUseFeasibilityPolishing
public boolean 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];- Specified by:
hasUseFeasibilityPolishingin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the useFeasibilityPolishing field is set.
-
getUseFeasibilityPolishing
public boolean 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];- Specified by:
getUseFeasibilityPolishingin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The useFeasibilityPolishing.
-
setUseFeasibilityPolishing
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:
value- The useFeasibilityPolishing to set.- Returns:
- This builder for chaining.
-
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.
-
hasApplyFeasibilityPolishingAfterLimitsReached
public boolean hasApplyFeasibilityPolishingAfterLimitsReached()If true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached. This can result in a solution that is closer to feasibility, at the expense of violating the limit by a moderate amount.
optional bool apply_feasibility_polishing_after_limits_reached = 33 [default = false];- Specified by:
hasApplyFeasibilityPolishingAfterLimitsReachedin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the applyFeasibilityPolishingAfterLimitsReached field is set.
-
getApplyFeasibilityPolishingAfterLimitsReached
public boolean getApplyFeasibilityPolishingAfterLimitsReached()If true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached. This can result in a solution that is closer to feasibility, at the expense of violating the limit by a moderate amount.
optional bool apply_feasibility_polishing_after_limits_reached = 33 [default = false];- Specified by:
getApplyFeasibilityPolishingAfterLimitsReachedin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The applyFeasibilityPolishingAfterLimitsReached.
-
setApplyFeasibilityPolishingAfterLimitsReached
public PrimalDualHybridGradientParams.Builder setApplyFeasibilityPolishingAfterLimitsReached(boolean value) If true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached. This can result in a solution that is closer to feasibility, at the expense of violating the limit by a moderate amount.
optional bool apply_feasibility_polishing_after_limits_reached = 33 [default = false];- Parameters:
value- The applyFeasibilityPolishingAfterLimitsReached to set.- Returns:
- This builder for chaining.
-
clearApplyFeasibilityPolishingAfterLimitsReached
If true, feasibility polishing will be applied after the iteration limit, kkt limit, or time limit is reached. This can result in a solution that is closer to feasibility, at the expense of violating the limit by a moderate amount.
optional bool apply_feasibility_polishing_after_limits_reached = 33 [default = false];- Returns:
- This builder for chaining.
-
hasApplyFeasibilityPolishingIfSolverIsInterrupted
public boolean hasApplyFeasibilityPolishingIfSolverIsInterrupted()If true, feasibility polishing will be applied after the solver is interrupted. This can result in a solution that is closer to feasibility, at the expense of not stopping as promptly when interrupted.
optional bool apply_feasibility_polishing_if_solver_is_interrupted = 34 [default = false];- Specified by:
hasApplyFeasibilityPolishingIfSolverIsInterruptedin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the applyFeasibilityPolishingIfSolverIsInterrupted field is set.
-
getApplyFeasibilityPolishingIfSolverIsInterrupted
public boolean getApplyFeasibilityPolishingIfSolverIsInterrupted()If true, feasibility polishing will be applied after the solver is interrupted. This can result in a solution that is closer to feasibility, at the expense of not stopping as promptly when interrupted.
optional bool apply_feasibility_polishing_if_solver_is_interrupted = 34 [default = false];- Specified by:
getApplyFeasibilityPolishingIfSolverIsInterruptedin interfacePrimalDualHybridGradientParamsOrBuilder- Returns:
- The applyFeasibilityPolishingIfSolverIsInterrupted.
-
setApplyFeasibilityPolishingIfSolverIsInterrupted
public PrimalDualHybridGradientParams.Builder setApplyFeasibilityPolishingIfSolverIsInterrupted(boolean value) If true, feasibility polishing will be applied after the solver is interrupted. This can result in a solution that is closer to feasibility, at the expense of not stopping as promptly when interrupted.
optional bool apply_feasibility_polishing_if_solver_is_interrupted = 34 [default = false];- Parameters:
value- The applyFeasibilityPolishingIfSolverIsInterrupted to set.- Returns:
- This builder for chaining.
-
clearApplyFeasibilityPolishingIfSolverIsInterrupted
If true, feasibility polishing will be applied after the solver is interrupted. This can result in a solution that is closer to feasibility, at the expense of not stopping as promptly when interrupted.
optional bool apply_feasibility_polishing_if_solver_is_interrupted = 34 [default = false];- Returns:
- This builder for chaining.
-