ortools.math_opt.model_update_pb2

@generated by mypy-protobuf. Do not edit manually! isort:skip_file Copyright 2010-2025 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Updates an existing Model proto.

 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_update.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_update.proto'
19)
20# @@protoc_insertion_point(imports)
21
22_sym_db = _symbol_database.Default()
23
24
25from ortools.math_opt import model_pb2 as ortools_dot_math__opt_dot_model__pb2
26from ortools.math_opt import sparse_containers_pb2 as ortools_dot_math__opt_dot_sparse__containers__pb2
27
28
29DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#ortools/math_opt/model_update.proto\x12\x1coperations_research.math_opt\x1a\x1cortools/math_opt/model.proto\x1a(ortools/math_opt/sparse_containers.proto\"\xf7\x01\n\x14VariableUpdatesProto\x12K\n\x0clower_bounds\x18\x01 \x01(\x0b\x32\x35.operations_research.math_opt.SparseDoubleVectorProto\x12K\n\x0cupper_bounds\x18\x02 \x01(\x0b\x32\x35.operations_research.math_opt.SparseDoubleVectorProto\x12\x45\n\x08integers\x18\x03 \x01(\x0b\x32\x33.operations_research.math_opt.SparseBoolVectorProto\"\xd6\x02\n\x15ObjectiveUpdatesProto\x12\x1d\n\x10\x64irection_update\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x1a\n\roffset_update\x18\x02 \x01(\x01H\x01\x88\x01\x01\x12R\n\x13linear_coefficients\x18\x03 \x01(\x0b\x32\x35.operations_research.math_opt.SparseDoubleVectorProto\x12U\n\x16quadratic_coefficients\x18\x04 \x01(\x0b\x32\x35.operations_research.math_opt.SparseDoubleMatrixProto\x12\x1c\n\x0fpriority_update\x18\x05 \x01(\x03H\x02\x88\x01\x01\x42\x13\n\x11_direction_updateB\x10\n\x0e_offset_updateB\x12\n\x10_priority_update\"\xec\x03\n\x1f\x41uxiliaryObjectivesUpdatesProto\x12\x1d\n\x15\x64\x65leted_objective_ids\x18\x01 \x03(\x03\x12h\n\x0enew_objectives\x18\x02 \x03(\x0b\x32P.operations_research.math_opt.AuxiliaryObjectivesUpdatesProto.NewObjectivesEntry\x12n\n\x11objective_updates\x18\x03 \x03(\x0b\x32S.operations_research.math_opt.AuxiliaryObjectivesUpdatesProto.ObjectiveUpdatesEntry\x1a\x62\n\x12NewObjectivesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12;\n\x05value\x18\x02 \x01(\x0b\x32,.operations_research.math_opt.ObjectiveProto:\x02\x38\x01\x1al\n\x15ObjectiveUpdatesEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.operations_research.math_opt.ObjectiveUpdatesProto:\x02\x38\x01\"\xb8\x01\n\x1cLinearConstraintUpdatesProto\x12K\n\x0clower_bounds\x18\x01 \x01(\x0b\x32\x35.operations_research.math_opt.SparseDoubleVectorProto\x12K\n\x0cupper_bounds\x18\x02 \x01(\x0b\x32\x35.operations_research.math_opt.SparseDoubleVectorProto\"\x9c\x02\n\x1fQuadraticConstraintUpdatesProto\x12\x1e\n\x16\x64\x65leted_constraint_ids\x18\x01 \x03(\x03\x12j\n\x0fnew_constraints\x18\x02 \x03(\x0b\x32Q.operations_research.math_opt.QuadraticConstraintUpdatesProto.NewConstraintsEntry\x1am\n\x13NewConstraintsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.operations_research.math_opt.QuadraticConstraintProto:\x02\x38\x01\"\xae\x02\n%SecondOrderConeConstraintUpdatesProto\x12\x1e\n\x16\x64\x65leted_constraint_ids\x18\x01 \x03(\x03\x12p\n\x0fnew_constraints\x18\x02 \x03(\x0b\x32W.operations_research.math_opt.SecondOrderConeConstraintUpdatesProto.NewConstraintsEntry\x1as\n\x13NewConstraintsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12K\n\x05value\x18\x02 \x01(\x0b\x32<.operations_research.math_opt.SecondOrderConeConstraintProto:\x02\x38\x01\"\x8a\x02\n\x19SosConstraintUpdatesProto\x12\x1e\n\x16\x64\x65leted_constraint_ids\x18\x01 \x03(\x03\x12\x64\n\x0fnew_constraints\x18\x02 \x03(\x0b\x32K.operations_research.math_opt.SosConstraintUpdatesProto.NewConstraintsEntry\x1ag\n\x13NewConstraintsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12?\n\x05value\x18\x02 \x01(\x0b\x32\x30.operations_research.math_opt.SosConstraintProto:\x02\x38\x01\"\x9c\x02\n\x1fIndicatorConstraintUpdatesProto\x12\x1e\n\x16\x64\x65leted_constraint_ids\x18\x01 \x03(\x03\x12j\n\x0fnew_constraints\x18\x02 \x03(\x0b\x32Q.operations_research.math_opt.IndicatorConstraintUpdatesProto.NewConstraintsEntry\x1am\n\x13NewConstraintsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.operations_research.math_opt.IndicatorConstraintProto:\x02\x38\x01\"\xa6\t\n\x10ModelUpdateProto\x12\x1c\n\x14\x64\x65leted_variable_ids\x18\x01 \x03(\x03\x12%\n\x1d\x64\x65leted_linear_constraint_ids\x18\x02 \x03(\x03\x12L\n\x10variable_updates\x18\x03 \x01(\x0b\x32\x32.operations_research.math_opt.VariableUpdatesProto\x12]\n\x19linear_constraint_updates\x18\x04 \x01(\x0b\x32:.operations_research.math_opt.LinearConstraintUpdatesProto\x12\x43\n\rnew_variables\x18\x05 \x01(\x0b\x32,.operations_research.math_opt.VariablesProto\x12T\n\x16new_linear_constraints\x18\x06 \x01(\x0b\x32\x34.operations_research.math_opt.LinearConstraintsProto\x12N\n\x11objective_updates\x18\x07 \x01(\x0b\x32\x33.operations_research.math_opt.ObjectiveUpdatesProto\x12\x63\n\x1c\x61uxiliary_objectives_updates\x18\r \x01(\x0b\x32=.operations_research.math_opt.AuxiliaryObjectivesUpdatesProto\x12_\n linear_constraint_matrix_updates\x18\x08 \x01(\x0b\x32\x35.operations_research.math_opt.SparseDoubleMatrixProto\x12\x63\n\x1cquadratic_constraint_updates\x18\t \x01(\x0b\x32=.operations_research.math_opt.QuadraticConstraintUpdatesProto\x12q\n$second_order_cone_constraint_updates\x18\x0e \x01(\x0b\x32\x43.operations_research.math_opt.SecondOrderConeConstraintUpdatesProto\x12X\n\x17sos1_constraint_updates\x18\n \x01(\x0b\x32\x37.operations_research.math_opt.SosConstraintUpdatesProto\x12X\n\x17sos2_constraint_updates\x18\x0b \x01(\x0b\x32\x37.operations_research.math_opt.SosConstraintUpdatesProto\x12\x63\n\x1cindicator_constraint_updates\x18\x0c \x01(\x0b\x32=.operations_research.math_opt.IndicatorConstraintUpdatesProtoB\x1e\n\x1a\x63om.google.ortools.mathoptP\x01\x62\x06proto3')
30
31_globals = globals()
32_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ortools.math_opt.model_update_pb2', _globals)
34if not _descriptor._USE_C_DESCRIPTORS:
35  _globals['DESCRIPTOR']._loaded_options = None
36  _globals['DESCRIPTOR']._serialized_options = b'\n\032com.google.ortools.mathoptP\001'
37  _globals['_AUXILIARYOBJECTIVESUPDATESPROTO_NEWOBJECTIVESENTRY']._loaded_options = None
38  _globals['_AUXILIARYOBJECTIVESUPDATESPROTO_NEWOBJECTIVESENTRY']._serialized_options = b'8\001'
39  _globals['_AUXILIARYOBJECTIVESUPDATESPROTO_OBJECTIVEUPDATESENTRY']._loaded_options = None
40  _globals['_AUXILIARYOBJECTIVESUPDATESPROTO_OBJECTIVEUPDATESENTRY']._serialized_options = b'8\001'
41  _globals['_QUADRATICCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._loaded_options = None
42  _globals['_QUADRATICCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_options = b'8\001'
43  _globals['_SECONDORDERCONECONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._loaded_options = None
44  _globals['_SECONDORDERCONECONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_options = b'8\001'
45  _globals['_SOSCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._loaded_options = None
46  _globals['_SOSCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_options = b'8\001'
47  _globals['_INDICATORCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._loaded_options = None
48  _globals['_INDICATORCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_options = b'8\001'
49  _globals['_VARIABLEUPDATESPROTO']._serialized_start=142
50  _globals['_VARIABLEUPDATESPROTO']._serialized_end=389
51  _globals['_OBJECTIVEUPDATESPROTO']._serialized_start=392
52  _globals['_OBJECTIVEUPDATESPROTO']._serialized_end=734
53  _globals['_AUXILIARYOBJECTIVESUPDATESPROTO']._serialized_start=737
54  _globals['_AUXILIARYOBJECTIVESUPDATESPROTO']._serialized_end=1229
55  _globals['_AUXILIARYOBJECTIVESUPDATESPROTO_NEWOBJECTIVESENTRY']._serialized_start=1021
56  _globals['_AUXILIARYOBJECTIVESUPDATESPROTO_NEWOBJECTIVESENTRY']._serialized_end=1119
57  _globals['_AUXILIARYOBJECTIVESUPDATESPROTO_OBJECTIVEUPDATESENTRY']._serialized_start=1121
58  _globals['_AUXILIARYOBJECTIVESUPDATESPROTO_OBJECTIVEUPDATESENTRY']._serialized_end=1229
59  _globals['_LINEARCONSTRAINTUPDATESPROTO']._serialized_start=1232
60  _globals['_LINEARCONSTRAINTUPDATESPROTO']._serialized_end=1416
61  _globals['_QUADRATICCONSTRAINTUPDATESPROTO']._serialized_start=1419
62  _globals['_QUADRATICCONSTRAINTUPDATESPROTO']._serialized_end=1703
63  _globals['_QUADRATICCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_start=1594
64  _globals['_QUADRATICCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_end=1703
65  _globals['_SECONDORDERCONECONSTRAINTUPDATESPROTO']._serialized_start=1706
66  _globals['_SECONDORDERCONECONSTRAINTUPDATESPROTO']._serialized_end=2008
67  _globals['_SECONDORDERCONECONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_start=1893
68  _globals['_SECONDORDERCONECONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_end=2008
69  _globals['_SOSCONSTRAINTUPDATESPROTO']._serialized_start=2011
70  _globals['_SOSCONSTRAINTUPDATESPROTO']._serialized_end=2277
71  _globals['_SOSCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_start=2174
72  _globals['_SOSCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_end=2277
73  _globals['_INDICATORCONSTRAINTUPDATESPROTO']._serialized_start=2280
74  _globals['_INDICATORCONSTRAINTUPDATESPROTO']._serialized_end=2564
75  _globals['_INDICATORCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_start=2455
76  _globals['_INDICATORCONSTRAINTUPDATESPROTO_NEWCONSTRAINTSENTRY']._serialized_end=2564
77  _globals['_MODELUPDATEPROTO']._serialized_start=2567
78  _globals['_MODELUPDATEPROTO']._serialized_end=3757
79# @@protoc_insertion_point(module_scope)
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = <google._upb._message.FileDescriptor object>
class VariableUpdatesProto(google._upb._message.Message, google.protobuf.message.Message):

Updates to existing variables in a ModelProto.

Applies only to existing variables in a model, for new variables, see ModelUpdateProto.new_variables.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class ObjectiveUpdatesProto(google._upb._message.Message, google.protobuf.message.Message):

Updates the objective of a Model, both for existing and new variables.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class AuxiliaryObjectivesUpdatesProto(google._upb._message.Message, google.protobuf.message.Message):

Updates the auxiliary objectives of a Model, both for existing and new variables. Auxiliary objectives can be deleted, added, or modified in place.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class AuxiliaryObjectivesUpdatesProto.NewObjectivesEntry(google._upb._message.Message, google.protobuf.message.Message):

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.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class AuxiliaryObjectivesUpdatesProto.ObjectiveUpdatesEntry(google._upb._message.Message, google.protobuf.message.Message):

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.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class LinearConstraintUpdatesProto(google._upb._message.Message, google.protobuf.message.Message):

Updates to existing linear constraints in a ModelProto.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class QuadraticConstraintUpdatesProto(google._upb._message.Message, google.protobuf.message.Message):

Updates to quadratic constraints; only addition and deletion, no support for in-place constraint updates.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class QuadraticConstraintUpdatesProto.NewConstraintsEntry(google._upb._message.Message, google.protobuf.message.Message):

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.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class SecondOrderConeConstraintUpdatesProto(google._upb._message.Message, google.protobuf.message.Message):

Updates to second-order cone constraints; only addition and deletion, no support for in-place constraint updates.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class SecondOrderConeConstraintUpdatesProto.NewConstraintsEntry(google._upb._message.Message, google.protobuf.message.Message):

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.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class SosConstraintUpdatesProto(google._upb._message.Message, google.protobuf.message.Message):

Data for updates to SOS1 and SOS2 constraints; only addition and deletion, no support for in-place constraint updates.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class SosConstraintUpdatesProto.NewConstraintsEntry(google._upb._message.Message, google.protobuf.message.Message):

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.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class IndicatorConstraintUpdatesProto(google._upb._message.Message, google.protobuf.message.Message):

Data for updates to indicator constraints; only addition and deletion, no support for in-place constraint updates.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class IndicatorConstraintUpdatesProto.NewConstraintsEntry(google._upb._message.Message, google.protobuf.message.Message):

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.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>
class ModelUpdateProto(google._upb._message.Message, google.protobuf.message.Message):

Updates to a ModelProto.

DESCRIPTOR: google.protobuf.descriptor.Descriptor = <google._upb._message.Descriptor object>