C++ Reference: class SatHelper

This documentation is automatically generated.

Method
ModelStats

Return type: static std::string

Arguments: const operations_research::sat::CpModelProto& model_proto

Returns a string with some statistics on the given CpModelProto.

Solve

Return type: static operations_research::sat::CpSolverResponse

Arguments: const operations_research::sat::CpModelProto& model_proto

The arguments of the functions defined below must follow these rules to be wrapped by swig correctly: 1) Their types must include the full operations_research::sat:: namespace. 2) Their names must correspond to the ones declared in the .i file (see the python/ and java/ subdirectories). 3) String variations of the parameters have been added for C# as C# protobufs do not support proto2.

SolverResponseStats

Return type: static std::string

Arguments: const operations_research::sat::CpSolverResponse& response

Returns a string with some statistics on the solver response.

SolveWithParameters

Return type: static operations_research::sat::CpSolverResponse

Arguments: const operations_research::sat::CpModelProto& model_proto, const operations_research::sat::SatParameters& parameters

SolveWithParametersAndSolutionCallback

Arguments: const operations_research::sat::CpModelProto& model_proto, const operations_research::sat::SatParameters& parameters, const SolutionCallback& callback

SolveWithStringParameters

Return type: static operations_research::sat::CpSolverResponse

Arguments: const operations_research::sat::CpModelProto& model_proto, const std::string& parameters

SolveWithStringParametersAndSolutionCallback

Arguments: const operations_research::sat::CpModelProto& model_proto, const std::string& parameters, const SolutionCallback& callback

ValidateModel

Return type: static std::string

Arguments: const operations_research::sat::CpModelProto& model_proto

Returns a non empty string explaining the issue if the model is not valid.

VariableDomain

Return type: static operations_research::Domain

Arguments: const operations_research::sat::IntegerVariableProto& variable_proto

Rebuilds a domain from an integer variable proto.

WriteModelToFile

Return type: static bool

Arguments: const operations_research::sat::CpModelProto& model_proto, const std::string& filename

Write the model proto to file.