14#ifndef OR_TOOLS_SAT_CP_MODEL_SOLVER_H_
15#define OR_TOOLS_SAT_CP_MODEL_SOLVER_H_
20#include "absl/flags/declare.h"
21#include "ortools/sat/cp_model.pb.h"
23#include "ortools/sat/sat_parameters.pb.h"
34CpSolverResponse
Solve(
const CpModelProto& model_proto);
38 const SatParameters& params);
50 bool has_objective =
true);
65#if !defined(__PORTABLE_PLATFORM__)
71 const std::string& params);
94 const std::function<
void(
const CpSolverResponse& response)>& callback);
105 const std::function<std::string(
const CpSolverResponse& response)>&
115 const std::function<
void(
double)>& callback);
124#if !defined(__PORTABLE_PLATFORM__)
126 const std::string& params);
129 const SatParameters& parameters);
ABSL_DECLARE_FLAG(bool, cp_model_dump_response)
CpSolverResponse Solve(const CpModelProto &model_proto)
Solves the given CpModelProto and returns an instance of CpSolverResponse.
std::function< SatParameters(Model *)> NewSatParameters(const std::string ¶ms)
void LoadAndSolveCpModelForTest(const CpModelProto &model_proto, Model *model)
std::string CpModelStats(const CpModelProto &model_proto)
Returns a string with some statistics on the given CpModelProto.
std::string CpSatSolverVersion()
Returns a string that describes the version of the solver.
CpSolverResponse SolveCpModel(const CpModelProto &model_proto, Model *model)
std::function< void(Model *)> NewBestBoundCallback(const std::function< void(double)> &callback)
CpSolverResponse SolveWithParameters(const CpModelProto &model_proto, const SatParameters ¶ms)
Solves the given CpModelProto with the given parameters.
std::function< void(Model *)> NewFeasibleSolutionLogCallback(const std::function< std::string(const CpSolverResponse &response)> &callback)
std::function< void(Model *)> NewFeasibleSolutionObserver(const std::function< void(const CpSolverResponse &response)> &callback)
std::string CpSolverResponseStats(const CpSolverResponse &response, bool has_objective)
In SWIG mode, we don't want anything besides these top-level includes.