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

Classes

class  AcceptanceStrategy
 Determines when a neighbor solution, obtained by the application of a perturbation and improvement step to a reference solution, is used to replace the reference solution. More...
 
class  IteratedLocalSearchParameters
 Specifies the behavior of a search based on ILS. More...
 
class  LinearSolverReflection
 Holder for reflection information generated from ortools/linear_solver/linear_solver.proto. More...
 
class  MPAbsConstraint
 Sets a variable's value to the absolute value of another variable. More...
 
class  MPArrayConstraint
 Sets a variable's value equal to a function on a set of variables. More...
 
class  MPArrayWithConstantConstraint
 Sets a variable's value equal to a function on a set of variables and, optionally, a constant. More...
 
class  MPConstraintProto
 A linear constraint is always of the form: lower_bound <= sum of linear term elements <= upper_bound, where lower_bound and upper_bound: More...
 
class  MPGeneralConstraintProto
 General constraints. See each individual proto type for more information. More...
 
class  MPIndicatorConstraint
 Indicator constraints encode the activation or deactivation of linear constraints given the value of one Boolean variable in the model. For example: y = 0 => 2 * x1 + 3 * x2 >= 42 The 2 * x1 + 3 * x2 >= 42 constraint is only active if the variable y is equal to 0. As of 2019/04, only SCIP, CP-SAT and Gurobi support this constraint type. More...
 
class  MPModelDeltaProto
 Encodes a full MPModelProto by way of referencing to a "baseline" MPModelProto stored in a file, and a "delta" to apply to this model. More...
 
class  MPModelProto
 MPModelProto contains all the information for a Linear Programming model. More...
 
class  MPModelRequest
 Next id: 18. More...
 
class  MPQuadraticConstraint
 Quadratic constraints of the form lb <= sum a_i x_i + sum b_ij x_i x_j <= ub, where a, b, lb and ub are constants, and x are the model's variables. Quadratic matrices that are Positive Semi-Definite, Second-Order Cones or rotated Second-Order Cones are always accepted. Other forms may or may not be accepted depending on the underlying solver used. See https://scip.zib.de/doc/html/cons__quadratic_8h.php and https://www.gurobi.com/documentation/9.0/refman/constraints.html#subsubsection:QuadraticConstraints. More...
 
class  MPQuadraticObjective
 Quadratic part of a model's objective. Added with other objectives (such as linear), this creates the model's objective function to be optimized. More...
 
class  MPSolution
 
class  MPSolutionResponse
 Next id: 12. More...
 
class  MPSolveInfo
 
class  MPSolverCommonParameters
 MPSolverCommonParameters holds advanced usage parameters that apply to any of the solvers we support. All of the fields in this proto can have a value of unspecified. In this case each inner solver will use their own safe defaults. Some values won't be supported by some solvers. The behavior in that case is not defined yet. More...
 
class  MPSosConstraint
 Special Ordered Set (SOS) constraints of type 1 or 2. See https://en.wikipedia.org/wiki/Special_ordered_set As of 2019/04, only SCIP and Gurobi support this constraint type. More...
 
class  MPVariableProto
 A variable is always constrained in the form: lower_bound <= x <= upper_bound where lower_bound and upper_bound: More...
 
class  OptionalDouble
 To support 'unspecified' double value in proto3, the simplest is to wrap any double value in a nested message (has_XXX works for message fields). More...
 
class  PartialVariableAssignment
 This message encodes a partial (or full) assignment of the variables of a MPModelProto problem. The indices in var_index should be unique and valid variable indices of the associated problem. More...
 
class  PerturbationStrategy
 Defines how a reference solution is perturbed. More...
 
class  RoutingIlsReflection
 Holder for reflection information generated from ortools/constraint_solver/routing_ils.proto. More...
 
class  RuinRecreateParameters
 Parameters to configure a perturbation based on a ruin and recreate approach. More...
 
class  RuinStrategy
 Ruin strategies, used in perturbation based on ruin and recreate approaches. More...
 
class  SetCoverProto
 
