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

Functions

optimization_pb2.SolveMathOptModelRequest convert_request (rpc_pb2.SolveRequest request)
 
rpc_pb2.SolveResponse convert_response (optimization_pb2.SolveMathOptModelResponse api_response)
 

Variables

tuple _UNSUPPORTED_SOLVER_SPECIFIC_PARAMETERS
 

Detailed Description

Conversion functions for MathOpt protos.

Provides several conversion functions to transform from/to protos exposed in the
Operations Research API to the internal protos in
/ortools/math_opt/.*.proto.

Function Documentation

◆ convert_request()

optimization_pb2.SolveMathOptModelRequest ortools.math_opt.python.ipc.proto_converter.convert_request ( rpc_pb2.SolveRequest request)
Converts a `SolveRequest` to a `SolveMathOptModelRequest`.

Args:
  request: A `SolveRequest` request built from a MathOpt model.

Returns:
  A `SolveMathOptModelRequest` for the Operations Research API.

Raises:
  ValueError: If a field that is not supported in the expernal proto is
    present in the request or if the request can't be parsed to a
    `SolveMathOptModelRequest`.

Definition at line 37 of file proto_converter.py.

◆ convert_response()

rpc_pb2.SolveResponse ortools.math_opt.python.ipc.proto_converter.convert_response ( optimization_pb2.SolveMathOptModelResponse api_response)
Converts a `SolveMathOptModelResponse` to a `SolveResponse`.

Args:
  api_response: A `SolveMathOptModelResponse` response built from a MathOpt
    model.

Returns:
  A `SolveResponse` response built from a MathOpt model.

Definition at line 69 of file proto_converter.py.

Variable Documentation

◆ _UNSUPPORTED_SOLVER_SPECIFIC_PARAMETERS

tuple ortools.math_opt.python.ipc.proto_converter._UNSUPPORTED_SOLVER_SPECIFIC_PARAMETERS
protected
Initial value:
1= (
2 "gscip",
3 "gurobi",
4 "glop",
5 "cp_sat",
6 "osqp",
7 "glpk",
8 "highs",
9)

Definition at line 26 of file proto_converter.py.