Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
ortools.math_opt.python.solution Namespace Reference

Classes

class  Basis
 
class  BasisStatus
 
class  DualRay
 
class  DualSolution
 
class  PrimalRay
 
class  PrimalSolution
 
class  Solution
 
class  SolutionStatus
 

Functions

Optional[SolutionStatusparse_optional_solution_status (solution_pb2.SolutionStatusProto proto)
 
solution_pb2.SolutionStatusProto optional_solution_status_to_proto (Optional[SolutionStatus] status)
 
PrimalSolution parse_primal_solution (solution_pb2.PrimalSolutionProto proto, model.Model mod)
 
PrimalRay parse_primal_ray (solution_pb2.PrimalRayProto proto, model.Model mod)
 
DualSolution parse_dual_solution (solution_pb2.DualSolutionProto proto, model.Model mod)
 
DualRay parse_dual_ray (solution_pb2.DualRayProto proto, model.Model mod)
 
Basis parse_basis (solution_pb2.BasisProto proto, model.Model mod)
 
solution_pb2.SparseBasisStatusVector _to_sparse_basis_status_vector_proto (Dict[T, BasisStatus] terms)
 
Solution parse_solution (solution_pb2.SolutionProto proto, model.Model mod)
 

Variables

 T = TypeVar("T", model.Variable, model.LinearConstraint)
 

Detailed Description

The solution to an optimization problem defined by Model in model.py.

Function Documentation

◆ _to_sparse_basis_status_vector_proto()

solution_pb2.SparseBasisStatusVector ortools.math_opt.python.solution._to_sparse_basis_status_vector_proto ( Dict[T, BasisStatus] terms)
protected
Converts a basis vector from a python Dict to a protocol buffer.

Definition at line 387 of file solution.py.

◆ optional_solution_status_to_proto()

solution_pb2.SolutionStatusProto ortools.math_opt.python.solution.optional_solution_status_to_proto ( Optional[SolutionStatus] status)
Converts an optional Python SolutionStatus to a proto SolutionStatus.

Definition at line 72 of file solution.py.

◆ parse_basis()

Basis ortools.math_opt.python.solution.parse_basis ( solution_pb2.BasisProto proto,
model.Model mod )
Returns an equivalent Basis to the input proto.

Definition at line 363 of file solution.py.

◆ parse_dual_ray()

DualRay ortools.math_opt.python.solution.parse_dual_ray ( solution_pb2.DualRayProto proto,
model.Model mod )
Returns an equivalent DualRay from the input proto.

Definition at line 282 of file solution.py.

◆ parse_dual_solution()

DualSolution ortools.math_opt.python.solution.parse_dual_solution ( solution_pb2.DualSolutionProto proto,
model.Model mod )
Returns an equivalent DualSolution from the input proto.

Definition at line 224 of file solution.py.

◆ parse_optional_solution_status()

Optional[SolutionStatus] ortools.math_opt.python.solution.parse_optional_solution_status ( solution_pb2.SolutionStatusProto proto)
Converts a proto SolutionStatus to an optional Python SolutionStatus.

Definition at line 61 of file solution.py.

◆ parse_primal_ray()

PrimalRay ortools.math_opt.python.solution.parse_primal_ray ( solution_pb2.PrimalRayProto proto,
model.Model mod )
Returns an equivalent PrimalRay from the input proto.

Definition at line 168 of file solution.py.

◆ parse_primal_solution()

PrimalSolution ortools.math_opt.python.solution.parse_primal_solution ( solution_pb2.PrimalSolutionProto proto,
model.Model mod )
Returns an equivalent PrimalSolution from the input proto.

Definition at line 119 of file solution.py.

◆ parse_solution()

Solution ortools.math_opt.python.solution.parse_solution ( solution_pb2.SolutionProto proto,
model.Model mod )
Returns a Solution equivalent to the input proto.

Definition at line 427 of file solution.py.

Variable Documentation

◆ T

ortools.math_opt.python.solution.T = TypeVar("T", model.Variable, model.LinearConstraint)

Definition at line 384 of file solution.py.