17#ifndef OR_TOOLS_MATH_OPT_CPP_MODEL_SOLVE_PARAMETERS_H_
18#define OR_TOOLS_MATH_OPT_CPP_MODEL_SOLVE_PARAMETERS_H_
23#include <initializer_list>
27#include "absl/container/flat_hash_set.h"
28#include "absl/status/status.h"
29#include "absl/status/statusor.h"
30#include "absl/time/time.h"
36#include "ortools/math_opt/model_parameters.pb.h"
67 template <
typename Collection>
69 const Collection& variables);
83 std::initializer_list<Variable> variables);
137 SolutionHintProto
Proto()
const;
143 static absl::StatusOr<SolutionHint>
FromProto(
144 const Model& model,
const SolutionHintProto& hint_proto);
199 absl::StatusOr<ObjectiveParametersProto>
Proto()
const;
201 static absl::StatusOr<ObjectiveParameters>
FromProto(
202 const ObjectiveParametersProto& proto);
224 absl::StatusOr<ModelSolveParametersProto>
Proto()
const;
228 static absl::StatusOr<ModelSolveParameters>
FromProto(
229 const Model& model,
const ModelSolveParametersProto& proto);
236template <
typename Collection>
238 const Collection& variables) {
An object oriented wrapper for quadratic constraints in ModelStorage.
absl::flat_hash_map< Variable, V > VariableMap
absl::flat_hash_map< LinearConstraint, V > LinearConstraintMap
absl::flat_hash_map< Objective, V > ObjectiveMap
MapFilter< ValueType > MakeKeepKeysFilter(const Collection &keys)
In SWIG mode, we don't want anything besides these top-level includes.
Parameters for an individual objective in a multi-objective model.
std::optional< double > objective_degradation_relative_tolerance
absl::Duration time_limit
static absl::StatusOr< ObjectiveParameters > FromProto(const ObjectiveParametersProto &proto)
std::optional< double > objective_degradation_absolute_tolerance
absl::StatusOr< ObjectiveParametersProto > Proto() const
Returns the proto equivalent of this object.
static absl::StatusOr< SolutionHint > FromProto(const Model &model, const SolutionHintProto &hint_proto)
LinearConstraintMap< double > dual_values
absl::Status CheckModelStorage(const ModelStorage *expected_storage) const
SolutionHintProto Proto() const
VariableMap< double > variable_values
absl::Status CheckModelStorage(const ModelStorage *expected_storage) const
MapFilter< QuadraticConstraint > quadratic_dual_values_filter
MapFilter< LinearConstraint > dual_values_filter
The filter that is applied to dual_values of DualSolution and DualRay.
MapFilter< Variable > variable_values_filter
ObjectiveMap< ObjectiveParameters > objective_parameters
Parameters for individual objectives in a multi-objective model.
std::optional< Basis > initial_basis
static ModelSolveParameters OnlySomePrimalVariables(const Collection &variables)
VariableMap< int32_t > branching_priorities
static ModelSolveParameters OnlyPrimalVariables()
absl::StatusOr< ModelSolveParametersProto > Proto() const
MapFilter< Variable > reduced_costs_filter
The filter that is applied to reduced_costs of DualSolution and DualRay.
static absl::StatusOr< ModelSolveParameters > FromProto(const Model &model, const ModelSolveParametersProto &proto)
absl::flat_hash_set< LinearConstraint > lazy_linear_constraints
std::vector< SolutionHint > solution_hints