Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
cp_model_fz_solver.h
Go to the documentation of this file.
1// Copyright 2010-2025 Google LLC
2// Licensed under the Apache License, Version 2.0 (the "License");
3// you may not use this file except in compliance with the License.
4// You may obtain a copy of the License at
5//
6// http://www.apache.org/licenses/LICENSE-2.0
7//
8// Unless required by applicable law or agreed to in writing, software
9// distributed under the License is distributed on an "AS IS" BASIS,
10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11// See the License for the specific language governing permissions and
12// limitations under the License.
13
14#ifndef ORTOOLS_FLATZINC_CP_MODEL_FZ_SOLVER_H_
15#define ORTOOLS_FLATZINC_CP_MODEL_FZ_SOLVER_H_
16
17#include <string>
18
21#include "ortools/sat/model.h"
24
25namespace operations_research {
26namespace fz {
27
31 bool use_free_search = false;
32 bool log_search_progress = false;
33 bool display_statistics = false;
34 int random_seed = 0;
36 double max_time_in_seconds = 0.0;
37 bool ortools_mode = false;
38 bool check_all_solutions = false;
39};
40
41} // namespace fz
42
43namespace sat {
44
45// Scan the model to replace all int2float to int_eq, and all floating point
46// variables used in these int2float constraint to be integral.
47//
48// Scan the model to find a floating point objective (defined by a single
49// floating point variable and a single float_lin_eq constraint defining it),
50// and replace them by a single objective with integer variables and floating
51// point weights.
53
54// Solves the given flatzinc model using the CP-SAT solver.
55CpSolverResponse SolveFzWithCpModelProto(const fz::Model& model,
57 const SatParameters& sat_params,
58 Model* sat_model,
59 SolverLogger* solution_logger);
60
61} // namespace sat
62} // namespace operations_research
63
64#endif // ORTOOLS_FLATZINC_CP_MODEL_FZ_SOLVER_H_
Definition model.h:345
CpSolverResponse SolveFzWithCpModelProto(const fz::Model &fz_model, const fz::FlatzincSatParameters &p, const SatParameters &sat_params, Model *sat_model, SolverLogger *solution_logger)
void ProcessFloatingPointOVariablesAndObjective(fz::Model *fz_model)
OR-Tools root namespace.