package operations_research.service.v1.mathopt

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

message BasisProto

solution.proto:210

A combinatorial characterization for a solution to a linear program. The simplex method for solving linear programs always returns a "basic feasible solution" which can be described combinatorially by a Basis. A basis assigns a BasisStatusProto for every variable and linear constraint. E.g. consider a standard form LP: min c * x s.t. A * x = b x >= 0 that has more variables than constraints and with full row rank A. Let n be the number of variables and m the number of linear constraints. A valid basis for this problem can be constructed as follows: * All constraints will have basis status FIXED. * Pick m variables such that the columns of A are linearly independent and assign the status BASIC. * Assign the status AT_LOWER for the remaining n - m variables. The basic solution for this basis is the unique solution of A * x = b that has all variables with status AT_LOWER fixed to their lower bounds (all zero). The resulting solution is called a basic feasible solution if it also satisfies x >= 0.

Used in: ModelSolveParametersProto, SolutionProto

enum BasisStatusProto

solution.proto:158

Status of a variable/constraint in a LP basis.

Used in: SparseBasisStatusVector

message DualRayProto

solution.proto:143

A direction of unbounded improvement to the dual of an optimization, problem; equivalently, a certificate of primal infeasibility. 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 ray is the pair (y, r) satisfying: b * y > 0 y * A + r = 0 y, r >= 0 Observe that adding a positive multiple of (y, r) to dual feasible solution maintains dual feasibility and improves the objective (proving the dual is unbounded). The dual ray also proves the primal problem is infeasible. In the message DualRay below, y is dual_values and r is reduced_costs.

Used in: SolveResultProto

message DualSolutionProto

solution.proto:107

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. In the message below, y is dual_values, r is reduced_costs, and b * y is objective value.

Used in: SolutionProto

enum EmphasisProto

parameters.proto:151

Effort level applied to an optional task while solving (see SolveParametersProto for use). Emphasis is used to configure a solver feature as follows: * If a solver doesn't support the feature, only UNSPECIFIED will always be valid, any other setting will typically an invalid argument error (some solvers may also accept OFF). * If the solver supports the feature: - When set to UNSPECIFIED, the underlying default is used. - When the feature cannot be turned off, OFF will return an error. - If the feature is enabled by default, the solver default is typically mapped to MEDIUM. - If the feature is supported, LOW, MEDIUM, HIGH, and VERY HIGH will never give an error, and will map onto their best match.

Used in: SolveParametersProto

enum FeasibilityStatusProto

result.proto:30

Problem feasibility status as claimed by the solver (solver is not required to return a certificate for the claim).

Used in: ProblemStatusProto

message IndicatorConstraintProto

model.proto:209

Data for representing a single indicator constraint of the form: Variable(indicator_id) = (activate_on_zero ? 0 : 1) ⇒ lower_bound <= expression <= upper_bound. If a variable involved in this constraint (either the indicator, or appearing in `expression`) is deleted, it is treated as if it were set to zero. In particular, deleting the indicator variable means that the indicator constraint is vacuous if `activate_on_zero` is false, and that it is equivalent to a linear constraint if `activate_on_zero` is true.

Used in: ModelProto

enum LPAlgorithmProto

parameters.proto:112

Selects an algorithm for solving linear programs.

Used in: SolveParametersProto

enum LimitProto

result.proto:150

When a Solve() stops early with TerminationReasonProto FEASIBLE or NO_SOLUTION_FOUND, the specific limit that was hit.

Used in: TerminationProto

message LinearConstraintsProto

model.proto:96

As used below, we define "#linear constraints" = size(LinearConstraintsProto.ids).

Used in: ModelProto

message LinearExpressionProto

sparse_containers.proto:80

A sparse representation of a linear expression (a weighted sum of variables, plus a constant offset).

Used in: SecondOrderConeConstraintProto, SosConstraintProto

message ModelProto

model.proto:257

