Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: cp_model_solver
Note: This documentation is automatically generated.
Function |
Type |
Arguments |
Comments |
CpModelStats | Return type: std::string Arguments: const CpModelProto& model |
CpSolverResponseStats | Return type: std::string Arguments: const CpSolverResponse& response, bool has_objective = true |
NewFeasibleSolutionObserver | Return type: std::function<void(Model*)> Arguments: const std::function<void(const CpSolverResponse& response)>& observer |
NewSatParameters | Return type: std::function<SatParameters(Model*)> Arguments: const std::string& params |
NewSatParameters | Return type: std::function<SatParameters(Model*)> Arguments: const SatParameters& parameters |
Solve | Return type: CpSolverResponse Arguments: const CpModelProto& model_proto |
SolveCpModel | Return type: CpSolverResponse Arguments: const CpModelProto& model_proto, Model* model |
SolveWithParameters | Return type: CpSolverResponse Arguments: const CpModelProto& model_proto, const SatParameters& params |
SolveWithParameters | Return type: CpSolverResponse Arguments: const CpModelProto& model_proto, const std::string& params |
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.
[null,null,["Last updated 2024-08-06 UTC."],[[["\u003cp\u003eThe \u003ccode\u003ecp_model_solver\u003c/code\u003e provides functions to solve Constraint Programming (CP) models using the CP-SAT solver.\u003c/p\u003e\n"],["\u003cp\u003eIt includes functions like \u003ccode\u003eSolve\u003c/code\u003e, \u003ccode\u003eSolveCpModel\u003c/code\u003e, and \u003ccode\u003eSolveWithParameters\u003c/code\u003e to find solutions for given CP models.\u003c/p\u003e\n"],["\u003cp\u003eUsers can obtain statistics about the model and solver response using \u003ccode\u003eCpModelStats\u003c/code\u003e and \u003ccode\u003eCpSolverResponseStats\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eFunctionality exists to create new feasible solution observers and define SAT parameters for the solver.\u003c/p\u003e\n"],["\u003cp\u003eAll functions primarily interact with \u003ccode\u003eCpModelProto\u003c/code\u003e, \u003ccode\u003eCpSolverResponse\u003c/code\u003e, and \u003ccode\u003eSatParameters\u003c/code\u003e data structures.\u003c/p\u003e\n"]]],["The core content outlines C++ functions for constraint programming model solving. Key actions include: generating statistics for a `CpModelProto` or `CpSolverResponse`, creating observers for feasible solutions, and defining `SatParameters`. Functions are provided to `Solve` a `CpModelProto` directly or with specific parameters, either as a string or as `SatParameters`. `SolveCpModel` is provided for solving a `CpModelProto` with a given model.\n"],null,["# cp_model_solver\n\nC++ Reference: cp_model_solver\n==============================\n\n\nNote: This documentation is automatically generated.\n\n| Function | Type | Arguments | Comments |\n|-----------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|-----------|----------|\n| [`CpModelStats`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_solver.h#L37) | Return type: `std::string ` Arguments: `const CpModelProto& model` \u003cbr /\u003e |\n| [`CpSolverResponseStats`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_solver.h#L45) | Return type: `std::string ` Arguments: `const CpSolverResponse& response, bool has_objective = true` \u003cbr /\u003e |\n| [`NewFeasibleSolutionObserver`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_solver.h#L89) | Return type: `std::function\u003cvoid(Model*)\u003e ` Arguments: ` const std::function\u003cvoid(const CpSolverResponse& response)\u003e& observer` \u003cbr /\u003e |\n| [`NewSatParameters`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_solver.h#L100) | Return type: `std::function\u003cSatParameters(Model*)\u003e ` Arguments: ` const std::string& params` \u003cbr /\u003e |\n| [`NewSatParameters`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_solver.h#L103) | Return type: `std::function\u003cSatParameters(Model*)\u003e ` Arguments: ` const SatParameters& parameters` \u003cbr /\u003e |\n| [`Solve`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_solver.h#L30) | Return type: `CpSolverResponse ` Arguments: `const CpModelProto& model_proto` \u003cbr /\u003e |\n| [`SolveCpModel`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_solver.h#L59) | Return type: `CpSolverResponse ` Arguments: `const CpModelProto& model_proto, Model* model` \u003cbr /\u003e |\n| [`SolveWithParameters`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_solver.h#L33) | Return type: `CpSolverResponse ` Arguments: `const CpModelProto& model_proto, const SatParameters& params` \u003cbr /\u003e |\n| [`SolveWithParameters`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_model_solver.h#L66) | Return type: `CpSolverResponse ` Arguments: `const CpModelProto& model_proto, const std::string& params` \u003cbr /\u003e |"]]