Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::PrimalRay Struct Reference

#include <solution.h>

Public Member Functions

PrimalRayProto Proto () const
 Returns the proto equivalent of this.
 

Static Public Member Functions

static absl::StatusOr< PrimalRayFromProto (const ModelStorage *model, const PrimalRayProto &primal_ray_proto)
 

Public Attributes

VariableMap< double > variable_values
 

Detailed Description

A direction of unbounded improvement to an optimization problem; equivalently, a certificate of infeasibility for the dual of the optimization problem.

E.g. consider a simple linear program: min c * x s.t. A * x >= b x >= 0 A primal ray is an x that satisfies: c * x < 0 A * x >= 0 x >= 0 Observe that given a feasible solution, any positive multiple of the primal ray plus that solution is still feasible, and gives a better objective value. A primal ray also proves the dual optimization problem infeasible.

In the class PrimalRay, variable_values is this x.

For the general case of a MathOpt optimization model.

Definition at line 107 of file solution.h.

Member Function Documentation

◆ FromProto()

absl::StatusOr< PrimalRay > operations_research::math_opt::PrimalRay::FromProto ( const ModelStorage * model,
const PrimalRayProto & primal_ray_proto )
static

Returns the PrimalRay equivalent of primal_ray_proto.

Returns an error when VariableValuesFromProto(primal_ray_proto.variable_values) fails.

Definition at line 108 of file solution.cc.

◆ Proto()

PrimalRayProto operations_research::math_opt::PrimalRay::Proto ( ) const

Returns the proto equivalent of this.

Definition at line 118 of file solution.cc.

Member Data Documentation

◆ variable_values

VariableMap<double> operations_research::math_opt::PrimalRay::variable_values

Definition at line 118 of file solution.h.


The documentation for this struct was generated from the following files: