Package operations_research.pdlp
Class Solvers.PrimalDualHybridGradientParams
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- operations_research.pdlp.Solvers.PrimalDualHybridGradientParams
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.io.Serializable,Solvers.PrimalDualHybridGradientParamsOrBuilder
- Enclosing class:
- Solvers
public static final class Solvers.PrimalDualHybridGradientParams extends com.google.protobuf.GeneratedMessageV3 implements Solvers.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 typeoperations_research.pdlp.PrimalDualHybridGradientParams- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSolvers.PrimalDualHybridGradientParams.BuilderParameters for PrimalDualHybridGradient() in primal_dual_hybrid_gradient.h.static classSolvers.PrimalDualHybridGradientParams.LinesearchRuleProtobuf enumoperations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRulestatic classSolvers.PrimalDualHybridGradientParams.PresolveOptionsProtobuf typeoperations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptionsstatic interfaceSolvers.PrimalDualHybridGradientParams.PresolveOptionsOrBuilderstatic classSolvers.PrimalDualHybridGradientParams.RestartStrategyProtobuf enumoperations_research.pdlp.PrimalDualHybridGradientParams.RestartStrategy-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Solvers.AdaptiveLinesearchParamsgetAdaptiveLinesearchParameters()optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;Solvers.AdaptiveLinesearchParamsOrBuildergetAdaptiveLinesearchParametersOrBuilder()optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;static Solvers.PrimalDualHybridGradientParamsgetDefaultInstance()Solvers.PrimalDualHybridGradientParamsgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()doublegetDiagonalQpTrustRegionSolverTolerance()The solve tolerance of the experimental trust region solver for diagonal QPs, controlling the accuracy of binary search over a one-dimensional scaling parameter.booleangetHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()See https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.doublegetInfiniteConstraintBoundThreshold()Constraint bounds with absolute value at least this threshold are replaced with infinities.doublegetInitialPrimalWeight()The initial value of the primal weight (i.e., the ratio of primal and dual step sizes).doublegetInitialStepSizeScaling()Scaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).booleangetL2NormRescaling()If true, applies L_2 norm rescaling after the Ruiz rescaling.Solvers.PrimalDualHybridGradientParams.LinesearchRulegetLinesearchRule()Linesearch rule applied at each major iteration.intgetLInfRuizIterations()Number of L_infinity Ruiz rescaling iterations to apply to the constraint matrix.doublegetLogIntervalSeconds()Time between iteration-level statistics logging (if `verbosity_level > 1`).intgetMajorIterationFrequency()The frequency at which extra work is performed to make major algorithmic decisions, e.g., performing restarts and updating the primal weight.Solvers.MalitskyPockParamsgetMalitskyPockParameters()optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;Solvers.MalitskyPockParamsOrBuildergetMalitskyPockParametersOrBuilder()optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;doublegetNecessaryReductionForRestart()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.intgetNumShards()For more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards.intgetNumThreads()The number of threads to use.com.google.protobuf.Parser<Solvers.PrimalDualHybridGradientParams>getParserForType()Solvers.PrimalDualHybridGradientParams.PresolveOptionsgetPresolveOptions()optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;Solvers.PrimalDualHybridGradientParams.PresolveOptionsOrBuildergetPresolveOptionsOrBuilder()optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;doublegetPrimalWeightUpdateSmoothing()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).intgetRandomProjectionSeeds(int index)Seeds for generating (pseudo-)random projections of iterates during termination checks.intgetRandomProjectionSeedsCount()Seeds for generating (pseudo-)random projections of iterates during termination checks.java.util.List<java.lang.Integer>getRandomProjectionSeedsList()Seeds for generating (pseudo-)random projections of iterates during termination checks.booleangetRecordIterationStats()If true, the iteration_stats field of the SolveLog output will be populated at every iteration.Solvers.PrimalDualHybridGradientParams.RestartStrategygetRestartStrategy()NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default.intgetSerializedSize()doublegetSufficientReductionForRestart()For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative reduction in the potential function by this amount always triggers a restart.intgetTerminationCheckFrequency()The frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats.Solvers.TerminationCriteriagetTerminationCriteria()optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;Solvers.TerminationCriteriaOrBuildergetTerminationCriteriaOrBuilder()optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;booleangetUseDiagonalQpTrustRegionSolver()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.booleangetUseFeasibilityPolishing()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.intgetVerbosityLevel()The verbosity of logging.booleanhasAdaptiveLinesearchParameters()optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;booleanhasDiagonalQpTrustRegionSolverTolerance()The solve tolerance of the experimental trust region solver for diagonal QPs, controlling the accuracy of binary search over a one-dimensional scaling parameter.booleanhasHandleSomePrimalGradientsOnFiniteBoundsAsResiduals()See https://developers.google.com/optimization/lp/pdlp_math#treating_some_variable_bounds_as_infinite for a description of this flag.inthashCode()booleanhasInfiniteConstraintBoundThreshold()Constraint bounds with absolute value at least this threshold are replaced with infinities.booleanhasInitialPrimalWeight()The initial value of the primal weight (i.e., the ratio of primal and dual step sizes).booleanhasInitialStepSizeScaling()Scaling factor applied to the initial step size (all step sizes if linesearch_rule == CONSTANT_STEP_SIZE_RULE).booleanhasL2NormRescaling()If true, applies L_2 norm rescaling after the Ruiz rescaling.booleanhasLinesearchRule()Linesearch rule applied at each major iteration.booleanhasLInfRuizIterations()Number of L_infinity Ruiz rescaling iterations to apply to the constraint matrix.booleanhasLogIntervalSeconds()Time between iteration-level statistics logging (if `verbosity_level > 1`).booleanhasMajorIterationFrequency()The frequency at which extra work is performed to make major algorithmic decisions, e.g., performing restarts and updating the primal weight.booleanhasMalitskyPockParameters()optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;booleanhasNecessaryReductionForRestart()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.booleanhasNumShards()For more efficient parallel computation, the matrices and vectors are divided (virtually) into num_shards shards.booleanhasNumThreads()The number of threads to use.booleanhasPresolveOptions()optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;booleanhasPrimalWeightUpdateSmoothing()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).booleanhasRecordIterationStats()If true, the iteration_stats field of the SolveLog output will be populated at every iteration.booleanhasRestartStrategy()NO_RESTARTS and EVERY_MAJOR_ITERATION occasionally outperform the default.booleanhasSufficientReductionForRestart()For ADAPTIVE_HEURISTIC and ADAPTIVE_DISTANCE_BASED only: A relative reduction in the potential function by this amount always triggers a restart.booleanhasTerminationCheckFrequency()The frequency (based on a counter reset every major iteration) to check for termination (involves extra work) and log iteration stats.booleanhasTerminationCriteria()optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;booleanhasUseDiagonalQpTrustRegionSolver()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.booleanhasUseFeasibilityPolishing()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.booleanhasVerbosityLevel()The verbosity of logging.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static Solvers.PrimalDualHybridGradientParams.BuildernewBuilder()static Solvers.PrimalDualHybridGradientParams.BuildernewBuilder(Solvers.PrimalDualHybridGradientParams prototype)Solvers.PrimalDualHybridGradientParams.BuildernewBuilderForType()protected Solvers.PrimalDualHybridGradientParams.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected java.lang.ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static Solvers.PrimalDualHybridGradientParamsparseDelimitedFrom(java.io.InputStream input)static Solvers.PrimalDualHybridGradientParamsparseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Solvers.PrimalDualHybridGradientParamsparseFrom(byte[] data)static Solvers.PrimalDualHybridGradientParamsparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Solvers.PrimalDualHybridGradientParamsparseFrom(com.google.protobuf.ByteString data)static Solvers.PrimalDualHybridGradientParamsparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Solvers.PrimalDualHybridGradientParamsparseFrom(com.google.protobuf.CodedInputStream input)static Solvers.PrimalDualHybridGradientParamsparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Solvers.PrimalDualHybridGradientParamsparseFrom(java.io.InputStream input)static Solvers.PrimalDualHybridGradientParamsparseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static Solvers.PrimalDualHybridGradientParamsparseFrom(java.nio.ByteBuffer data)static Solvers.PrimalDualHybridGradientParamsparseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<Solvers.PrimalDualHybridGradientParams>parser()Solvers.PrimalDualHybridGradientParams.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
TERMINATION_CRITERIA_FIELD_NUMBER
public static final int TERMINATION_CRITERIA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NUM_THREADS_FIELD_NUMBER
public static final int NUM_THREADS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NUM_SHARDS_FIELD_NUMBER
public static final int NUM_SHARDS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RECORD_ITERATION_STATS_FIELD_NUMBER
public static final int RECORD_ITERATION_STATS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VERBOSITY_LEVEL_FIELD_NUMBER
public static final int VERBOSITY_LEVEL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LOG_INTERVAL_SECONDS_FIELD_NUMBER
public static final int LOG_INTERVAL_SECONDS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MAJOR_ITERATION_FREQUENCY_FIELD_NUMBER
public static final int MAJOR_ITERATION_FREQUENCY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TERMINATION_CHECK_FREQUENCY_FIELD_NUMBER
public static final int TERMINATION_CHECK_FREQUENCY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RESTART_STRATEGY_FIELD_NUMBER
public static final int RESTART_STRATEGY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRIMAL_WEIGHT_UPDATE_SMOOTHING_FIELD_NUMBER
public static final int PRIMAL_WEIGHT_UPDATE_SMOOTHING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INITIAL_PRIMAL_WEIGHT_FIELD_NUMBER
public static final int INITIAL_PRIMAL_WEIGHT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRESOLVE_OPTIONS_FIELD_NUMBER
public static final int PRESOLVE_OPTIONS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
L_INF_RUIZ_ITERATIONS_FIELD_NUMBER
public static final int L_INF_RUIZ_ITERATIONS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
L2_NORM_RESCALING_FIELD_NUMBER
public static final int L2_NORM_RESCALING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SUFFICIENT_REDUCTION_FOR_RESTART_FIELD_NUMBER
public static final int SUFFICIENT_REDUCTION_FOR_RESTART_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NECESSARY_REDUCTION_FOR_RESTART_FIELD_NUMBER
public static final int NECESSARY_REDUCTION_FOR_RESTART_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LINESEARCH_RULE_FIELD_NUMBER
public static final int LINESEARCH_RULE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ADAPTIVE_LINESEARCH_PARAMETERS_FIELD_NUMBER
public static final int ADAPTIVE_LINESEARCH_PARAMETERS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MALITSKY_POCK_PARAMETERS_FIELD_NUMBER
public static final int MALITSKY_POCK_PARAMETERS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INITIAL_STEP_SIZE_SCALING_FIELD_NUMBER
public static final int INITIAL_STEP_SIZE_SCALING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RANDOM_PROJECTION_SEEDS_FIELD_NUMBER
public static final int RANDOM_PROJECTION_SEEDS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INFINITE_CONSTRAINT_BOUND_THRESHOLD_FIELD_NUMBER
public static final int INFINITE_CONSTRAINT_BOUND_THRESHOLD_FIELD_NUMBER
- See Also:
- Constant Field Values
-
HANDLE_SOME_PRIMAL_GRADIENTS_ON_FINITE_BOUNDS_AS_RESIDUALS_FIELD_NUMBER
public static final int HANDLE_SOME_PRIMAL_GRADIENTS_ON_FINITE_BOUNDS_AS_RESIDUALS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
USE_DIAGONAL_QP_TRUST_REGION_SOLVER_FIELD_NUMBER
public static final int USE_DIAGONAL_QP_TRUST_REGION_SOLVER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DIAGONAL_QP_TRUST_REGION_SOLVER_TOLERANCE_FIELD_NUMBER
public static final int DIAGONAL_QP_TRUST_REGION_SOLVER_TOLERANCE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
USE_FEASIBILITY_POLISHING_FIELD_NUMBER
public static final int USE_FEASIBILITY_POLISHING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PARSER
@Deprecated public static final com.google.protobuf.Parser<Solvers.PrimalDualHybridGradientParams> PARSER
Deprecated.
-
-
Method Detail
-
newInstance
protected java.lang.Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
hasTerminationCriteria
public boolean hasTerminationCriteria()
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;- Specified by:
hasTerminationCriteriain interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the terminationCriteria field is set.
-
getTerminationCriteria
public Solvers.TerminationCriteria getTerminationCriteria()
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;- Specified by:
getTerminationCriteriain interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The terminationCriteria.
-
getTerminationCriteriaOrBuilder
public Solvers.TerminationCriteriaOrBuilder getTerminationCriteriaOrBuilder()
optional .operations_research.pdlp.TerminationCriteria termination_criteria = 1;- Specified by:
getTerminationCriteriaOrBuilderin interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The numThreads.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The numShards.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The recordIterationStats.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The verbosityLevel.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The logIntervalSeconds.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The majorIterationFrequency.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The terminationCheckFrequency.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the restartStrategy field is set.
-
getRestartStrategy
public Solvers.PrimalDualHybridGradientParams.RestartStrategy 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The restartStrategy.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The primalWeightUpdateSmoothing.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The initialPrimalWeight.
-
hasPresolveOptions
public boolean hasPresolveOptions()
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;- Specified by:
hasPresolveOptionsin interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the presolveOptions field is set.
-
getPresolveOptions
public Solvers.PrimalDualHybridGradientParams.PresolveOptions getPresolveOptions()
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;- Specified by:
getPresolveOptionsin interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The presolveOptions.
-
getPresolveOptionsOrBuilder
public Solvers.PrimalDualHybridGradientParams.PresolveOptionsOrBuilder getPresolveOptionsOrBuilder()
optional .operations_research.pdlp.PrimalDualHybridGradientParams.PresolveOptions presolve_options = 16;- Specified by:
getPresolveOptionsOrBuilderin interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The lInfRuizIterations.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The l2NormRescaling.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The sufficientReductionForRestart.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The necessaryReductionForRestart.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the linesearchRule field is set.
-
getLinesearchRule
public Solvers.PrimalDualHybridGradientParams.LinesearchRule getLinesearchRule()
Linesearch rule applied at each major iteration.
optional .operations_research.pdlp.PrimalDualHybridGradientParams.LinesearchRule linesearch_rule = 12 [default = ADAPTIVE_LINESEARCH_RULE];- Specified by:
getLinesearchRulein interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The linesearchRule.
-
hasAdaptiveLinesearchParameters
public boolean hasAdaptiveLinesearchParameters()
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;- Specified by:
hasAdaptiveLinesearchParametersin interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the adaptiveLinesearchParameters field is set.
-
getAdaptiveLinesearchParameters
public Solvers.AdaptiveLinesearchParams getAdaptiveLinesearchParameters()
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;- Specified by:
getAdaptiveLinesearchParametersin interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The adaptiveLinesearchParameters.
-
getAdaptiveLinesearchParametersOrBuilder
public Solvers.AdaptiveLinesearchParamsOrBuilder getAdaptiveLinesearchParametersOrBuilder()
optional .operations_research.pdlp.AdaptiveLinesearchParams adaptive_linesearch_parameters = 18;- Specified by:
getAdaptiveLinesearchParametersOrBuilderin interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder
-
hasMalitskyPockParameters
public boolean hasMalitskyPockParameters()
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;- Specified by:
hasMalitskyPockParametersin interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- Whether the malitskyPockParameters field is set.
-
getMalitskyPockParameters
public Solvers.MalitskyPockParams getMalitskyPockParameters()
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;- Specified by:
getMalitskyPockParametersin interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The malitskyPockParameters.
-
getMalitskyPockParametersOrBuilder
public Solvers.MalitskyPockParamsOrBuilder getMalitskyPockParametersOrBuilder()
optional .operations_research.pdlp.MalitskyPockParams malitsky_pock_parameters = 19;- Specified by:
getMalitskyPockParametersOrBuilderin interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The initialStepSizeScaling.
-
getRandomProjectionSeedsList
public java.util.List<java.lang.Integer> 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The randomProjectionSeeds at the given index.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The infiniteConstraintBoundThreshold.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The handleSomePrimalGradientsOnFiniteBoundsAsResiduals.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The useDiagonalQpTrustRegionSolver.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The diagonalQpTrustRegionSolverTolerance.
-
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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- 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 interfaceSolvers.PrimalDualHybridGradientParamsOrBuilder- Returns:
- The useFeasibilityPolishing.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
java.io.IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Solvers.PrimalDualHybridGradientParams parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Solvers.PrimalDualHybridGradientParams parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Solvers.PrimalDualHybridGradientParams parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Solvers.PrimalDualHybridGradientParams parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Solvers.PrimalDualHybridGradientParams parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Solvers.PrimalDualHybridGradientParams parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Solvers.PrimalDualHybridGradientParams parseFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Solvers.PrimalDualHybridGradientParams parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Solvers.PrimalDualHybridGradientParams parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseDelimitedFrom
public static Solvers.PrimalDualHybridGradientParams parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Solvers.PrimalDualHybridGradientParams parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
- Throws:
java.io.IOException
-
parseFrom
public static Solvers.PrimalDualHybridGradientParams parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Throws:
java.io.IOException
-
newBuilderForType
public Solvers.PrimalDualHybridGradientParams.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Solvers.PrimalDualHybridGradientParams.Builder newBuilder()
-
newBuilder
public static Solvers.PrimalDualHybridGradientParams.Builder newBuilder(Solvers.PrimalDualHybridGradientParams prototype)
-
toBuilder
public Solvers.PrimalDualHybridGradientParams.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Solvers.PrimalDualHybridGradientParams.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Solvers.PrimalDualHybridGradientParams getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Solvers.PrimalDualHybridGradientParams> parser()
-
getParserForType
public com.google.protobuf.Parser<Solvers.PrimalDualHybridGradientParams> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Solvers.PrimalDualHybridGradientParams getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-