Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <solution.h>
Public Member Functions | |
DualSolutionProto | Proto () const |
Returns the proto equivalent of this. | |
Static Public Member Functions | |
static absl::StatusOr< DualSolution > | FromProto (const ModelStorage *model, const DualSolutionProto &dual_solution_proto) |
Public Attributes | |
LinearConstraintMap< double > | dual_values |
absl::flat_hash_map< QuadraticConstraint, double > | quadratic_dual_values |
VariableMap< double > | reduced_costs |
std::optional< double > | objective_value |
SolutionStatus | feasibility_status = SolutionStatus::kUndetermined |
A solution to the dual of an optimization problem.
E.g. consider the primal dual pair linear program pair: (Primal) (Dual) min c * x max b * y s.t. A * x >= b s.t. y * A + r = c x >= 0 y, r >= 0. The dual solution is the pair (y, r). It is feasible if it satisfies the constraints from (Dual) above.
Below, y is dual_values, r is reduced_costs, and b * y is objective value.
Definition at line 134 of file solution.h.
|
static |
Returns the DualSolution equivalent of dual_solution_proto.
Returns an error when any of:
Definition at line 122 of file solution.cc.
DualSolutionProto operations_research::math_opt::DualSolution::Proto | ( | ) | const |
Returns the proto equivalent of this.
Definition at line 149 of file solution.cc.
LinearConstraintMap<double> operations_research::math_opt::DualSolution::dual_values |
Definition at line 147 of file solution.h.
SolutionStatus operations_research::math_opt::DualSolution::feasibility_status = SolutionStatus::kUndetermined |
Definition at line 156 of file solution.h.
std::optional<double> operations_research::math_opt::DualSolution::objective_value |
Definition at line 154 of file solution.h.
absl::flat_hash_map<QuadraticConstraint, double> operations_research::math_opt::DualSolution::quadratic_dual_values |
Definition at line 152 of file solution.h.
VariableMap<double> operations_research::math_opt::DualSolution::reduced_costs |
Definition at line 153 of file solution.h.