An optimization problem. MathOpt supports: - Continuous and integer decision variables with optional finite bounds. - Linear and quadratic objectives (single or multiple objectives), either minimized or maximized. - A number of constraints types, including: * Linear constraints * Quadratic constraints * Second-order cone constraints * Logical constraints > SOS1 and SOS2 constraints > Indicator constraints By default, constraints are represented in "id-to-data" maps. However, we represent linear constraints in a more efficient "struct-of-arrays" format.

Used in: SolveMathOptModelRequest

message ModelSolveParametersProto

model_parameters.proto:66

TODO(b/183628247): follow naming convention in fields below. Parameters to control a single solve that that are specific to the input model (see SolveParametersProto for model independent parameters).

Used in: SolveMathOptModelRequest

message ObjectiveBoundsProto

result.proto:210

Bounds on the optimal objective value.

Used in: TerminationProto

message ObjectiveProto

model.proto:50

Used in: ModelProto

message PrimalRayProto

solution.proto:86

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 message PrimalRay below, variable_values is x.

Used in: SolveResultProto

message PrimalSolutionProto

solution.proto:51

A solution to an optimization problem. E.g. consider a simple linear program: min c * x s.t. A * x >= b x >= 0. A primal solution is assignment values to x. It is feasible if it satisfies A * x >= b and x >= 0 from above. In the message PrimalSolutionProto below, variable_values is x and objective_value is c * x.

Used in: SolutionProto

message ProblemStatusProto

result.proto:62

Feasibility status of the primal problem and its dual (or the dual of a continuous relaxation) as claimed by the solver. The solver is not required to return a certificate for the claim (e.g. the solver may claim primal feasibility without returning a primal feasible solutuion). This combined status gives a comprehensive description of a solver's claims about feasibility and unboundedness of the solved problem. For instance, * a feasible status for primal and dual problems indicates the primal is feasible and bounded and likely has an optimal solution (guaranteed for problems without non-linear constraints). * a primal feasible and a dual infeasible status indicates the primal problem is unbounded (i.e. has arbitrarily good solutions). Note that a dual infeasible status by itself (i.e. accompanied by an undetermined primal status) does not imply the primal problem is unbounded as we could have both problems be infeasible. Also, while a primal and dual feasible status may imply the existence of an optimal solution, it does not guarantee the solver has actually found such optimal solution.

Used in: SolveStatsProto, TerminationProto

message QuadraticConstraintProto

model.proto:119

A single quadratic constraint of the form: lb <= sum{linear_terms} + sum{quadratic_terms} <= ub. If a variable involved in this constraint is deleted, it is treated as if it were set to zero.

Used in: ModelProto

message SecondOrderConeConstraintProto

model.proto:169

A single second-order cone constraint of the form: ||`arguments_to_norm`||_2 <= `upper_bound`, where `upper_bound` and each element of `arguments_to_norm` are linear expressions. If a variable involved in this constraint is deleted, it is treated as if it were set to zero.

Used in: ModelProto

message SolutionHintProto

model_parameters.proto:47

A suggested starting solution for the solver. MIP solvers generally only want primal information (`variable_values`), while LP solvers want both primal and dual information (`dual_values`). Many MIP solvers can work with: (1) partial solutions that do not specify all variables or (2) infeasible solutions. In these cases, solvers typically solve a sub-MIP to complete/correct the hint. How the hint is used by the solver, if at all, is highly dependent on the solver, the problem type, and the algorithm used. The most reliable way to ensure your hint has an effect is to read the underlying solvers logs with and without the hint. Simplex-based LP solvers typically prefer an initial basis to a solution hint (they need to crossover to convert the hint to a basic feasible solution otherwise). TODO(b/183616124): Add hint-priorities to variable_values.

Used in: ModelSolveParametersProto

message SolutionProto

solution.proto:247

