17#ifndef OR_TOOLS_MATH_OPT_CPP_SOLUTION_H_
18#define OR_TOOLS_MATH_OPT_CPP_SOLUTION_H_
22#include "absl/container/flat_hash_map.h"
23#include "absl/status/status.h"
24#include "absl/status/statusor.h"
69 static absl::StatusOr<PrimalSolution>
FromProto(
113 static absl::StatusOr<PrimalRay>
FromProto(
140 static absl::StatusOr<DualSolution>
FromProto(
263 static absl::StatusOr<Solution>
FromProto(
#define MATH_OPT_DEFINE_ENUM(CppEnum, proto_unspecified_value)
An object oriented wrapper for quadratic constraints in ModelStorage.
absl::flat_hash_map< Variable, V > VariableMap
absl::Nonnull< const ModelStorage * > ModelStorageCPtr
@ SOLUTION_STATUS_UNDETERMINED
@ SOLUTION_STATUS_INFEASIBLE
@ SOLUTION_STATUS_UNSPECIFIED
@ SOLUTION_STATUS_FEASIBLE
absl::flat_hash_map< LinearConstraint, V > LinearConstraintMap
SolutionStatus
Feasibility of a primal or dual solution as claimed by the solver.
@ kUndetermined
Solver does not claim a feasibility status.
@ kFeasible
Solver claims the solution is feasible.
@ kInfeasible
Solver claims the solution is infeasible.
In SWIG mode, we don't want anything besides these top-level includes.
absl::Status CheckModelStorage(ModelStorageCPtr expected_storage) const
LinearConstraintMap< BasisStatus > constraint_status
VariableMap< BasisStatus > variable_status
std::optional< SolutionStatus > basic_dual_feasibility
static absl::StatusOr< Basis > FromProto(ModelStorageCPtr model, const BasisProto &basis_proto)
DualRayProto Proto() const
Returns the proto equivalent of this.
static absl::StatusOr< DualRay > FromProto(ModelStorageCPtr model, const DualRayProto &dual_ray_proto)
LinearConstraintMap< double > dual_values
VariableMap< double > reduced_costs
LinearConstraintMap< double > dual_values
static absl::StatusOr< DualSolution > FromProto(ModelStorageCPtr model, const DualSolutionProto &dual_solution_proto)
absl::flat_hash_map< QuadraticConstraint, double > quadratic_dual_values
std::optional< double > objective_value
DualSolutionProto Proto() const
Returns the proto equivalent of this.
SolutionStatus feasibility_status
VariableMap< double > reduced_costs
PrimalRayProto Proto() const
Returns the proto equivalent of this.
VariableMap< double > variable_values
static absl::StatusOr< PrimalRay > FromProto(ModelStorageCPtr model, const PrimalRayProto &primal_ray_proto)
absl::flat_hash_map< Objective, double > auxiliary_objective_values
PrimalSolutionProto Proto() const
Returns the proto equivalent of this.
static absl::StatusOr< PrimalSolution > FromProto(ModelStorageCPtr model, const PrimalSolutionProto &primal_solution_proto)
SolutionStatus feasibility_status
double get_objective_value(Objective objective) const
VariableMap< double > variable_values
std::optional< Basis > basis
std::optional< PrimalSolution > primal_solution
std::optional< DualSolution > dual_solution
SolutionProto Proto() const
Returns the proto equivalent of this.
static absl::StatusOr< Solution > FromProto(ModelStorageCPtr model, const SolutionProto &solution_proto)