class  SetCoverReflection
 Holder for reflection information generated from ortools/algorithms/set_cover.proto. More...
 
class  SetCoverSolutionResponse
 

Enumerations

enum  MPSolverResponseStatus {
  MpsolverOptimal = 0 , MpsolverFeasible = 1 , MpsolverInfeasible = 2 , MpsolverUnbounded = 3 ,
  MpsolverAbnormal = 4 , MpsolverNotSolved = 6 , MpsolverModelIsValid = 97 , MpsolverCancelledByUser = 98 ,
  MpsolverUnknownStatus = 99 , MpsolverModelInvalid = 5 , MpsolverModelInvalidSolutionHint = 84 , MpsolverModelInvalidSolverParameters = 85 ,
  MpsolverSolverTypeUnavailable = 7 , MpsolverIncompatibleOptions = 113
}
 Status returned by the solver. They follow a hierarchical nomenclature, to allow us to add more enum values in the future. Clients should use InCategory() to match these enums, with the following C++ pseudo-code: More...
 

Enumeration Type Documentation

◆ MPSolverResponseStatus

Status returned by the solver. They follow a hierarchical nomenclature, to allow us to add more enum values in the future. Clients should use InCategory() to match these enums, with the following C++ pseudo-code:

bool InCategory(MPSolverResponseStatus status, MPSolverResponseStatus cat) { if (cat == MPSOLVER_OPTIMAL) return status == MPSOLVER_OPTIMAL; while (status > cat) status >>= 4; return status == cat; }

Enumerator
MpsolverOptimal 

The solver found the proven optimal solution. This is what should be returned in most cases.

Warning
for historical reason, the value is zero, which means that this value can't have any subcategories.
MpsolverFeasible 

The solver had enough time to find some solution that satisfies all constraints, but it did not prove optimality (which means it may or may not have reached the optimal).

This can happen for large LP models (Linear Programming), and is a frequent response for time-limited MIPs (Mixed Integer Programming). In the MIP case, the difference between the solution 'objective_value' and 'best_objective_bound' fields of the MPSolutionResponse will give an indication of how far this solution is from the optimal one.

MpsolverInfeasible 

The model does not have any solution, according to the solver (which "proved" it, with the caveat that numerical proofs aren't actual proofs), or based on trivial considerations (eg. a variable whose lower bound is strictly greater than its upper bound).

MpsolverUnbounded 

There exist solutions that make the magnitude of the objective value as large as wanted (i.e. -infinity (resp. +infinity) for a minimization (resp. maximization) problem.

MpsolverAbnormal 

An error (most probably numerical) occurred. One likely cause for such errors is a large numerical range among variable coefficients (eg. 1e-16, 1e20), in which case one should try to shrink it.

MpsolverNotSolved 

The solver did not have a chance to diagnose the model in one of the categories above.

MpsolverModelIsValid 

Like "NOT_SOLVED", but typically used by model validation functions returning a "model status", to enhance readability of the client code.

MpsolverCancelledByUser 

The solve was interrupted by the user, and the solver didn't have time to return a proper status.

MpsolverUnknownStatus 

Special value: the solver status could not be properly translated and is unknown.

MpsolverModelInvalid 

Model errors. These are always deterministic and repeatable. They should be accompanied with a string description of the error.

MpsolverModelInvalidSolutionHint 

Something is wrong with the fields "solution_hint_var_index" and/or "solution_hint_var_value".

MpsolverModelInvalidSolverParameters 

Something is wrong with the solver_specific_parameters request field.

MpsolverSolverTypeUnavailable 

Implementation error: the requested solver implementation is not available (see MPModelRequest.solver_type). The linear solver binary was probably not linked with the required library, eg ///<ortools/linear_solver:linear_solver_scip for SCIP.

MpsolverIncompatibleOptions 

Some of the selected options were incompatible, e.g. a cancellable solve was requested via SolverClient::SolveMipRemotely() with an underlying solver that doesn't support cancellation. status_str should contain a description of the issue.

Definition at line 197 of file LinearSolver.pb.cs.