Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: boolean_problem
Note: This documentation is automatically generated.
Function |
Type |
Arguments |
Comments |
AddObjectiveConstraint | Return type: bool Arguments: const LinearBooleanProblem& problem, bool use_lower_bound, Coefficient lower_bound, bool use_upper_bound, Coefficient upper_bound, SatSolver* solver |
AddObjectiveUpperBound | Return type: bool Arguments: const LinearBooleanProblem& problem, Coefficient upper_bound, SatSolver* solver |
AddOffsetAndScaleObjectiveValue | Return type: inline double Arguments: const LinearBooleanProblem& problem, Coefficient v |
ApplyLiteralMappingToBooleanProblem | Return type: void Arguments: const absl::StrongVector<LiteralIndex, LiteralIndex>& mapping, LinearBooleanProblem* problem |
BooleanProblemToCpModelproto | Return type: CpModelProto Arguments: const LinearBooleanProblem& problem |
ChangeOptimizationDirection | Return type: void Arguments: LinearBooleanProblem* problem |
ComputeObjectiveValue | Return type: Coefficient Arguments: const LinearBooleanProblem& problem, const std::vector<bool>& assignment |
FindLinearBooleanProblemSymmetries | Return type: void Arguments: const LinearBooleanProblem& problem, std::vector<std::unique_ptr<SparsePermutation>>* generators |
IsAssignmentValid | Return type: bool Arguments: const LinearBooleanProblem& problem, const std::vector<bool>& assignment |
LinearBooleanProblemToCnfString | Return type: std::string Arguments: const LinearBooleanProblem& problem |
LoadAndConsumeBooleanProblem | Return type: bool Arguments: LinearBooleanProblem* problem, SatSolver* solver |
LoadBooleanProblem | Return type: bool Arguments: const LinearBooleanProblem& problem, SatSolver* solver |
MakeAllLiteralsPositive | Return type: void Arguments: LinearBooleanProblem* problem |
ProbeAndSimplifyProblem | Return type: void Arguments: SatPostsolver* postsolver, LinearBooleanProblem* problem |
StoreAssignment | Return type: void Arguments: const VariablesAssignment& assignment, BooleanAssignment* output |
UseObjectiveForSatAssignmentPreference | Return type: void Arguments: const LinearBooleanProblem& problem, SatSolver* solver |
ValidateBooleanProblem | Return type: absl::Status Arguments: const LinearBooleanProblem& problem |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eThis documentation provides an overview of C++ functions related to the \u003ccode\u003eLinearBooleanProblem\u003c/code\u003e, which is designed for handling boolean satisfiability and optimization problems.\u003c/p\u003e\n"],["\u003cp\u003eThe functions allow for various operations, including adding constraints and objectives, manipulating the objective function, and converting the problem to different formats, such as \u003ccode\u003eCpModelProto\u003c/code\u003e and CNF strings.\u003c/p\u003e\n"],["\u003cp\u003eThere are also utilities to interact with \u003ccode\u003eSatSolver\u003c/code\u003e, such as loading, validating, and extracting assignments for boolean variables, as well as simplifying problems and finding symmetries.\u003c/p\u003e\n"],["\u003cp\u003eFunctions are available for checking assignment validity, computing the objective value, and manipulating objective bounds.\u003c/p\u003e\n"],["\u003cp\u003eThe functions are primarily about manipulating and interacting with the data structure \u003ccode\u003eLinearBooleanProblem\u003c/code\u003e.\u003c/p\u003e\n"]]],["This document details functions for managing and manipulating `LinearBooleanProblem` objects within the OR-Tools C++ library. Key actions include adding objective constraints or upper bounds, adjusting objective values, and converting between problem formats. Other operations include: mapping literals, changing optimization direction, computing objective values, extracting assignments or subproblems, finding symmetries, validating the boolean problem, loading problems, making literals positive, and using objectives for preferences. There are also some functions to store and probe the problems.\n"],null,["# boolean_problem\n\nC++ Reference: boolean_problem\n==============================\n\n\nNote: This documentation is automatically generated.\n\n| Function | Type | Arguments | Comments |\n|----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|----------|\n| [`AddObjectiveConstraint`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L82) | Return type: `bool ` Arguments: `const LinearBooleanProblem& problem, bool use_lower_bound, Coefficient lower_bound, bool use_upper_bound, Coefficient upper_bound, SatSolver* solver` \u003cbr /\u003e |\n| [`AddObjectiveUpperBound`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L77) | Return type: `bool ` Arguments: `const LinearBooleanProblem& problem, Coefficient upper_bound, SatSolver* solver` \u003cbr /\u003e |\n| [`AddOffsetAndScaleObjectiveValue`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L39) | Return type: `inline double ` Arguments: ` const LinearBooleanProblem& problem, Coefficient v` \u003cbr /\u003e |\n| [`ApplyLiteralMappingToBooleanProblem`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L131) | Return type: `void ` Arguments: ` const absl::StrongVector\u003cLiteralIndex, LiteralIndex\u003e& mapping, LinearBooleanProblem* problem` \u003cbr /\u003e |\n| [`BooleanProblemToCpModelproto`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L36) | Return type: `CpModelProto ` Arguments: `const LinearBooleanProblem& problem` \u003cbr /\u003e |\n| [`ChangeOptimizationDirection`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L50) | Return type: `void ` Arguments: `LinearBooleanProblem* problem` \u003cbr /\u003e |\n| [`ComputeObjectiveValue`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L88) | Return type: `Coefficient ` Arguments: `const LinearBooleanProblem& problem, const std::vector\u003cbool\u003e& assignment` \u003cbr /\u003e |\n| [`ExtractAssignment`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L54) | Return type: `void ` Arguments: `const LinearBooleanProblem& problem, const SatSolver& solver, std::vector\u003cbool\u003e* assignment` \u003cbr /\u003e |\n| [`ExtractSubproblem`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L108) | Return type: `void ` Arguments: `const LinearBooleanProblem& problem, const std::vector\u003cint\u003e& constraint_indices, LinearBooleanProblem* subproblem` \u003cbr /\u003e |\n| [`FindLinearBooleanProblemSymmetries`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L120) | Return type: `void ` Arguments: ` const LinearBooleanProblem& problem, std::vector\u003cstd::unique_ptr\u003cSparsePermutation\u003e\u003e* generators` \u003cbr /\u003e |\n| [`IsAssignmentValid`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L92) | Return type: `bool ` Arguments: `const LinearBooleanProblem& problem, const std::vector\u003cbool\u003e& assignment` \u003cbr /\u003e |\n| [`LinearBooleanProblemToCnfString`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L98) | Return type: `std::string ` Arguments: ` const LinearBooleanProblem& problem` \u003cbr /\u003e |\n| [`LoadAndConsumeBooleanProblem`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L68) | Return type: `bool ` Arguments: `LinearBooleanProblem* problem, SatSolver* solver` \u003cbr /\u003e |\n| [`LoadBooleanProblem`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L62) | Return type: `bool ` Arguments: `const LinearBooleanProblem& problem, SatSolver* solver` \u003cbr /\u003e |\n| [`MakeAllLiteralsPositive`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L114) | Return type: `void ` Arguments: `LinearBooleanProblem* problem` \u003cbr /\u003e |\n| [`ProbeAndSimplifyProblem`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L139) | Return type: `void ` Arguments: `SatPostsolver* postsolver, LinearBooleanProblem* problem` \u003cbr /\u003e |\n| [`StoreAssignment`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L104) | Return type: `void ` Arguments: `const VariablesAssignment& assignment, BooleanAssignment* output` \u003cbr /\u003e |\n| [`UseObjectiveForSatAssignmentPreference`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L73) | Return type: `void ` Arguments: `const LinearBooleanProblem& problem, SatSolver* solver` \u003cbr /\u003e |\n| [`ValidateBooleanProblem`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/boolean_problem.h#L59) | Return type: `absl::Status ` Arguments: `const LinearBooleanProblem& problem` \u003cbr /\u003e |"]]