ortools.set_cover.capacity_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.
1# -*- coding: utf-8 -*- 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# NO CHECKED-IN PROTOBUF GENCODE 4# source: ortools/set_cover/capacity.proto 5# Protobuf Python Version: 6.33.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 33, 16 1, 17 '', 18 'ortools/set_cover/capacity.proto' 19) 20# @@protoc_insertion_point(imports) 21 22_sym_db = _symbol_database.Default() 23 24 25 26 27DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n ortools/set_cover/capacity.proto\x12\x13operations_research\"\xd4\x02\n\x17\x43\x61pacityConstraintProto\x12P\n\rcapacity_term\x18\x01 \x03(\x0b\x32\x39.operations_research.CapacityConstraintProto.CapacityTerm\x12\x14\n\x0cmin_capacity\x18\x02 \x01(\x03\x12\x14\n\x0cmax_capacity\x18\x03 \x01(\x03\x1a\xba\x01\n\x0c\x43\x61pacityTerm\x12\x0e\n\x06subset\x18\x01 \x01(\x03\x12\x64\n\x0f\x65lement_weights\x18\x02 \x03(\x0b\x32K.operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair\x1a\x34\n\x11\x45lementWeightPair\x12\x0f\n\x07\x65lement\x18\x01 \x01(\x03\x12\x0e\n\x06weight\x18\x02 \x01(\x03\x42\x1f\n\x1b\x63om.google.ortools.setcoverP\x01\x62\x06proto3') 28 29_globals = globals() 30_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) 31_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ortools.set_cover.capacity_pb2', _globals) 32if not _descriptor._USE_C_DESCRIPTORS: 33 _globals['DESCRIPTOR']._loaded_options = None 34 _globals['DESCRIPTOR']._serialized_options = b'\n\033com.google.ortools.setcoverP\001' 35 _globals['_CAPACITYCONSTRAINTPROTO']._serialized_start=58 36 _globals['_CAPACITYCONSTRAINTPROTO']._serialized_end=398 37 _globals['_CAPACITYCONSTRAINTPROTO_CAPACITYTERM']._serialized_start=212 38 _globals['_CAPACITYCONSTRAINTPROTO_CAPACITYTERM']._serialized_end=398 39 _globals['_CAPACITYCONSTRAINTPROTO_CAPACITYTERM_ELEMENTWEIGHTPAIR']._serialized_start=346 40 _globals['_CAPACITYCONSTRAINTPROTO_CAPACITYTERM_ELEMENTWEIGHTPAIR']._serialized_end=398 41# @@protoc_insertion_point(module_scope)
Represents a capacity constraint to be used in conjunction with a SetCoverProto. This constraint only considers one dimension.
Such a capacity constraint mathematically looks like:
min_capacity <= \sum_{e in elements} weight_e * x_e <= max_capacity
where either min_capacity or max_capacity can be omitted. x_e indicates
for a given solution x whether the element e is selected and counts for
this capacity constraint (x_e == 1) or not (x_e == 0). The weights are
given in capacity_term, each of them being a reference to an element being
present in a subset (in set-covering parlance) and its weight.
For instance, this constraint can be used together with a set-covering problem where parcels (element) must be covered by trucks (subsets) while respecting truck capacities (this object). Each element can be covered by a given set of trucks (set-covering problem); if an element is taken within a truck, it uses some capacity for this truck (such as weight).
In particular, this representation does not imply that a given element must have the same weight in all the capacity constraints of a set-covering problem (e.g., the same parcel might have different weights depending on which truck is being considered).
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.
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.