ortools.sat.boolean_problem_pb2
@generated by mypy-protobuf. Do not edit manually! isort:skip_file Protocol buffer to encode a Boolean satisfiability/optimization problem.
1# -*- coding: utf-8 -*- 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# NO CHECKED-IN PROTOBUF GENCODE 4# source: ortools/sat/boolean_problem.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/sat/boolean_problem.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/sat/boolean_problem.proto\x12\x17operations_research.sat\"{\n\x17LinearBooleanConstraint\x12\x10\n\x08literals\x18\x01 \x03(\x05\x12\x14\n\x0c\x63oefficients\x18\x02 \x03(\x03\x12\x13\n\x0blower_bound\x18\x03 \x01(\x03\x12\x13\n\x0bupper_bound\x18\x04 \x01(\x03\x12\x0e\n\x04name\x18\x05 \x01(\t:\x00\"g\n\x0fLinearObjective\x12\x10\n\x08literals\x18\x01 \x03(\x05\x12\x14\n\x0c\x63oefficients\x18\x02 \x03(\x03\x12\x11\n\x06offset\x18\x03 \x01(\x01:\x01\x30\x12\x19\n\x0escaling_factor\x18\x04 \x01(\x01:\x01\x31\"%\n\x11\x42ooleanAssignment\x12\x10\n\x08literals\x18\x01 \x03(\x05\"\xb4\x02\n\x14LinearBooleanProblem\x12\x0e\n\x04name\x18\x01 \x01(\t:\x00\x12\x15\n\rnum_variables\x18\x03 \x01(\x05\x12\x45\n\x0b\x63onstraints\x18\x04 \x03(\x0b\x32\x30.operations_research.sat.LinearBooleanConstraint\x12;\n\tobjective\x18\x05 \x01(\x0b\x32(.operations_research.sat.LinearObjective\x12\x11\n\tvar_names\x18\x06 \x03(\t\x12>\n\nassignment\x18\x07 \x01(\x0b\x32*.operations_research.sat.BooleanAssignment\x12\x1e\n\x16original_num_variables\x18\x08 \x01(\x05\x42/\n\x16\x63om.google.ortools.satP\x01\xaa\x02\x12Google.OrTools.Sat') 28 29_globals = globals() 30_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) 31_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ortools.sat.boolean_problem_pb2', _globals) 32if not _descriptor._USE_C_DESCRIPTORS: 33 _globals['DESCRIPTOR']._loaded_options = None 34 _globals['DESCRIPTOR']._serialized_options = b'\n\026com.google.ortools.satP\001\252\002\022Google.OrTools.Sat' 35 _globals['_LINEARBOOLEANCONSTRAINT']._serialized_start=62 36 _globals['_LINEARBOOLEANCONSTRAINT']._serialized_end=185 37 _globals['_LINEAROBJECTIVE']._serialized_start=187 38 _globals['_LINEAROBJECTIVE']._serialized_end=290 39 _globals['_BOOLEANASSIGNMENT']._serialized_start=292 40 _globals['_BOOLEANASSIGNMENT']._serialized_end=329 41 _globals['_LINEARBOOLEANPROBLEM']._serialized_start=332 42 _globals['_LINEARBOOLEANPROBLEM']._serialized_end=640 43# @@protoc_insertion_point(module_scope)
A linear Boolean constraint which is a bounded sum of linear terms. Each term beeing a literal times an integer coefficient. If we assume that a literal takes the value 1 if it is true and 0 otherwise, the constraint is: lower_bound <= ... + coefficients[i] * literals[i] + ... <= upper_bound
The objective of an optimization problem.
Stores an assignment of variables as a list of true literals using their signed representation. There will be at most one literal per variable. The literals will be sorted by increasing variable index. The assignment may be partial in the sense that some variables may not appear and thus not be assigned.
A linear Boolean problem.