14 #ifndef OR_TOOLS_SAT_CP_MODEL_SOLVER_H_
15 #define OR_TOOLS_SAT_CP_MODEL_SOLVER_H_
22 #include "ortools/sat/cp_model.pb.h"
24 #include "ortools/sat/sat_parameters.pb.h"
34 const SatParameters& params);
46 bool has_objective =
true);
61 #if !defined(__PORTABLE_PLATFORM__)
67 const std::string& params);
79 const std::function<
void(
const CpSolverResponse&
response)>& observer);
102 #if !defined(__PORTABLE_PLATFORM__)
104 const std::string& params);
Class that owns everything related to a particular optimization model.
CpModelProto const * model_proto
SharedResponseManager * response
std::function< void(Model *)> NewFeasibleSolutionObserver(const std::function< void(const CpSolverResponse &response)> &observer)
Creates a solution observer with the model with model.Add(NewFeasibleSolutionObserver([](response){....
std::function< SatParameters(Model *)> NewSatParameters(const std::string ¶ms)
Creates parameters for the solver, which you can add to the model with.
std::string CpSolverResponseStats(const CpSolverResponse &response, bool has_objective)
Returns a string with some statistics on the solver response.
std::string CpModelStats(const CpModelProto &model_proto)
Returns a string with some statistics on the given CpModelProto.
CpSolverResponse SolveCpModel(const CpModelProto &model_proto, Model *model)
Solves the given CpModelProto.
void SetSynchronizationFunction(std::function< CpSolverResponse()> f, Model *model)
If set, the underlying solver will call this function regularly in a deterministic way.
CpSolverResponse SolveWithParameters(const CpModelProto &model_proto, const SatParameters ¶ms)
Solves the given CpModelProto with the given parameters.
CpSolverResponse Solve(const CpModelProto &model_proto)
Solves the given CpModelProto and returns an instance of CpSolverResponse.
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...