![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
The solution to an optimization problem defined by Model in model.py.
Classes | |
| class | Basis |
| class | BasisStatus |
| class | DualRay |
| class | DualSolution |
| class | PrimalRay |
| class | PrimalSolution |
| class | Solution |
| class | SolutionStatus |
Functions | |
| Optional[SolutionStatus] | parse_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, *, bool validate=True) |
| PrimalRay | parse_primal_ray (solution_pb2.PrimalRayProto proto, model.Model mod, *, bool validate=True) |
| DualSolution | parse_dual_solution (solution_pb2.DualSolutionProto proto, model.Model mod, *, bool validate=True) |
| DualRay | parse_dual_ray (solution_pb2.DualRayProto proto, model.Model mod, *, bool validate=True) |
| Basis | parse_basis (solution_pb2.BasisProto proto, model.Model mod, *, bool validate=True) |
| solution_pb2.SparseBasisStatusVector | _to_sparse_basis_status_vector_proto (Dict[T, BasisStatus] terms) |
| Solution | parse_solution (solution_pb2.SolutionProto proto, model.Model mod, *, bool validate=True) |
Variables | |
| T = TypeVar("T", variables.Variable, linear_constraints.LinearConstraint) | |
|
protected |
Converts a basis vector from a python Dict to a protocol buffer.
Definition at line 456 of file solution.py.
| 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 76 of file solution.py.
| Basis ortools.math_opt.python.solution.parse_basis | ( | solution_pb2.BasisProto | proto, |
| model.Model | mod, | ||
| * | , | ||
| bool | validate = True ) |
Returns an equivalent Basis to the input proto.
Definition at line 428 of file solution.py.
| DualRay ortools.math_opt.python.solution.parse_dual_ray | ( | solution_pb2.DualRayProto | proto, |
| model.Model | mod, | ||
| * | , | ||
| bool | validate = True ) |
Returns an equivalent DualRay from the input proto.
Definition at line 345 of file solution.py.
| DualSolution ortools.math_opt.python.solution.parse_dual_solution | ( | solution_pb2.DualSolutionProto | proto, |
| model.Model | mod, | ||
| * | , | ||
| bool | validate = True ) |
Returns an equivalent DualSolution from the input proto.
Definition at line 268 of file solution.py.
| 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 65 of file solution.py.
| PrimalRay ortools.math_opt.python.solution.parse_primal_ray | ( | solution_pb2.PrimalRayProto | proto, |
| model.Model | mod, | ||
| * | , | ||
| bool | validate = True ) |
Returns an equivalent PrimalRay from the input proto.
Definition at line 197 of file solution.py.
| PrimalSolution ortools.math_opt.python.solution.parse_primal_solution | ( | solution_pb2.PrimalSolutionProto | proto, |
| model.Model | mod, | ||
| * | , | ||
| bool | validate = True ) |
Returns an equivalent PrimalSolution from the input proto.
Definition at line 133 of file solution.py.
| Solution ortools.math_opt.python.solution.parse_solution | ( | solution_pb2.SolutionProto | proto, |
| model.Model | mod, | ||
| * | , | ||
| bool | validate = True ) |
Returns a Solution equivalent to the input proto.
Definition at line 496 of file solution.py.
| ortools.math_opt.python.solution.T = TypeVar("T", variables.Variable, linear_constraints.LinearConstraint) |
Definition at line 453 of file solution.py.