What is included in a solution depends on the kind of problem and solver. The current common patterns are 1. MIP solvers return only a primal solution. 2. Simplex LP solvers often return a basis and the primal and dual solutions associated to this basis. 3. Other continuous solvers often return a primal and dual solution solution that are connected in a solver-dependent form. Requirements: * at least one field must be set; a solution can't be empty.

Used in: SolveResultProto

enum SolutionStatusProto

solution.proto:28

Feasibility of a primal or dual solution as claimed by the solver.

Used in: BasisProto, DualSolutionProto, PrimalSolutionProto

message SolveParametersProto

parameters.proto:173

Parameters to control a single solve. Contains both parameters common to all solvers e.g. time_limit, and parameters for a specific solver, e.g. gscip. If a value is set in both common and solver specific field, the solver specific setting is used. The common parameters that are optional and unset or an enum with value unspecified indicate that the solver default is used. Solver specific parameters for solvers other than the one in use are ignored. Parameters that depends on the model (e.g. branching priority is set for each variable) are passed in ModelSolveParametersProto.

Used in: SolveMathOptModelRequest

message SolveResultProto

result.proto:300

The contract of when primal/dual solutions/rays is complex, see termination_reasons.md for a complete description. Until an exact contract is finalized, it is safest to simply check if a solution/ray is present rather than relying on the termination reason.

Used in: SolveMathOptModelResponse

message SolveStatsProto

result.proto:78

Used in: SolveResultProto

message SolverResourcesProto

solver_resources.proto:36

This message is used to specify some hints on the resources a remote solve is expected to use. These parameters are hints and may be ignored by the remote server (in particular in case of solve in a local subprocess, for example). When using SolveService.Solve and SolveService.ComputeInfeasibleSubsystem, these hints are mostly optional as some defaults will be computed based on the other parameters. When using SolveService.StreamSolve these hints are used to dimension the resources available during the execution of every action; thus it is recommended to set them.

Used in: SolveMathOptModelRequest

enum SolverTypeProto

parameters.proto:28

The solvers supported by MathOpt.

Used in: SolveMathOptModelRequest

message SosConstraintProto

model.proto:183

Data for representing a single SOS1 or SOS2 constraint. If a variable involved in this constraint is deleted, it is treated as if it were set to zero.

Used in: ModelProto

message SparseBasisStatusVector

solution.proto:179

A sparse representation of a vector of basis statuses.

Used in: BasisProto

message SparseBoolVectorProto

sparse_containers.proto:34

A sparse representation of a vector of bools.

message SparseDoubleMatrixProto

sparse_containers.proto:71

A sparse representation of a matrix of doubles. The matrix is stored as triples of row id, column id, and coefficient. These three vectors must be of equal length. For all i, the tuple (row_ids[i], column_ids[i]) should be distinct. Entries must be in row major order.

Used in: ModelProto, ObjectiveProto, QuadraticConstraintProto

message SparseDoubleVectorProto

sparse_containers.proto:26

A sparse representation of a vector of doubles.

Used in: DualRayProto, DualSolutionProto, IndicatorConstraintProto, ObjectiveProto, PrimalRayProto, PrimalSolutionProto, QuadraticConstraintProto, SolutionHintProto

message SparseInt32VectorProto

sparse_containers.proto:42

A sparse representation of a vector of ints.

Used in: ModelSolveParametersProto

message SparseVectorFilterProto

sparse_containers.proto:53

This message allows to query/set specific parts of a SparseXxxxVector. The default behavior is not to filter out anything. A common usage is to query only parts of solutions (only non-zero values, and/or just a hand-picked set of variable values).

Used in: ModelSolveParametersProto

message TerminationProto

result.proto:267

All information regarding why a call to Solve() terminated.

Used in: SolveResultProto

enum TerminationReasonProto

result.proto:101

The reason a call to Solve() terminates.

Used in: TerminationProto

message VariablesProto

model.proto:28

As used below, we define "#variables" = size(VariablesProto.ids).

Used in: ModelProto