ortools.math_opt.model_parameters_pb2
@generated by mypy-protobuf. Do not edit manually! isort:skip_file Solve parameters that are specific to the model.
1# -*- coding: utf-8 -*- 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# NO CHECKED-IN PROTOBUF GENCODE 4# source: ortools/math_opt/model_parameters.proto 5# Protobuf Python Version: 6.31.1 6"""Generated protocol buffer code.""" 7from google.protobuf import descriptor as _descriptor 8from google.protobuf import descriptor_pool as _descriptor_pool 9from google.protobuf import runtime_version as _runtime_version 10from google.protobuf import symbol_database as _symbol_database 11from google.protobuf.internal import builder as _builder 12_runtime_version.ValidateProtobufRuntimeVersion( 13 _runtime_version.Domain.PUBLIC, 14 6, 15 31, 16 1, 17 '', 18 'ortools/math_opt/model_parameters.proto' 19) 20# @@protoc_insertion_point(imports) 21 22_sym_db = _symbol_database.Default() 23 24 25from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 26from ortools.math_opt import solution_pb2 as ortools_dot_math__opt_dot_solution__pb2 27from ortools.math_opt import sparse_containers_pb2 as ortools_dot_math__opt_dot_sparse__containers__pb2 28 29 30DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'ortools/math_opt/model_parameters.proto\x12\x1coperations_research.math_opt\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fortools/math_opt/solution.proto\x1a(ortools/math_opt/sparse_containers.proto\"\xaf\x01\n\x11SolutionHintProto\x12N\n\x0fvariable_values\x18\x01 \x01(\x0b\x32\x35.operations_research.math_opt.SparseDoubleVectorProto\x12J\n\x0b\x64ual_values\x18\x02 \x01(\x0b\x32\x35.operations_research.math_opt.SparseDoubleVectorProto\"\x91\x02\n\x18ObjectiveParametersProto\x12\x35\n(objective_degradation_absolute_tolerance\x18\x07 \x01(\x01H\x00\x88\x01\x01\x12\x35\n(objective_degradation_relative_tolerance\x18\x08 \x01(\x01H\x01\x88\x01\x01\x12-\n\ntime_limit\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationB+\n)_objective_degradation_absolute_toleranceB+\n)_objective_degradation_relative_tolerance\"\xd8\x07\n\x19ModelSolveParametersProto\x12U\n\x16variable_values_filter\x18\x01 \x01(\x0b\x32\x35.operations_research.math_opt.SparseVectorFilterProto\x12Q\n\x12\x64ual_values_filter\x18\x02 \x01(\x0b\x32\x35.operations_research.math_opt.SparseVectorFilterProto\x12[\n\x1cquadratic_dual_values_filter\x18\n \x01(\x0b\x32\x35.operations_research.math_opt.SparseVectorFilterProto\x12S\n\x14reduced_costs_filter\x18\x03 \x01(\x0b\x32\x35.operations_research.math_opt.SparseVectorFilterProto\x12?\n\rinitial_basis\x18\x04 \x01(\x0b\x32(.operations_research.math_opt.BasisProto\x12G\n\x0esolution_hints\x18\x05 \x03(\x0b\x32/.operations_research.math_opt.SolutionHintProto\x12R\n\x14\x62ranching_priorities\x18\x06 \x01(\x0b\x32\x34.operations_research.math_opt.SparseInt32VectorProto\x12\\\n\x1cprimary_objective_parameters\x18\x07 \x01(\x0b\x32\x36.operations_research.math_opt.ObjectiveParametersProto\x12\x81\x01\n\x1e\x61uxiliary_objective_parameters\x18\x08 \x03(\x0b\x32Y.operations_research.math_opt.ModelSolveParametersProto.AuxiliaryObjectiveParametersEntry\x12\"\n\x1alazy_linear_constraint_ids\x18\t \x03(\x03\x1a{\n!AuxiliaryObjectiveParametersEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.operations_research.math_opt.ObjectiveParametersProto:\x02\x38\x01\x42\x1e\n\x1a\x63om.google.ortools.mathoptP\x01\x62\x06proto3') 31 32_globals = globals() 33_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) 34_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ortools.math_opt.model_parameters_pb2', _globals) 35if not _descriptor._USE_C_DESCRIPTORS: 36 _globals['DESCRIPTOR']._loaded_options = None 37 _globals['DESCRIPTOR']._serialized_options = b'\n\032com.google.ortools.mathoptP\001' 38 _globals['_MODELSOLVEPARAMETERSPROTO_AUXILIARYOBJECTIVEPARAMETERSENTRY']._loaded_options = None 39 _globals['_MODELSOLVEPARAMETERSPROTO_AUXILIARYOBJECTIVEPARAMETERSENTRY']._serialized_options = b'8\001' 40 _globals['_SOLUTIONHINTPROTO']._serialized_start=181 41 _globals['_SOLUTIONHINTPROTO']._serialized_end=356 42 _globals['_OBJECTIVEPARAMETERSPROTO']._serialized_start=359 43 _globals['_OBJECTIVEPARAMETERSPROTO']._serialized_end=632 44 _globals['_MODELSOLVEPARAMETERSPROTO']._serialized_start=635 45 _globals['_MODELSOLVEPARAMETERSPROTO']._serialized_end=1619 46 _globals['_MODELSOLVEPARAMETERSPROTO_AUXILIARYOBJECTIVEPARAMETERSENTRY']._serialized_start=1496 47 _globals['_MODELSOLVEPARAMETERSPROTO_AUXILIARYOBJECTIVEPARAMETERSENTRY']._serialized_end=1619 48# @@protoc_insertion_point(module_scope)
A suggested starting solution for the solver.
MIP solvers generally only want primal information (variable_values
), while
LP solvers want both primal and dual information (dual_values
).
Many MIP solvers can work with: (1) partial solutions that do not specify all variables or (2) infeasible solutions. In these cases, solvers typically solve a sub-MIP to complete/correct the hint.
How the hint is used by the solver, if at all, is highly dependent on the solver, the problem type, and the algorithm used. The most reliable way to ensure your hint has an effect is to read the underlying solvers logs with and without the hint.
Simplex-based LP solvers typically prefer an initial basis to a solution hint (they need to crossover to convert the hint to a basic feasible solution otherwise).
TODO(b/183616124): Add hint-priorities to variable_values.
Parameters for an individual objective in a multi-objective model.
TODO(b/183628247): follow naming convention in fields below. Parameters to control a single solve that are specific to the input model (see SolveParametersProto for model independent parameters).
Abstract base class for protocol messages.
Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.