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

In SWIG mode, we don't want anything besides these top-level includes. More...

Detailed Description

In SWIG mode, we don't want anything besides these top-level includes.

@protoc_insertion_point(includes)

Copyright 2019-2023 RTE.

Reversible (i.e Backtrackable) classes, used to simplify coding propagators.

Defines the random engine type to use within operations_research code.

Needed before fenv_access. See https://github.com/microsoft/STL/issues/2613.

Various utility functions on bitsets.

Basic types and classes used by the sat solver.

Utility functions to interact with an lp solver from the SAT context.

An object oriented wrapper for linear constraints in ModelStorage.

Basic utility functions on Fractional or row/column of Fractional.

Common types and constants used by the Linear Programming solver.

Utilities to display linear expression in a human-readable way.

Heuristics.

Formatting functions for GLPK constants.

--— activity a before activity b or activity b before activity a --—

--— interval <binary relation> interval --—

This file implements the table constraints.

--— Constant Restart --—

-------— Restart -------—

-------— NestedOptimize -------—

-------— SolveOnce -------—

A limit whose Check function is the OR of two underlying limits.

-------— Guided Local Search -------—

-------— Simulated Annealing -------—

-------— Metaheuristics ------—

--— All Solution Collector --—

--— N Best Solution Collector --—

--— Best Solution Collector --—

--— Last Solution Collector --—

--— AssignAllVariablesFromAssignment decision builder --—

--— AssignAllVariables --—

--— AssignVariablesValues decision --—

--— AssignOneVariableValue decision --—

--— AssignOneVariableValueOrDoNothing decision --—

--— AssignOneVariableValueOrFail decision --—

-------— Variable Assignments -------—

-------— Try Decision Builder -------—

-------— ClosureDecision ------—

-------— Compose Decision Builder -------—

-------— Composite Decision Builder -----—

-------— Callback-based search monitors -------—

--— Decisions and DecisionBuilders on interval vars --—

AllUnperformed.

ResourceGroup.

Trace settings.

Range constraints.

--— Dimension --—

Packing constraints.

--— Concatenation of operators --—

Increments the current value of variables.

--— Move Toward Target Local Search operator --—

--— Path cumul constraints --—

--— Int Var and associated methods --—

--— IsMemberCt --—

-------— Member -------—

--— is_between_cst Constraint --—

--— BetweenCt --—

--— is_lesser_equal_cst Constraint --—

--— is_greater_equal_cst Constraint --—

--— is_diff_cst Constraint --—

--— is_equal_cst Constraint --—

Different constraints.

Less or equal constraint.

Greater or equal constraint.

Array Expression constraints.

--— IntExprEvaluatorElementCt --—

--— IntIntExprFunctionElement --—

--— IntExprFunctionElement --—

Count constraints.

---------------— Solver class --------------—

-------— Trail and Reversibility -------—

--— Storing and Restoring assignments --—

AllDifferent constraints.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Todo
(user): refine this toplevel comment when this file settles.

Two dynamic partition classes: one that incrementally splits a partition into more and more parts; one that incrementally merges a partition into less and less parts.

GLOSSARY: The partition classes maintain a partition of N integers 0..N-1 (aka "elements") into disjoint equivalence classes (aka "parts").

SAFETY: Like vector<int> crashes when used improperly, these classes are not "safe": most of their methods may crash if called with invalid arguments. The client code is responsible for using this class properly. A few DCHECKs() will help catch bugs, though.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This class solves the graph automorphism problem (https://en.wikipedia.org/wiki/Graph_automorphism), a variant of the famous graph isomorphism problem (https://en.wikipedia.org/wiki/Graph_isomorphism).

The algorithm is largely based on the following article, published in 2008: "Faster Symmetry Discovery using Sparsity of Symmetries" by Darga, Sakallah and Markov. http://web.eecs.umich.edu/~imarkov/pubs/conf/dac08-sym.pdf.

See the comments on the class below for more details.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. An O(n^4) implementation of the Kuhn-Munkres algorithm (a.k.a. the Hungarian algorithm) for solving the assignment problem. The assignment problem takes a set of agents, a set of tasks and a cost associated with assigning each agent to each task and produces an optimal (i.e., least cost) assignment of agents to tasks. The code also enables computing a maximum assignment by changing the input matrix.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This can be MUCH faster than std::sort() on numerical arrays (int32_t, float, int64_t, double, ..), when the size is ≥8k: ~10x faster on int32_t or float data ~3-5x faster on int64_t or double data

Unlike std::sort(), it uses extra, temporary buffers: the radix/count-sort counters, and a copy of the data, i.e. between 1x and 2x your input size.

RadixSort() falls back to std::sort() for small sizes, so that you get the best performance in any case.

CAVEAT: std::sort() is very fast when the array is almost-sorted, or almost reverse-sorted: in this case, RadixSort() can easily be much slower. But the worst-case performance of RadixSort() is much faster than the worst-case performance of std::sort(). To be sure, you should benchmark your use case.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Architecture-neutral plug compatible replacements for strtol() friends. See strtoint.h for details on how to use this component.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Architecture-neutral plug compatible replacements for strtol() friends.

Long's have different lengths on ILP-32 and LP-64 platforms, and so overflow behavior across the two varies when strtol() and similar are used to parse 32-bit integers. Similar problems exist with atoi(), because although it has an all-integer interface, it uses strtol() internally, and so suffers from the same narrowing problems on assignments to int.

Examples: errno = 0; i = strtol("3147483647", nullptr, 10); printf("%d, errno %d\n", i, errno); ///< 32-bit platform: 2147483647, errno 34 ///< 64-bit platform: -1147483649, errno 0

printf("%d\n", atoi("3147483647")); ///< 32-bit platform: 2147483647 ///< 64-bit platform: -1147483649

A way round this is to define local replacements for these, and use them instead of the standard libc functions.

In most 32-bit cases the replacements can be inlined away to a call to the libc function. In a couple of 64-bit cases, however, adapters are required, to provide the right overflow and errno behavior.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ref: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/lib/gtl/top_n.h This simple class finds the top n elements of an incrementally provided set of elements which you push one at a time. If the number of elements exceeds n, the lowest elements are incrementally dropped. At the end you get a vector of the top elements sorted in descending order (through Extract() or ExtractNondestructive()), or a vector of the top elements but not sorted (through ExtractUnsorted() or ExtractUnsortedNondestructive()).

The value n is specified in the constructor. If there are p elements pushed altogether: The total storage requirements are O(min(n, p)) elements The running time is O(p * log(min(n, p))) comparisons If n is a constant, the total storage required is a constant and the running time is linear in p.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file defines the needed classes to efficiently perform Local Search in Bop. Local Search is a technique used to locally improve an existing solution by flipping a limited number of variables. To be successful the produced solution has to satisfy all constraints of the problem and improve the objective cost.

The class BopLocalSearchOptimizer is the only public interface for Local Search in Bop. For unit-testing purposes this file also contains the four internal classes AssignmentAndConstraintFeasibilityMaintainer, OneFlipConstraintRepairer, SatWrapper and LocalSearchAssignmentIterator. They are implementation details and should not be used outside of bop_ls.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Solver for Boolean Optimization Problems built on top of the SAT solver. To optimize a problem the solver uses several optimization strategies like Local Search (LS), Large Neighborhood Search (LNS), and Linear Programming (LP). See bop_parameters.proto to tune the strategies.

Note
the BopSolver usage is limited to:
  • Boolean variables,
  • Linear constraints and linear optimization objective,
  • Integral weights for both constraints and objective,
  • Minimization. To deal with maximization, integral variables and floating weights, one can use the bop::IntegralSolver.

Usage example: const LinearBooleanProblem problem = BuildProblem(); BopSolver bop_solver(problem); BopParameters bop_parameters; bop_parameters.set_max_deterministic_time(10); bop_solver.SetParameters(bop_parameters); const BopSolveStatus solve_status = bop_solver.Solve(); if (solve_status == BopSolveStatus::OPTIMAL_SOLUTION_FOUND) { ... }

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file contains some BopOptimizerBase implementations that are "complete" solvers. That is, they work on the full problem, and can solve the problem (and prove optimality) by themselves. Moreover, they can be run for short period of time and resumed later from the state they where left off.

The idea is that it is worthwhile spending some time in these algorithms, because in some situation they can improve the current upper/lower bound or even solve the problem to optimality.

Note(user): The GuidedSatFirstSolutionGenerator can also be used as a complete SAT solver provided that we keep running it after it has found a first solution. This is the default behavior of the kNotGuided policy.

These magic numbers are there to make sure we pop the correct sentinels throughout the search.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Collection of objects used to extend the Constraint Solver library. This file contains a set of objects that simplifies writing extensions of the library. The main objects that define extensions are:

This constraint implements evaluator(index) == var. It is delayed such that propagation only occurs when all variables have been touched. The range of the evaluator is [range_start, range_end).

--— Member(IntVar, IntSet) --—

Constraint enforcing that status[i] is true iff there's a path defined on next variables from sources[i] to sinks[i].

A local search operator that compares the current assignment with a target one, and that generates neighbors corresponding to a single variable being changed from its current value to its target value.

--— Sum Objective filter ---— Maintains the sum of costs of variables, where the subclass implements CostOfSynchronizedVariable() and FillCostOfBoundDeltaVariable() to compute the cost of a variable depending on its value. An assignment is accepted by this filter if the total cost is allowed depending on the relation defined by filter_enum:

--— Class Dimension Less Than Constant --—

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file contains implementations of several resource constraints. The implemented constraints are:

  • Disjunctive: forces a set of intervals to be non-overlapping
  • Cumulative: forces a set of intervals with associated demands to be such that the sum of demands of the intervals containing any given integer does not exceed a capacity. In addition, it implements the SequenceVar that allows ranking decisions on a set of interval variables.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Implementation of all classes related to routing and search. This includes decision builders, local search neighborhood operators and local search filters.

Todo
(user): Move all existing routing search code here.

Sweep heuristic

Todo
(user): Clean up to match other first solution strategies.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file contains implementations of several scheduling constraints. The implemented constraints are:

  • Cover constraints: ensure that an interval is the convex hull of a set of interval variables. This includes the performed status (one interval performed implies the cover var performed, all intervals unperformed implies the cover var unperformed, cover var unperformed implies all intervals unperformed, cover var performed implis at least one interval performed).

    Todo

    (user) : treat optional intervals

    (user) : Call DecisionVisitor and pass name of variable

--— BaseAssignmentSelector --—

Collect last solution, useful when optimizing

collect all solutions

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Struct and utility functions used by the code in parser.yy Included in parser.tab.hh.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. LU decomposition algorithm of a sparse matrix B with Markowitz pivot selection strategy. The algorithm constructs a lower matrix L, upper matrix U, row permutation P and a column permutation Q such that L.U = P.B.Q^{-1}.

The current algorithm is a mix of ideas that can be found in the literature and of some optimizations tailored for its use in a revised simplex algorithm (like a fast processing of the singleton columns present in B). It constructs L and U column by column from left to right.

A key concept is the one of the residual matrix which is the bottom right square submatrix that still needs to be factorized during the classical Gaussian elimination. The algorithm maintains the non-zero pattern of its rows and its row/column degrees.

At each step, a number of columns equal to 'markowitz_zlatev_parameter' are chosen as candidates from the residual matrix. They are the ones with minimal residual column degree. They can be found easily because the columns of the residual matrix are kept in a priority queue.

We compute the numerical value of these residual columns like in a left-looking algorithm by solving a sparse lower-triangular system with the current L constructed so far. Note that this step is highly optimized for sparsity and we reuse the computations done in the previous steps (if the candidate column was already considered before). As a by-product, we also get the corresponding column of U.

Among the entries of these columns, a pivot is chosen such that the product: (num_column_entries - 1) * (num_row_entries - 1) is minimized. Only the pivots with a magnitude greater than 'lu_factorization_pivot_threshold' times the maximum magnitude of the corresponding residual column are considered for stability reasons.

Once the pivot is chosen, the residual column divided by the pivot becomes a column of L, and the non-zero pattern of the new residual submatrix is updated by subtracting the outer product of this pivot column times the pivot row. The product minimized above is thus an upper bound of the number of fill-in created during a step.

References:

J. R. Gilbert and T. Peierls, "Sparse partial pivoting in time proportional to arithmetic operations," SIAM J. Sci. Statist. Comput., 9 (1988): 862-874.

I.S. Duff, A.M. Erisman and J.K. Reid, "Direct Methods for Sparse Matrices", Clarendon, Oxford, UK, 1987, ISBN 0-19-853421-3, http://www.amazon.com/dp/0198534213

T.A. Davis, "Direct methods for Sparse Linear Systems", SIAM, Philadelphia, 2006, ISBN-13: 978-0-898716-13, http://www.amazon.com/dp/0898716136

Todo
(user): Determine whether any of these would bring any benefit:
  • S.C. Eisenstat and J.W.H. Liu, "The theory of elimination trees for sparse unsymmetric matrices," SIAM J. Matrix Anal. Appl., 26:686-705, January 2005
  • S.C. Eisenstat and J.W.H. Liu. "Algorithmic aspects of elimination trees for sparse unsymmetric matrices," SIAM J. Matrix Anal. Appl., 29:1363-1381, January 2008.
  • http://perso.ens-lyon.fr/~bucar/papers/kauc.pdf

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file contains the presolving code for a LinearProgram.

A classical reference is: E. D. Andersen, K. D. Andersen, "Presolving in linear programming.", Mathematical Programming 71 (1995) 221-245.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Solves a Linear Programming problem using the Revised Simplex algorithm as described by G.B. Dantzig. The general form is: min c.x where c and x are n-vectors, subject to Ax = b where A is an mxn-matrix, b an m-vector, with l <= x <= u, i.e. l_i <= x_i <= u_i for all i in {1 .. m}.

c.x is called the objective function. Each row a_i of A is an n-vector, and a_i.x = b_i is a linear constraint. A is called the constraint matrix. b is called the right hand side (rhs) of the problem. The constraints l_i <= x_i <= u_i are called the generalized bounds of the problem (most introductory textbooks only deal with x_i >= 0, as did the first version of the Simplex algorithm). Note that l_i and u_i can be -infinity and +infinity, respectively.

To simplify the entry of data, this code actually handles problems in the form: min c.x where c and x are n-vectors, subject to: A1 x <= b1 A2 x >= b2 A3 x = b3 l <= x <= u

It transforms the above problem into min c.x where c and x are n-vectors, subject to: A1 x + s1 = b1 A2 x - s2 = b2 A3 x = b3 l <= x <= u s1 >= 0, s2 >= 0 where xT = (x1, x2, x3), s1 is an m1-vector (m1 being the height of A1), s2 is an m2-vector (m2 being the height of A2).

The following are very good references for terminology, data structures, and algorithms. They all contain a wealth of references.

Vasek Chvátal, "Linear Programming," W.H. Freeman, 1983. ISBN 978-0716715870. http://www.amazon.com/dp/0716715872

Robert J. Vanderbei, "Linear Programming: Foundations and Extensions," Springer, 2010, ISBN-13: 978-1441944979 http://www.amazon.com/dp/1441944974

Istvan Maros, "Computational Techniques of the Simplex Method.", Springer, 2002, ISBN 978-1402073328 http://www.amazon.com/dp/1402073321 Short description of the dual simplex algorithm.

The dual simplex algorithm uses the same data structure as the primal, but progresses towards the optimal solution in a different way:

  • It tries to keep the dual values dual-feasible at all time which means that the reduced costs are of the correct sign depending on the bounds of the non-basic variables. As a consequence the values of the basic variable are out of bound until the optimal is reached.
  • A basic leaving variable is selected first (dual pricing) and then a corresponding entering variable is selected. This is done in such a way that the dual objective value increases (lower bound on the optimal solution).
  • Once the basis pivot is chosen, the variable values and the reduced costs are updated the same way as in the primal algorithm.

Good references on the Dual simplex algorithm are:

Robert Fourer, "Notes on the Dual simplex Method", March 14, 1994. http://users.iems.northwestern.edu/~4er/WRITINGS/dual.pdf

Achim Koberstein, "The dual simplex method, techniques for a fast and stable implementation", PhD, Paderborn, Univ., 2005. http://digital.ub.uni-paderborn.de/hs/download/pdf/3885?originalFilename=true

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This headers defines APIs that wrap GLPK APIs for indices of variables from the computational form.

In GLPK (for details see glpk-5.0/doc/glpk.pdf available from glpk-5.0.tar.gz) the general form of the problem is:

min (or max) z = c^T x_S + c_0 s.t. x_R = A x_S l_R <= x_R <= u_R l_S <= x_S <= u_S

where: x_S are the structural variables x_R are the auxiliary variables used to define constraints

This is this form that is used by most GLPK's APIs.

But to implement the simplex algorithms, GLPK uses the following computational form:

min (or max) z = (0 | c)^T x + c_0 s.t. (I | -A) x = 0 l <= x <= u

where: x = (x_R | x_S)

That is it merges the auxiliary and structural variables in a single set of variables.

The dual of this problem is, when the primal is a minimization:

max Z = l^T λ_l + u^T λ_u s.t. (I | -A)^T π + λ_l + λ_u = (O | c)^T λ_l >= 0, λ_u <= 0

and if the primal is a maximization:

min Z = l^T λ_l + u^T λ_u s.t. (I | -A)^T π + λ_l + λ_u = (O | c)^T λ_l <= 0, λ_u >= 0

There is a reduced cost λ_k for each variable x_k:

λ = λ_l + λ_u

This header contains basic adapter functions that takes the index of a variable x in the computational form and use the corresponding API for either x_R or x_S (a.k.a. primal values) and for the corresponding reduced costs λ (a.k.a. dual values).

This logic is usually necessary when using advanced APIs that deal with indices in the computational form.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Simple interface to solve the linear sum assignment problem. It uses about twice as much memory as directly using the LinearSumAssignment class template, but it is as fast and presents a simpler interface. This is the class you should use in most situations.

The assignment problem: Given N "left" nodes and N "right" nodes, and a set of left->right arcs with integer costs, find a perfect matching (i.e., each "left" node is assigned to one "right" node) that minimizes the overall cost.

Example usage:

#include "ortools/graph/assignment.h"

SimpleLinearSumAssignment assignment; for (int arc = 0; arc < num_arcs; ++arc) { assignment.AddArcWithCost(head(arc), tail(arc), cost(arc)); } if (assignment.Solve() == SimpleLinearSumAssignment::OPTIMAL) { printf("A perfect matching exists.\n"); printf("The best possible cost is %d.\n", assignment.OptimalCost()); printf("An optimal assignment is:\n"); for (int node = 0; node < assignment.NumNodes(); ++node) { printf("left node %d assigned to right node %d with cost %d.\n", node, assignment.RightMate(node), assignment.AssignmentCost(node)); } printf("Note that it may not be the unique optimal assignment."); } else { printf("There is an issue with the input or no perfect matching exists."); }

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ChristofidesPathSolver computes an approximate solution to the Traveling Salesman Problen using the Christofides algorithm (c.f. https://en.wikipedia.org/wiki/Christofides_algorithm).

Note
the algorithm guarantees finding a solution within 3/2 of the optimum when using minimum weight perfect matching in the matching phase. The complexity of the algorithm is dominated by the complexity of the matching algorithm: O(n^2 * log(n)) if minimal matching is used, or at least O(n^3) or O(nmlog(n)) otherwise, depending on the implementation of the perfect matching algorithm used, where n is the number of nodes and m is the number of edges of the subgraph induced by odd-degree nodes of the minimum spanning tree.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Maximal clique algorithms, based on the Bron-Kerbosch algorithm. See http://en.wikipedia.org/wiki/Bron-Kerbosch_algorithm and C. Bron and J. Kerbosch, Joep, "Algorithm 457: finding all cliques of an undirected graph", CACM 16 (9): 575-577, 1973. http://dl.acm.org/citation.cfm?id=362367&bnc=1.

Keywords: undirected graph, clique, clique cover, Bron, Kerbosch.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Utility to build Eulerian paths and tours on a graph. For more information, see https://en.wikipedia.org/wiki/Eulerian_path. As of 10/2015, only undirected graphs are supported.

Usage:

  • Building an Eulerian tour on a ReverseArcListGraph: ReverseArcListGraph<int, int> graph; ///< Fill graph std::vector<int> tour = BuildEulerianTour(graph);
  • Building an Eulerian path on a ReverseArcListGraph: ReverseArcListGraph<int, int> graph; ///< Fill graph std::vector<int> tour = BuildEulerianPath(graph);

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. An implementation of a push-relabel algorithm for the max flow problem.

In the following, we consider a graph G = (V,E,s,t) where V denotes the set of nodes (vertices) in the graph, E denotes the set of arcs (edges). s and t denote distinguished nodes in G called source and target. n = V denotes the number of nodes in the graph, and m = E denotes the number of arcs in the graph.

Each arc (v,w) is associated a capacity c(v,w).

A flow is a function from E to R such that:

a) f(v,w) <= c(v,w) for all (v,w) in E (capacity constraint.)

b) f(v,w) = -f(w,v) for all (v,w) in E (flow antisymmetry constraint.)

c) sum on v f(v,w) = 0 (flow conservation.)

The goal of this algorithm is to find the maximum flow from s to t, i.e. for example to maximize sum v f(s,v).

The starting reference for this class of algorithms is: A.V. Goldberg and R.E. Tarjan. A new approach to the maximum flow problem. ACM Symposium on Theory of Computing, pp. 136-146. http://portal.acm.org/citation.cfm?id=12144.

The basic idea of the algorithm is to handle preflows instead of flows, and to refine preflows until a maximum flow is obtained. A preflow is like a flow, except that the inflow can be larger than the outflow. If it is the case at a given node v, it is said that there is an excess at node v, and inflow = outflow + excess.

More formally, a preflow is a function f such that:

1) f(v,w) <= c(v,w) for all (v,w) in E (capacity constraint). c(v,w) is a value representing the maximum capacity for arc (v,w).

2) f(v,w) = -f(w,v) for all (v,w) in E (flow antisymmetry constraint)

3) excess(v) = sum on u f(u,v) >= 0 is the excess at node v, the algebraic sum of all the incoming preflows at this node.

Each node has an associated "height", in addition to its excess. The height of the source is defined to be equal to n, and cannot change. The height of the target is defined to be zero, and cannot change either. The height of all the other nodes is initialized at zero and is updated during the algorithm (see below). For those who want to know the details, the height of a node, corresponds to a reduced cost, and this enables one to prove that the algorithm actually computes the max flow. Note that the height of a node can be initialized to the distance to the target node in terms of number of nodes. This has not been tried in this implementation.

A node v is said to be active if excess(v) > 0.

In this case the following operations can be applied to it:

  • if there are admissible incident arcs, i.e. arcs which are not saturated, and whose head's height is lower than the height of the active node considered, a PushFlow operation can be applied. It consists in sending as much flow as both the excess at the node and the capacity of the arc permit.
  • if there are no admissible arcs, the active node considered is relabeled, i.e. its height is increased to 1 + the minimum height of its neighboring nodes on admissible arcs. This is implemented in Discharge, which itself calls PushFlow and Relabel.

Before running Discharge, it is necessary to initialize the algorithm with a preflow. This is done in InitializePreflow, which saturates all the arcs leaving the source node, and sets the excess at the heads of those arcs accordingly.

The algorithm terminates when there are no remaining active nodes, i.e. all the excesses at all nodes are equal to zero. In this case, a maximum flow is obtained.

The complexity of this algorithm depends amongst other things on the choice of the next active node. It has been shown, for example in: L. Tuncel, "On the Complexity of Preflow-Push Algorithms for Maximum-Flow Problems", Algorithmica 11(4): 353-359 (1994). and J. Cheriyan and K. Mehlhorn, "An analysis of the highest-level selection rule in the preflow-push max-flow algorithm", Information processing letters, 69(5):239-242 (1999). http://www.math.uwaterloo.ca/~jcheriya/PS_files/me3.0.ps

...that choosing the active node with the highest level yields a complexity of O(n^2 * sqrt(m)).

Todo
(user): implement the above active node choice rule.

This has been validated experimentally in: R.K. Ahuja, M. Kodialam, A.K. Mishra, and J.B. Orlin, "Computational Investigations of Maximum Flow Algorithms", EJOR 97:509-542(1997). http://jorlin.scripts.mit.edu/docs/publications/58-comput%20investigations%20of.pdf.

Todo
(user): an alternative would be to evaluate: A.V. Goldberg, "The Partial Augment-Relabel Algorithm for the Maximum Flow Problem.” In Proceedings of Algorithms ESA, LNCS 5193:466-477, Springer 2008. http://www.springerlink.com/index/5535k2j1mt646338.pdf

An interesting general reference on network flows is: R. K. Ahuja, T. L. Magnanti, J. B. Orlin, "Network Flows: Theory, Algorithms, and Applications," Prentice Hall, 1993, ISBN: 978-0136175490, http://www.amazon.com/dp/013617549X

Keywords: Push-relabel, max-flow, network, graph, Goldberg, Tarjan, Dinic, Dinitz.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Solves the Shortest Hamiltonian Path Problem using a complete algorithm. The algorithm was first described in M. Held, R.M. Karp, A dynamic programming approach to sequencing problems, J. SIAM 10 (1962) 196-210

The Shortest Hamiltonian Path Problem (SHPP) is similar to the Traveling Salesperson Problem (TSP). You have to visit all the cities, starting from a given one and you do not need to return to your starting point. With the TSP, you can start anywhere, but you have to return to your start location.

By complete we mean that the algorithm guarantees to compute the optimal solution. The algorithm uses dynamic programming. Its time complexity is O(n^2 * 2^(n-1)), where n is the number of nodes to be visited, and '^' denotes exponentiation. Its space complexity is O(n * 2 ^ (n - 1)).

Note
the naive implementation of the SHPP exploring all permutations without memorizing intermediate results would have a complexity of (n - 1)! (factorial of (n - 1) ), which is much higher than n^2 * 2^(n-1). To convince oneself of this, just use Stirling's formula: n! ~ sqrt(2 * pi * n)*( n / exp(1)) ^ n. Because of these complexity figures, the algorithm is not practical for problems with more than 20 nodes.

Here is how the algorithm works: Let us denote the nodes to be visited by their indices 0 .. n - 1 Let us pick 0 as the starting node. Let cost(i,j) denote the cost (or distance) to go from i to j. f(S, j), where S is a set of nodes and j is a node in S, is defined as the total cost of the shortest path from 0 to j going through all nodes of S.

We can prove easily that it satisfy the following relation: f(S, j) = min (i in S \ {j}, f(S \ {j}, i) + cost(i, j)) (j is an element of S)

Note
this formulation, from the original Held-Karp paper is a bit different, but equivalent to the one used in Caseau and Laburthe, Solving Small TSPs with Constraints, 1997, ICLP f(S, j) = min (i in S, f(S \ {i}, i) + cost(i, j)) (j is not an element of S)

The advantage of the Held and Karp formulation is that it enables:

  • to build the dynamic programming lattice layer by layer starting from the subsets with cardinality 1, and increasing the cardinality.
  • to traverse the dynamic programming lattice using sequential memory accesses, making the algorithm cache-friendly, and faster, despite the large amount of computation needed to get the position when f(S, j) is stored.
  • Todo
    (user): implement pruning procedures on top of the Held-Karp algorithm.

The set S can be represented by an integer where bit i corresponds to element i in the set. In the following S denotes the integer corresponding to set S.

The dynamic programming iteration is implemented in the method Solve. The optimal value of the Hamiltonian path starting at 0 is given by min (i in S, f(2 ^ n - 1, i)) The optimal value of the Traveling Salesman tour is given by f(2 ^ n, 0). (There is actually no need to duplicate the first node, as all the paths are computed from node 0.)

To implement dynamic programming, we store the preceding results of computing f(S,j) in an array M[Offset(S,j)]. See the comments about LatticeMemoryManager::BaseOffset() to see how this is computed. This is really what brings the performance of the algorithm, because memory is accessed in sequential order, without risking to thrash the cache.

Keywords: Traveling Salesman, Hamiltonian Path, Dynamic Programming, Held, Karp.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Algorithms to compute k-shortest paths. Currently, only Yen's algorithm is implemented.

Todo
(user): implement Lawler's modification: https://pubsonline.informs.org/doi/abs/10.1287/mnsc.18.7.401
Algo. Neg. weights Neg.-weight loops Graph type Loopless paths
Yen No No (Un)directed Yes

Loopless path: path not going through the same node more than once. Also called simple path.

The implementations do not support multigraphs, i.e. graphs with several arcs between the same source and destination nodes. One way to work around this limitation is to create dummy nodes between the source and destination nodes, with one of the edges carrying the weight and the other having a zero weight. This transformation slightly increases the size of the graph. If you have n edges between the nodes s and t, with the weights w_i, do the following: create n - 1 nodes (d_i for i from 2 to n), create n - 1 edges between s and d_i with weight w_i, create n - 1 edges between d_i and t with weight 0.

Design choices The design takes some inspiration from shortest_paths.h and bounded_dijkstra.h, but the shortest-path and k-shortest-path problems have vastly different structures. For instance, a path container that only stores distances, like DistanceContainer in shortest_paths.h, is irrelevant as an output for this problem: it can only characterize one path, the shortest one. This is why the results are stored in an intermediate structure, containing the paths (as a sequence of nodes, just like PathContainerImpl subclasses) and their distance.

Only the one-to-one k-shortest-path problem is well-defined. Variants with multiple sources and/or destinations pose representational challenges whose solution is likely to be algorithm-dependent. Optimizations of path storage such as PathTree are not general enough to store k shortest paths: the set of paths for a given index for many sources/destinations is not ensured to form a set for each index. (While the first paths will form such a tree, storing different second paths for each source-destination pair may be impossible to do in a tree.)

Unlike the functions in shortest_paths.h, the functions in this file directly return their result, to follow the current best practices.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. An implementation of a cost-scaling push-relabel algorithm for the min-cost flow problem.

In the following, we consider a graph G = (V,E) where V denotes the set of nodes (vertices) in the graph, E denotes the set of arcs (edges). n = V denotes the number of nodes in the graph, and m = E denotes the number of arcs in the graph.

With each arc (v,w) is associated a nonnegative capacity u(v,w) (where 'u' stands for "upper bound") and a unit cost c(v,w). With each node v is associated a quantity named supply(v), which represents a supply of fluid (if >0) or a demand (if <0). Furthermore, no fluid is created in the graph so sum_{v in V} supply(v) = 0.

A flow is a function from E to R such that: a) f(v,w) <= u(v,w) for all (v,w) in E (capacity constraint). b) f(v,w) = -f(w,v) for all (v,w) in E (flow antisymmetry constraint). c) sum on v f(v,w) + supply(w) = 0 (flow conservation).

The cost of a flow is sum on (v,w) in E ( f(v,w) * c(v,w) ) [Note: It can be confusing to beginners that the cost is actually double the amount that it might seem at first because of flow antisymmetry.]

The problem to solve: find a flow of minimum cost such that all the fluid flows from the supply nodes to the demand nodes.

The principles behind this algorithm are the following: 1/ handle pseudo-flows instead of flows and refine pseudo-flows until an epsilon-optimal minimum-cost flow is obtained, 2/ deal with epsilon-optimal pseudo-flows.

1/ A pseudo-flow is like a flow, except that a node's outflow minus its inflow can be different from its supply. If it is the case at a given node v, it is said that there is an excess (or deficit) at node v. A deficit is denoted by a negative excess and inflow = outflow + excess. (Look at ortools/graph/max_flow.h to see that the definition of preflow is more restrictive than the one for pseudo-flow in that a preflow only allows non-negative excesses, i.e., no deficit.) More formally, a pseudo-flow is a function f such that: a) f(v,w) <= u(v,w) for all (v,w) in E (capacity constraint). b) f(v,w) = -f(w,v) for all (v,w) in E (flow antisymmetry constraint).

For each v in E, we also define the excess at node v, the algebraic sum of all the incoming preflows at this node, added together with the supply at v. excess(v) = sum on u f(u,v) + supply(v)

The goal of the algorithm is to obtain excess(v) = 0 for all v in V, while consuming capacity on some arcs, at the lowest possible cost.

2/ Internally to the algorithm and its analysis (but invisibly to the client), each node has an associated "price" (or potential), in addition to its excess. It is formally a function from E to R (the set of real numbers.). For a given price function p, the reduced cost of an arc (v,w) is: c_p(v,w) = c(v,w) + p(v) - p(w) (c(v,w) is the cost of arc (v,w).) For those familiar with linear programming, the price function can be viewed as a set of dual variables.

For a constant epsilon >= 0, a pseudo-flow f is said to be epsilon-optimal with respect to a price function p if for every residual arc (v,w) in E, c_p(v,w) >= -epsilon.

A flow f is optimal if and only if there exists a price function p such that no arc is admissible with respect to f and p.

If the arc costs are integers, and epsilon < 1/n, any epsilon-optimal flow is optimal. The integer cost case is handled by multiplying all the arc costs and the initial value of epsilon by (n+1). When epsilon reaches 1, and the solution is epsilon-optimal, it means: for all residual arc (v,w) in E, (n+1) * c_p(v,w) >= -1, thus c_p(v,w) >= -1/(n+1) > -1/n, and the solution is optimal.

A node v is said to be active if excess(v) > 0. In this case the following operations can be applied to it:

  • if there are admissible incident arcs, i.e. arcs which are not saturated, and whose reduced costs are negative, a PushFlow operation can be applied. It consists in sending as much flow as both the excess at the node and the capacity of the arc permit.
  • if there are no admissible arcs, the active node considered is relabeled, This is implemented in Discharge, which itself calls PushFlow and Relabel.

Discharge itself is called by Refine. Refine first saturates all the admissible arcs, then builds a stack of active nodes. It then applies Discharge for each active node, possibly adding new ones in the process, until no nodes are active. In that case an epsilon-optimal flow is obtained.

Optimize iteratively calls Refine, while epsilon > 1, and divides epsilon by alpha (set by default to 5) before each iteration.

The algorithm starts with epsilon = C, where C is the maximum absolute value of the arc costs. In the integer case which we are dealing with, since all costs are multiplied by (n+1), the initial value of epsilon is (n+1)*C. The algorithm terminates when epsilon = 1, and Refine() has been called. In this case, a minimum-cost flow is obtained.

The complexity of the algorithm is O(n^2*m*log(n*C)) where C is the value of the largest arc cost in the graph.

IMPORTANT: The algorithm is not able to detect the infeasibility of a problem (i.e., when a bottleneck in the network prohibits sending all the supplies.) Worse, it could in some cases loop forever. This is why feasibility checking is enabled by default (FLAGS_min_cost_flow_check_feasibility=true.) Feasibility checking is implemented using a max-flow, which has a much lower complexity. The impact on performance is negligible, while the risk of being caught in an endless loop is removed. Note that using the feasibility checker roughly doubles the memory consumption.

The starting reference for this class of algorithms is: A.V. Goldberg and R.E. Tarjan, "Finding Minimum-Cost Circulations by Successive Approximation." Mathematics of Operations Research, Vol. 15, 1990:430-466. http://portal.acm.org/citation.cfm?id=92225

Implementation issues are tackled in: A.V. Goldberg, "An Efficient Implementation of a Scaling Minimum-Cost Flow Algorithm," Journal of Algorithms, (1997) 22:1-29 http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.31.258

A.V. Goldberg and M. Kharitonov, "On Implementing Scaling Push-Relabel Algorithms for the Minimum-Cost Flow Problem", Network flows and matching: First DIMACS implementation challenge, DIMACS Series in Discrete Mathematics and Theoretical Computer Science, (1993) 12:157-198. ftp://dimacs.rutgers.edu/pub/netflow/submit/papers/Goldberg-mincost/scalmin.ps and in: U. Bunnagel, B. Korte, and J. Vygen. “Efficient implementation of the Goldberg-Tarjan minimum-cost flow algorithm.” Optimization Methods and Software (1998) vol. 10, no. 2:157-174. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.84.9897

We have tried as much as possible in this implementation to keep the notations and namings of the papers cited above, except for 'demand' or 'balance' which have been replaced by 'supply', with the according sign changes to better accommodate with the API of the rest of our tools. A demand is denoted by a negative supply.

Todo
(user): See whether the following can bring any improvements on real-life problems. R.K. Ahuja, A.V. Goldberg, J.B. Orlin, and R.E. Tarjan, "Finding minimum-cost flows by double scaling," Mathematical Programming, (1992) 53:243-266. http://www.springerlink.com/index/gu7404218u6kt166.pdf

An interesting general reference on network flows is: R. K. Ahuja, T. L. Magnanti, J. B. Orlin, "Network Flows: Theory, Algorithms, and Applications," Prentice Hall, 1993, ISBN: 978-0136175490, http://www.amazon.com/dp/013617549X

Keywords: Push-relabel, min-cost flow, network, graph, Goldberg, Tarjan, Dinic, Dinitz.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Runs multiple Dijkstra searches simultaneously (single-threaded, but growing their search radii at the same time) on the same graph. Supports custom arc length functors, and custom stopping criterion and tracking.

EXAMPLE: With two sources and a custom stopping criterion that stops the first Dijkstra when it has settled 1000 nodes and the second when it has reached the search radius 123.45:

ListGraph<> graph; ///< From ortools/graph/graph.h ... build the graph ... int source1 = ... , source2 = ...; vector<double> arc_lengths(graph.num_arcs(), 0); ... set the arc lengths ... int num_nodes_to_settle_in_first_search = 1000; std::vector<absl::flat_hash_map<int, DistanceAndParentArc<double>>> reached_nodes; ///< One map per source: node -> DistanceAndParentArc. reached_nodes = MultiDijkstra<double>( graph, [&arc_lengths](int a) { return arc_lengths[a]; }, {{source1}, {source2}}, [&num_nodes_to_settle_in_first_search]( int settled_node, int source_index, double settled_distance) { if (source_index == 0) { return –num_nodes_to_settle_in_first_search == 0; } else { return settled_distance >= 123.45; } });

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Implementation of the Blossom V min-cost perfect matching algorithm. The main source for the algo is the paper: "Blossom V: A new implementation of a minimum cost perfect matching algorithm", Vladimir Kolmogorov.

The Algorithm is a primal-dual algorithm. It always maintains a dual-feasible solution. We recall some notations here, but see the paper for more details as it is well written.

Todo
(user): This is a work in progress. The algo is not fully implemented yet. The initial version is closer to Blossom IV since we update the dual values for all trees at once with the same delta.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Find paths and compute path distances between nodes on a rooted tree.

A tree is a connected undirected graph with no cycles. A rooted tree is a directed graph derived from a tree, where a node is designated as the root, and then all edges are directed towards the root.

This file provides the class RootedTree, which stores a rooted tree on dense integer nodes a single vector, and a function RootedTreeFromGraph(), which converts the adjacency list of a an undirected tree to a RootedTree.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file contains functions to compute shortest paths on graphs using Dijkstra's algorithm, E.W. Dijkstra, "A note on two problems in connexion with graphs". Numerische Mathematik 1:269–271, 1959. See for example: http://www.springerlink.com/content/uu8608u0u27k7256/fulltext.pdf. More information can also be found on Wikipedia: http://en.wikipedia.org/wiki/Dijkstra's_algorithm

This is a unidirectional implementation of Dijkstra's algorithm. A bidirectional is available in bidirectional_dijkstra.h for specific use cases.

Each 1-to-many shortest path computation is run in a separate thread. Users should select the number of threads to use according to the number of cores available (each thread will use up one core). However, increasing the number of threads also increases temporary memory used by each 1-to-many computation.

Also included are classes to store path data resulting from shortest path computations (cf. GenericPathContainer).

Usage example computing all-pair shortest paths on a graph: StaticGraph<> graph(...,...); std::vector<uint32_t> arc_lengths(...,...); ... populate graph and arc lengths ... GenericPathContainer<StaticGraph<>> container = GenericPathContainer< StaticGraph<>>::BuildInMemoryCompactPathContainer(); ComputeAllToAllShortestPathsWithMultipleThreads(graph, arc_lengths, /*num_threads=*‍/4, &container);

Usage example computing shortest paths between a subset of graph nodes: StaticGraph<> graph(...,...); std::vector<uint32_t> arc_lengths(...,...); ... populate graph and arc lengths ... vector<NodeIndex> sources; vector<NodeIndex> sinks; ... fill sources and sinks ... GenericPathContainer<StaticGraph<>> container = GenericPathContainer< StaticGraph<>>::BuildInMemoryCompactPathContainer(); ComputeManyToManyShortestPathsWithMultipleThreads(graph, arc_lengths, sources, sinks, /*num_threads=*‍/4, &container);

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Provides a safe C++ interface for SCIP constraint handlers, which are described at https://www.scipopt.org/doc/html/CONS.php. For instructions to write a constraint handler, see the documentation of GScipConstraintHandler. Examples can be found in gscip_constraint_handler_test.cc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Provides a safe C++ interface for SCIP event handlers, which are described at https://www.scipopt.org/doc/html/EVENT.php.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Additional nonlinear constraints not supported directly by SCIP.

The primary purpose of this file is to support the nonlinear constraints of MPSolver proto API.

WARNING(rander): as these constraints are not natively supported in SCIP, they will generally not be a single SCIP_CONS* created, but will typically result in multiple SCIP_CONS* and SCIP_VAR* being created. Direct access to these intermediate variables and constraints is currently not provided.

Todo
(user): either implement with SCIP constraint handlers or use a solver independent implementation.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Interface to dedicated knapsack solvers covering multi-dimensional 0-1 knapsacks. Current solvers handle only integer coefficients so a scaling phase is performed before solving the problem.

Todo
(user): handle timeouts, compute row and column statuses.
Todo
(user): post c++ 14, instead use std::pair<MPSolver::OptimizationProblemType, const absl::string_view> once pair gets a constexpr constructor.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file provides a simplified C++ API for using callbacks with SCIP and MPSolver. It can be used directly by users, although in most cases, the mp_callback.h should be sufficient (in fact, SCIP's mp_callback.h implementation is built on top of this).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Functions for solving optimization models defined by MPModelRequest.

See linear_solver.proto for further documentation.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Storage classes for Linear Programs.

LinearProgram stores the complete data for a Linear Program:

  • objective coefficients and offset,
  • cost coefficients,
  • coefficient matrix,
  • bounds for each variable,
  • bounds for each constraint.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Utility helpers for manipulating LinearProgram and other types defined in lp_data.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. A simple parser of a linear program from string.

We accept a format produced by LinearProgram::Dump(), which is similar to LP file used by lp_solve (see http://lpsolve.sourceforge.net/5.1/index.htm). Example: 1: min: 1 + x1 + 2 * x2; 2: 0 <= x1 <= 1; 3: x2 >= 2; 4: r1: 1 <= x1 - x2 <= 2; 5: 0 <= x1 + x2 <= inf; 6: int x1, x3; 7: bin x2;

Line 1 is the objective, line 2 and 3 define variable bounds, line 4 is a named constraint, line 5 is an unnamed constraint. Line 6 is the list of integer variables. Line 7 is the list of binary variables. The lines can be in any order, the line numbers do not belong to the string being parsed.

Caveats:

  1. Plus sign and multiplication sign are optional. Thus, "min: 1 x1 x2" is the same as "min: 1*x1 + x2". All consecutive signs will be compacted into one sign using mathematical rules (i.e., the parity of minus sign). E.g., "min: ++---+ - +x1" is the same as "min: x1".
  2. A constraint consists of two or three parts. A two part constraint has a bound on the left (resp. right) side and variables on the right (resp. left) side, with the two parts being separated by any of the relation signs "<", "<=", "=", ">=", ">".
  3. A three part constraint has the variables in the middle part, and two bounds on the left and right side, with all three parts being separated by any of "<", "<=", ">=", ">".
  4. "<" means "<=", and ">" means ">=".
  5. An unnamed constraint involving exactly one variable with coefficient equal to 1, defines the variable bound(s). Otherwise, the constraint defines a new constraint.
  6. If there is no bound defined for a variable, it will be assumed to be unbounded (i.e., from -inf to +inf).
  7. A bound must be a number or "inf". A coefficient must be finite and cannot overflow. A number can be represented in a scientific notation, e.g., +1.2E-2. Consequently, "min: 1e2" means minimization of 100, "min: 1 e2" means minimization of 1*e2, where e2 is a variable, "min: 1 + e2" means minimization of 1 + e2, where e2 is a variable, "min: 1 1*e2" means minimization of 1 + e2, where e2 is a variable. "min: 1 1e2" is invalid as it would mean minimization of 1 + 100.
  8. In a constraint, in the part with variables, all elements must be variables with optional coefficients and signs (i.e., no offset is allowed).
  9. Variables in the objective, and in each of the constraint cannot repeat. E.g., this is invalid: "min: x + x".
  10. The offset in the objective must be specified at the beginning, i.e., after min: or max: and before any variables.
  11. The parsing will fail if due to bounding of a variable the lower bound becomes strictly greater than the upper bound. E.g., these fail to parse: "min x; 1 <= x <= 0;", "min x; 0 <= x <= 1; 2 <= x <= 3". On the other hand the parser does not attempt to "round" the bounds for integer variables. E.g., "min x; 0.5 <= x <= 0.8; int x" results in bounding the x variable between 0.5 and 0.8, despite there is no integer value it can take. Similarly, "min x; bin x; x <= 0.5" results in bounding the x variable between 0.0 and 0.5, despite the only value it can take is 0.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. We use typedefs as much as possible to later permit the usage of types such as quad-doubles or rationals.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The SparseMatrixScaler class provides tools to scale a SparseMatrix, i.e. reduce the range of its coefficients and make for each column and each row the maximum magnitude of its coefficients equal to 1.

In the case there are bounds or costs on the columns or a right-hand side related to each row, SparseMatrixScaler provides the tools to scale those appropriately.

More precisely, suppose we have the Linear Program: min c.x s.t A.x = b with l <= x <= u

The rows of A are scaled by left-multiplying it by a diagonal matrix R whose elements R_ii correspond to the scaling factor of row i. The columns of A are scaled by right-multiplying it by a diagonal matrix C whose elements C_jj correspond to the scaling factor of column j.

We obtain a matrix A' = R.A.C.

We wish to scale x, c, b, l, u so as to work on the scaled problem: min c'.x' s.t A'.x' = b' with l' <= x' <= u'

The right-hand side b needs to be left-multiplied by R, the cost function c needs to be right-multiplied by C. Finally, x, and its lower- and upper-bound vectors l and u need to be left-multiplied by C^-1.

Note also that the dual vector y is scaled as follows: y'.R = y, thus y' = y.R^-1.

The complete transformation is thus: A' = R.A.C, b' = R.b, c' = c.C, x' = C^-1.x, l' = C^-1.l, u' = C^-1.u, y' = y.R^-1.

The validity of the above transformation can be checked by computing: c'.x' = c.C.C^-1.x = c.x. and: A'.x' = R.A.C.C^-1.x = R.A.x = R.b = b'.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. A reader for files in the MPS format. see http://lpsolve.sourceforge.net/5.5/mps-format.htm and http://www.ici.ro/camo/language/ml11.htm.

MPS stands for Mathematical Programming System.

The format was invented by IBM in the 60's, and has become the de facto standard. We developed this reader to be able to read benchmark data files. Using the MPS file format for new models is discouraged.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. A reader for files in the SOL format. see https://en.wikipedia.org/wiki/Sol_(format)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The following are very good references for terminology, data structures, and algorithms:

I.S. Duff, A.M. Erisman and J.K. Reid, "Direct Methods for Sparse Matrices", Clarendon, Oxford, UK, 1987, ISBN 0-19-853421-3, http://www.amazon.com/dp/0198534213.

T.A. Davis, "Direct methods for Sparse Linear Systems", SIAM, Philadelphia, 2006, ISBN-13: 978-0-898716-13, http://www.amazon.com/dp/0898716136.

Both books also contain a wealth of references.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Classes to represent sparse vectors.

The following are very good references for terminology, data structures, and algorithms:

I.S. Duff, A.M. Erisman and J.K. Reid, "Direct Methods for Sparse Matrices", Clarendon, Oxford, UK, 1987, ISBN 0-19-853421-3, http://www.amazon.com/dp/0198534213.

T.A. Davis, "Direct methods for Sparse Linear Systems", SIAM, Philadelphia, 2006, ISBN-13: 978-0-898716-13, http://www.amazon.com/dp/0898716136.

Both books also contain a wealth of references.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. A read only view for sparse vectors that implements various utilities.

This header defines:

  • SparseVectorView<T>: a sparse vector as a span of int64_t ids and another span of values of type T. The underlying data is not owned and the user must ensure the data outlives the view.
  • Overloaded MakeView factories to avoid explicit template arguments.

The utilities implemented by SparseVectorView<T> include:

  • const range iterations over the (id, value) pairs.
  • .as_map<IdT>() member function that returns the view as a absl::flat_hash_map<IdT, T> Example: const std::vector<int64_t> ids = {2, 5, 7}; const std::vector<double> values= {1.0, 3.0, 1.0}; const SparseVectorView<double> view = MakeView(ids, values);

Now view.ids => [2, 5, 7] and view.values => [1.0, 3.0, 1.0]. To iterate over the (id, value) pairs:

for(const auto [id, value] : view) { ... }

To get a map that casts the ids to the strong int type VariableId:

auto map = view.as_map<VariableId>();

For more information, see the class comments below.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. IWYU pragma: private, include "ortools/math_opt/cpp/math_opt.h" IWYU pragma: friend "ortools/math_opt/cpp/.*" Data types for using callbacks with Solve() and IncrementalSolver.

Callbacks allow to user to observe the progress of a solver and modify its behavior mid solve. This is supported by allowing the user to a function of type Callback as an optional argument to Solve() and IncrementalSolver::Solve(). This function is called periodically throughout the solve process. This file defines the data types needed to use this callback.

The example below registers a callback that listens for feasible solutions the solvers finds along the way and accumulates them in a list for analysis after the solve.

using operations_research::math_opt::CallbackData; using operations_research::math_opt::CallbackRegistration; using operations_research::math_opt::CallbackResult; using operations_research::math_opt::Model; using ::operations_research::math_opt::SolveResult; using operations_research::math_opt::Solve; using operations_research::math_opt::Variable; using operations_research::math_opt::VariableMap;

Model model; Variable x = model.AddBinaryVariable(); model.Maximize(x); CallbackRegistration cb_reg; cb_reg.events = { operations_research::math_opt::CALLBACK_EVENT_MIP_SOLUTION}; std::vector<VariableMap<double>> solutions; auto cb = [&solutions](const CallbackData& cb_data) { ///<

Note
this assumes the callback is always called from the same thread. ///< Gurobi always does this, multi-threaded SCIP does not. solutions.push_back(cb_data.solution); return CallbackResult(); }; absl::StatusOr<SolveResult> result = Solve( model, operations_research::math_opt::SOLVER_TYPE_GUROBI, /*parameters=‍/{}, /*model_parameters=*‍/{}, cb_reb, cb);

At the termination of the example, solutions will have {{x, 1.0}}, and possibly {{x, 0.0}} as well.

If the callback argument to Solve() is not null, it will be invoked on the events specified by the callback_registration argument (and when the callback is null, callback_registration must not request any events or will CHECK fail). Some solvers do not support callbacks or certain events, in this case the callback is ignored.

Todo
(b/180617976): change this behavior.

Some solvers may call callback from multiple threads (SCIP will, Gurobi will not). You should either solve with one thread (see solver_parameters.threads), write a threadsafe callback, or consult the documentation of your underlying solver.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. IWYU pragma: private, include "ortools/math_opt/cpp/math_opt.h" IWYU pragma: friend "ortools/math_opt/cpp/.*"

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Matchers for MathOpt types, specifically SolveResult and nested fields.

The matchers defined here are useful for writing unit tests checking that the result of Solve(), absl::StatusOr<SolveResult>, meets expectations. We give some examples below. All code is assumed with the following setup:

namespace operations_research::math_opt { using testing::status::IsOkAndHolds;

Model model; const Variable x = model.AddContinuousVariable(0.0, 1.0); const Variable y = model.AddContinuousVariable(0.0, 1.0); const LinearConstraint c = model.AddLinearConstraint(x + y <= 1); model.Maximize(2*x + y);

Example 1.a: result is OK, optimal, and objective value approximately 42. EXPECT_THAT(Solve(model, SolverType::kGlop), IsOkAndHolds(IsOptimal(42)));

Example 1.b: equivalent to 1.a. ASSERT_OK_AND_ASSIGN(const SolveResult result, Solve(model, SolverType::kGlop)); EXPECT_THAT(result, IsOptimal(42));

Example 2: result is OK, optimal, and best solution is x=1, y=0. ASSERT_OK_AND_ASSIGN(const SolveResult result, Solve(model, SolverType::kGlop)); ASSERT_THAT(result, IsOptimal()); EXPECT_THAT(result.variable_value(), IsNear({{x, 1}, {y, 0}});

Note
the second ASSERT ensures that if the solution is not optimal, then result.variable_value() will not run (the function will crash if the solver didn't find a solution). Further, MathOpt guarantees there is a solution when the termination reason is optimal.

Example 3: result is OK, check the solution without specifying termination. ASSERT_OK_AND_ASSIGN(const SolveResult result, Solve(model, SolverType::kGlop)); EXPECT_THAT(result, HasBestSolution({{x, 1}, {y, 0}}));

Example 4: multiple possible termination reason, primal ray optional: ASSERT_OK_AND_ASSIGN(const SolveResult result, Solve(model, SolverType::kGlop)); ASSERT_THAT(result, TerminatesWithOneOf( TerminationReason::kUnbounded, TerminationReason::kInfeasibleOrUnbounded)); if(!result.primal_rays.empty()) { EXPECT_THAT(result.primal_rays[0], PrimalRayIsNear({{x, 1,}, {y, 0}})); }

Tips on writing good tests:

  • Use ASSERT_OK_AND_ASSIGN(const SolveResult result, Solve(...)) to ensure the test terminates immediately if Solve() does not return OK.
  • If you ASSERT_THAT(result, IsOptimal()), you can assume that you have a feasible primal solution afterwards. Otherwise, make no assumptions on the contents of result (e.g. do not assume result contains a primal ray just because the termination reason was UNBOUNDED).
  • For problems that are infeasible, the termination reasons INFEASIBLE and DUAL_INFEASIBLE are both possible. Likewise, for unbounded problems, you can get both UNBOUNDED and DUAL_INFEASIBLE. See TerminatesWithOneOf() below to make assertions in this case. Note also that some solvers have solver specific parameters to ensure that DUAL_INFEASIBLE will not be returned (e.g. for Gurobi, use DualReductions or InfUnbdInfo).
  • The objective value and variable values should always be compared up to a tolerance, even if your decision variables are integer. The matchers defined have a configurable tolerance with default value 1e-5.
  • Primal and dual rays are unique only up to a constant scaling. The matchers provided rescale both expected and actual before comparing.
  • Take care on problems with multiple optimal solutions. Do not rely on a particular solution being returned in your test, as the test will break when we upgrade the solver.

This file also defines functions to let gunit print various MathOpt types.

To see the error messages these matchers generate, run blaze test experimental/users/rander/math_opt:matchers_error_messages which is a fork of matchers_test.cc where the assertions are all negated (note that every test should fail).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. IWYU pragma: private, include "ortools/math_opt/cpp/math_opt.h" IWYU pragma: friend "ortools/math_opt/cpp/.*" Functions and classes used to solve a Model.

The main entry point is the Solve() function.

For users that need incremental solving, there is the IncrementalSolver class.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. IWYU pragma: private, include "ortools/math_opt/cpp/math_opt.h" IWYU pragma: friend "ortools/math_opt/cpp/.*" This headers defines C++ wrappers of solver specific initialization parameters that can be streamed to be exchanged with another process.

Parameters that can't be streamed (for example instances of C/C++ types that only exist in the process memory) are dealt with implementations of the NonStreamableSolverInitArguments.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. IWYU pragma: private, include "ortools/math_opt/cpp/math_opt.h" IWYU pragma: friend "ortools/math_opt/cpp/.*" An object oriented wrapper for variables in ModelStorage (used internally by Model) with support for arithmetic operations to build linear expressions and express linear constraints.

Types are:

  • Variable: a reference to a variable of an ModelStorage.
  • LinearExpression: a weighted sum of variables with an optional offset; something like 3*x + 2*y + 5.
  • LinearTerm: a term of a linear expression, something like 2*x. It is used as an intermediate in the arithmetic operations that builds linear expressions.
  • (Lower|Upper)BoundedLinearExpression: two classes representing the result of the comparison of a LinearExpression with a constant. For example 3*x / + 2*y + 5 >= 3.
      - BoundedLinearExpression: the result of the comparison of a linear
        expression with two bounds, an upper bound and a lower bound. For example
        `2 <= 3*x + 2*y + 5 <= 3`; or `4 >= 3*x + 2*y + 5 >= 1`.
    
      - QuadraticTermKey: a key used internally to represent a pair of Variables.
    
      - QuadraticTerm: a term representing the product of a scalar coefficient
        and two Variables (possibly the same); something like `2*x*y` or `3*x*x`.
        It is used as an intermediate in the arithmetic operations that build
        quadratic expressions.
    
      - QuadraticExpression: a sum of a quadratic terms, linear terms, and a
        scalar offset; something like `3*x*y + 2*x*x + 4x + 5`.
    
      - VariablesEquality: the result of comparing two Variable instances with
        the == operator. For example `a == b`. This intermediate class support
        implicit conversion to both bool and BoundedLinearExpression types. This
        enables using variables as key of maps (using the conversion to bool)
        without preventing adding constraints of variable equality.
    
    The basic arithmetic operators are overloaded for those types so that we can
    write math expressions with variables to build linear expressions. The >=, <=
    and == comparison operators are overloaded to produce BoundedLinearExpression
    that can be used to build constraints.
    
    For example we can have:
      const Variable x = ...;
      const Variable y = ...;
      const LinearExpression expr = 2 * x + 3 * y - 2;
      const BoundedLinearExpression bounded_expr = 1 <= 2 * x + 3 * y - 2 <= 10;
    
    To making working with containers of doubles/Variables/LinearExpressions
    easier, the template methods Sum() and InnerProduct() are provided, e.g.
      const std::vector<int> ints = ...;
      const std::vector<double> doubles = ...;
      const std::vector<Variable> vars = ...;
      const std::vector<LinearTerm> terms = ...;
      const std::vector<LinearExpression> exprs = ...;
      const LinearExpression s1 = Sum(ints);
      const LinearExpression s2 = Sum(doubles);
      const LinearExpression s3 = Sum(vars);
      const LinearExpression s4 = Sum(terms);
      const LinearExpression s5 = Sum(exprs);
      const LinearExpression p1 = InnerProduct(ints, vars);
      const LinearExpression p2 = InnerProduct(terms, doubles);
      const LinearExpression p3 = InnerProduct(doubles, exprs);
    These methods work on any iterable type (defining begin() and end()). For
    InnerProduct, the inputs must be of equal size, and a compile time error will
    be generated unless at least one input is a container of a type implicitly
    convertible to double.
    
    Pre C++20, avoid the use of std::accumulate and std::inner_product with
    LinearExpression, they cause a quadratic blowup in running time.
    
    While there is some complexity in the source, users typically should not need
    to look at types other than Variable and LinearExpression too closely. Their
    code usually will only refer to those types. 
    

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Let L be a matrix and b a vector so that a(w) = L * w + b. Then

max_w{ a(w) * x : w in W} = max_w{ w' * L' * x : w in W} + b * x

where ' is the transpose operation. Because of this we can focus on max_w{ l(w) * x : w in W}.

We need the dual to be an LP even when uncertainty_model contains ranged constraints, so we use the LP reformulation of go/mathopt-dual from go/mathopt-traditional-dual#lp-reformulation-split. Using that reformulation, for any fixed x the dual of max_w{ w' * L' * x : w in W} is

min_{y, yp, yn, r, rp, rn} obj(yp, yn, rp, rn)

A' y + r == L' * x
sign constraints on y and r
yp + yn == y
rp + rn == r
yp, rp >= 0
yn, rn <= 0

where

obj(yp, yn, rp, rn) = uc * yp + lc * yn + uv * rp + lv * rn

with the convention 0 * infinity = 0 * -infinity = 0.

In this dual form x is not multiplied with w so we can consider x a variable instead of a fixed value.

Then max_w{ a(w) * x : w in W} <= rhs is equivalent to

obj(yp, yn, rp, rn) + b * x <= rhs
A' y + r == L' * x
sign constraints on y and r
yp + yn == y
rp + rn == r
yp, rp >= 0
yn, rn <= 0
Note
we can use the equalities yp + yn == y and rp + rn == r to eliminate variables y and r to reduce the number of constraints and variables in the reformulation.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This header groups parameteric tests to validates behaviors common to MIP and LP solvers.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. How each parameter is tested:

Parameter IpParameterTest generic_test.h LargeInstanceTest
time_limit x x
iteration_limit x x
node_limit x x
cutoff_limit x x
objective_limit x x
best_bound_limit x x
solution_limit x x

enable_output | | x | threads | | | random_seed | x | | absolute_gap_tol | x | | x relative_gap_tol | x | | x solution_pool_size | | | lp_algorithm | x (bad) | | presolve | x | | cuts | x | | x heuristics | | | scaling | | |

solution_pool_size is tested in ip_multiple_solutions_tests.cc.

Testing some parameters requires that other parameters/stats are supported:

  • presolve (IpParameterTest) requires message callbacks
  • cuts (IpParameterTest) must disable presolve
  • cuts (LargeInstanceTest) needs node_limit=1.
  • lp_algorithm (IpParameterTest) test is just a no-crash test without supporting iteration counts in SolveStats.
  • solution_limit (IpParameterTest) requires a hint.
Todo

(b/180024054): add tests for:

  • threads
  • heuristics
  • scaling
  • lp_algorithm, differentiate between primal and dual simplex. E.g. find a problem with LP relaxation that is both infeasible and dual infeasible, disable presolve, and solve. When using primal simplex, we should get termination reason kInfeasible, but dual simplex should give kInfeasibleOrUnbounded.

(b/272268188): test the interaction between cutoff and primal + dual infeasibility.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Todo
(b/180024054): the following parameters are not tested:
  • time_limit
  • threads
  • scaling

The following parameters are under-tested:

  • lp_algorithm
Note
cuts and heuristics do not apply for LP. enable_output is tested in generic_tests.h.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Todo

(user): These tests are incomplete in a few ways; see mip_tests.cc

(user): Expand tests so they check primal, dual and/or primal-dual infeasible cases as appropriate.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This code builds an arc-flow generator for vector-bin-packing problems. see https://people.math.gatech.edu/~tetali/PUBLIS/CKPT.pdf It implements a non-recursive version of algorithm 1 described in: http://www.dcc.fc.up.pt/~fdabrandao/papers/arcflow_manuscript.pdf And in (poster version): http://www.dcc.fc.up.pt/~fdabrandao/papers/arcflow_poster.pdf Available at: https://drive.google.com/open?id=1y-Vs1orv-QHO4lb2sjVWrZr9GQd5d2st https://drive.google.com/open?id=1fsWRqgNJ_3ClrhoKIeVc1EOd5s8Mj33i (poster) Some improvements are not yet implemented:

  • Lifted stated: when storing a state of the dynamic programming forward pass, one can lift a state. A lifted state of a state S is a maximal increase of S that does not lose any state in the forward pass. A simple example is the following: bin, 1 dimension, capacity 5 After adding item 1 in the DP pass, the state is (2). The lifted state is (3) that is (5) - (2) which is the maximal increase of (2) that does not loose any state. To limit time spent computing this, one can lift a state only if the remaining number of item is below a threshold.

Disable the backward pass (compress state towards the bin capacity). Although this reduces the graph a lot, this simplication is not valid when the cost is not the number of bins, but a function of the capacity used (useful for fair allocation).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Parses vector packing data files, and creates a VectorBinPackingProblem

The supported file formats are:

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This header provides functions to help create random instances of the vehicle routing problem; random capacities and random time windows.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file contains the solver internal representation of the clauses and the classes used for their propagation.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Algorithms to encode constraints into their SAT representation. Currently, this contains one possible encoding of a cardinality constraint as used by the core-based optimization algorithm in optimization.h.

This is also known as the incremental totalizer encoding in the literature.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file contains all the top-level logic responsible for driving the search of a satisfiability integer problem. What decision we take next, which new Literal associated to an IntegerLiteral we create and when we restart.

For an optimization problem, our algorithm solves a sequence of decision problem using this file as an entry point. Note that some heuristics here still use the objective if there is one in order to orient the search towards good feasible solution though.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file contains the entry point for our presolve/inprocessing code.

Todo
(user): for now it is mainly presolve, but the idea is to call these function during the search so they should be as incremental as possible. That is avoid doing work that is not useful because nothing changed or exploring parts that were not done during the last round.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file implements a SAT solver. see http://en.wikipedia.org/wiki/Boolean_satisfiability_problem for more detail.

Todo
(user): Expand.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Implementation of a pure SAT presolver. This roughly follows the paper:

"Effective Preprocessing in SAT through Variable and Clause Elimination", Niklas Een and Armin Biere, published in the SAT 2005 proceedings.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Simple framework for choosing and distributing a solver "sub-tasks" on a set of threads.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. A Project Scheduling Library parser. See: http://www.om-db.wi.tum.de/psplib/ # PSP-Lib homepage.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Representation class for the capacity side-constraint for a weighted set-covering problem.

This constraint restricts the selection of elements within subsets that respect the constraint. Such a constraint can mix elements in any subset.

Using the same mixed-integer-programming formulation as set_cover_model.h, this class corresponds to the following constraint: min_capacity <= \sum_{e in elements} weight_e * x_e <= max_capacity

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Representation class for the weighted set-covering problem.

Let E be a "universe" set, let (S_j) be a family (j in J) of subsets of E, and c_j costs associated to each S_j. Note that J = {j in 1..S}.

The minimum-cost set-covering problem consists in finding K (for covering), a subset of J such that the union of all the S_j for k in K is equal to E (the subsets indexed by K "cover" E), while minimizing total cost sum c_k (k in K).

In Mixed-Integer Programming and matrix terms, the goal is to find values of binary variables x_j, where x_j is 1 when subset S_j is in K, 0 otherwise, that minimize the sum of c_j * x_j subject to M.x >= 1. Each row corresponds to an element in E.

The matrix M for linear constraints is defined as follows:

  • it has as many rows as there are elements in E.
  • its columns are such that M(i, j) = 1 iff the i-th element of E is present in S_j.

We also use m to denote E, the number of elements, and n to denote S, the number of subsets. Finally, NNZ denotes the numbers of non-zeros, i.e. the sum of the cardinalities of all the subsets.

Todo
(user): Add flags to:
  • Choose problems by name or by size: filter_name, max_elements, max_subsets.
  • Exclude problems by name: exclude_name.
  • Choose which solution generators to run.
  • Parameterize the number of threads. num_threads.

Copyright 2025 Francesco Cavaliere Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Provides functions and data structures that make it easier to work with aligned memory:

  • AlignedAllocator<T, n>, an extension of std::allocator<T> that also takes an explicit memory alignment parameter. The memory blocks returned by the allocator are aligned to this number of bytes, i.e. the address of the beginning of the block will be N * alignment_bytes for some N.
  • AlignedVector<>, a specialization of std::vector<> that uses the aligned allocator to create blocks with explicit allocations.
  • AlignUp and AlignDown are functions that align a pointer to the given number of bytes.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. A very simple flattened 2D array of fixed size. It's movable, copyable. It can also be assigned. This was originally made to replace uses of vector<vector<...>> where each vector had a fixed size: vector<vector<>> has much worse performance in a highly concurrent setting, because it does a lot of memory allocations.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Classes and function to convert floating point numbers to string so that no information is lost (i.e. that we can make a round trip from double to string and back to double without losing data).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Utility functions on IEEE floating-point numbers. Implemented on float, double, and long double.

Also a placeholder for tools controlling and checking FPU rounding modes.

IMPORTANT NOTICE: you need to compile your binary with -frounding-math if you want to use rounding modes.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file contains and adjustable priority queue templated by an Element class that must:

  • Be efficiently copiable and storable in a std::vector<Element>.
  • Be comparable via the templated Compare class. Top() will returns the element with the largest priority (like std::priority_queue).
  • Implements the "int Index() const" function that must returns an integer that uniquely identify this particular element. Ideally this index must be dense in [0, max_num_elements).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Classes for permuting indexable, ordered containers of data without depending on that data to be accessible in any particular way. The client needs to give us two things:

  1. a permutation to apply to some container(s) of data, and
  2. a description of how to move data around in the container(s).

The permutation (1) comes to us in the form of an array argument to PermutationApplier::Apply(), along with index values that tell us where in that array the permutation of interest lies. Typically those index values will span the entire array that describes the permutation.

Applying a permutation involves decomposing the permutation into disjoint cycles and walking each element of the underlying data one step around the unique cycle in which it participates. The decomposition into disjoint cycles is done implicitly on the fly as the code in PermutationApplier::Apply() advances through the array describing the permutation. As an important piece of bookkeeping to support the decomposition into cycles, the elements of the permutation array typically get modified somehow to indicate which ones have already been used.

At first glance, it would seem that if the containers are indexable, we don't need anything more complicated than just the permutation and the container of data we want to permute; it would seem we can just use the container's operator[] to retrieve and assign elements within the container. Unfortunately it's not so simple because the containers of interest can be indexable without providing any consistent way of accessing their contents that applies to all the containers of interest. For instance, if we could insist that every indexable container must define a value_type& operator[] we could simply use that for the assignments we need to do while walking around cycles of the permutation. This is not guaranteed though (common examples are std::vector<bool> or containers of bit-sized integers for which no c++ reference exists). This is the main reason we need a codified description (2) of how to move data around in the indexable container. That description comes to us via the PermutationApplier constructor's argument which is a PermutationCycleHandler instance. Such an object has three important methods defined: SetTempFromIndex(), SetIndexFromIndex(), and SetIndexFromTemp(). Those methods embody all we need to know about how to move data in the indexable container(s) underlying the PermutationCycleHandler.

Another reason we need the description (2) of how to move elements around in the container(s) is that it is often important to permute side-by-side containers of elements according to the same permutation. This situation, too, is covered by defining a PermutationCycleHandler that knows about multiple underlying indexable containers.

The above-mentioned PermutationCycleHandler methods embody knowledge of how to assign elements. It happens that PermutationCycleHandler is also a convenient place to embody the knowledge of how to keep track of which permutation elements have been consumed by the process of walking data around cycles. We depend on the PermutationCycleHandler instance we're given to define SetSeen() and Unseen() methods for that purpose.

For the common case in which elements can be accessed using operator[](), we provide the class template ArrayIndexCycleHandler.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file implements piecewise linear functions over int64_t. It is built by inserting segments.

This class maintains a minimal internal representation and checks for overflow.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The range minimum query problem is a range query problem where queries ask for the minimum of all elements in ranges of the array. The problem is divided into two phases:

  • precomputation: the data structure is given an array A of n elements.
  • query: the data structure must answer queries min(A, begin, end), where min(A, begin, end) = min_{i in [begin, end)} A[i]. This file has an implementation of the sparse table approach to solving the problem, for which the precomputation takes O(n*log(n)) time and memory, and further queries take O(1) time. Reference: https://en.wikipedia.org/wiki/Range_minimum_query.

The data structure allows to have multiple arrays at the same time, and to reset the arrays.

Usage, single range: RangeMinimumQuery rmq({10, 100, 30, 300, 70}); rmq.GetMinimumFromRange(0, 5); ///< Returns 10. rmq.GetMinimumFromRange(2, 4); ///< Returns 30.

Usage, multiple ranges: RangeMinimumQuery rmq({10, 100, 30, 300, 70}); rmq.GetMinimumFromRange(0, 5); ///< Returns 10. rmq.GetMinimumFromRange(2, 4); ///< Returns 30.

///< We add another array {-3, 10, 5, 2, 15, 3}. const int begin2 = rmq.TablesSize(); for (const int element : {-3, 10, 5, 2, 15, 3}) { rmq.PushBack(element); } rmq.MakeSparseTableFromNewElements(); rmq.GetMinimumFromRange(begin2 + 0, begin2 + 5); ///< Returns -3. rmq.GetMinimumFromRange(begin2 + 2, begin2 + 4); ///< Returns 2. rmq.GetMinimumFromRange(begin2 + 4, begin2 + 6); ///< Returns 3. ///< The previous array can still be queried. rmq.GetMinimumFromRange(1, 3); ///< Returns 30.

///< Forbidden, query ranges can only be within the same array. rmq.GetMinimumFromRange(3, 9); ///< Undefined.

rmq.Clear(); ///< All arrays have been removed, so no range query can be made. rmq.GetMinimumFromRange(0, 5); ///< Undefined.

///< Add a new range. for (const int element : {0, 3, 2}) { rmq.PushBack(element); } rmq.MakeSparseTableFromNewElements(); ///< Queries on the new array can be made.

Note
There are other space/time tradeoffs for this problem, but they are generally worse in terms of the constants in the O(1) query time, moreover their implementation is generally more involved.

Implementation: The idea is to cache every min(A, i, i+2^k). Provided this information, we can answer all queries in O(1): given a pair (i, j), first find the maximum k such that i + 2^k < j, then use min(A, i, j) = std::min(min(A, i, i+2^k), min(A, j-2^k, j)).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The header defines an interface for functions taking and returning an int64_t and supporting range queries over their domain and codomain.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This file contains implementations for saturated addition, subtraction and multiplication. Currently, there are three versions of the code. The code using the built-ins provided since GCC 5.0 now compiles really well with clang/LLVM on both x86_64 and ARM. It should therefore be the standard, but not for multiplication, see below.

For example, on ARM, only 4 instructions are needed, two of which are additions that can be executed in parallel.

On x86_64, we're keeping the code with inline assembly for GCC as GCC does manage to compile the code with built-ins properly. On x86_64, the product of two 64-bit registers is a 128-bit integer stored in two 64-bit registers. It's the carry flag that is set when the result exceeds 64 bits, not the overflow flag. Since the built-in uses the overflow flag, we have to resort on the assembly-based version of the code.

Sadly, MSVC does not support the built-ins nor does it support inline assembly. We have to rely on the generic, C++ only version of the code which is much slower.

Todo

(user): make this implementation the default everywhere.

(user): investigate the code generated by MSVC.

HACK(user): We spare significant time if we use an initializer here, because InlineVector<1> is able to recognize the fast path or "exactly one element". I was unable to obtain the same performance with any other recipe, I always had at least 1 more cycle. See BM_SingleIntervalDomainConstructor. Since the constructor takes very few cycles (most likely less than 10), that's quite significant.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Helper classes to track statistics of a program component.

Usage example: ///< Suppose you have a class that contains a factorization of a matrix B and ///< a Solve() function to solve the linear system B.x = a.

///< You will hold your stats in a Stats stats_ class member: struct Stats : public StatsGroup { Stats() : StatsGroup("BasisFactorization"), solve_time("solve_time", this), input_vector_density("input_vector_density", this), estimated_accuracy("estimated_accuracy", this) {}

TimeDistribution solve_time; RatioDistribution input_vector_density;

///< Values of a few components of B.x - a, updated on each solve. DoubleDistribution estimated_accuracy; }

///< You then add a few lines to your Solve() function: void Solve() { stats_.solve_time.StartTimer(); stats_.input_vector_density.Add(ComputeDensity()); ... ///< Do the work. stats_.estimated_accuracy.Add(EstimateAccuracy()); stats_.solve_time.StopTimerAndAddElapsedTime(); }

///< Now, calling stats_.StatString() will give you a summary of your stats: BasisFactorization { solve_time : num [min, max] average std_deviation total input_vector_density : num [min, max] average std_deviation estimated_accuracy : num [min, max] average std_deviation }

For measuring time, another alternative is to use the SCOPED_TIME_STAT macro. In our example above, you don't need to define the solve_time distribution and you can just do:

void Solve() { SCOPED_TIME_STAT(&stats_); ... }

This automatically adds a TimeDistribution with name "Solve" to stats_ and times your function calls!

IMPORTANT: The SCOPED_TIME_STAT() macro only does something if OR_STATS is defined, so you need to build your code with blaze build –copt='-DOR_STATS'. The idea is that by default the instrumentation is off. You can also use the macro IF_STATS_ENABLED() that does nothing if OR_STATS is not defined or just translates to its argument otherwise.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Generates strongly typed integer types.

StrongIndex is a simple template class mechanism for defining "logical" index-like class types that support some of the same functionalities as int, but which prevent assignment, construction, and other operations from other similar integer-like types. Essentially, the template class StrongIndex<StrongIndexName> has the additional property that it cannot be assigned to or constructed from another StrongIndex with a different StrongIndexName.

Usage DEFINE_STRONG_INDEX_TYPE(name); where name is the desired (unique) name for the "logical" index type.

StrongInt64 is a more general strong integer class based on int64_t. It has the same general type safeness, and supports more integer operators.

Usage DEFINE_STRONG_INT64_TYPE(name); where name is the desired (unique) name for the "logical" int64_t type.

SUPPORTED OPERATIONS -----------------------------------------------------—

The StrongIndex type is limited and only supports following operators are supported: unary: ++ (both prefix and postfix), comparison: ==, !=, <, <=, >, >=; assignment: =, +=, -=,; stream: <<. Each operator allows the same StrongIndexName and the int to be used on both left- and right-hand sides.

The StrongInt64 type supports all integer operators across StrongInt64 with the same StrongIntegerName and int64_t.

Both support an accessor value() returning the stored value.

The classes also define hash functors that allows the strong types to be used as key to hashable containers.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Set of integer tuples (fixed-size arrays, all of the same size) with a basic API. It supports several types of integer arrays transparently, with an inherent storage based on int64_t arrays.

The key feature is the "lazy" copy:

  • Copying an IntTupleSet won't actually copy the data right away; we will just have several IntTupleSet pointing at the same data.
  • Modifying an IntTupleSet which shares his data with others will create a new, modified instance of the data payload, and make the IntTupleSet point to that new data.
  • Modifying an IntTupleSet that doesn't share its data with any other IntTupleSet will modify the data directly. Therefore, you don't need to use const IntTupleSet& in methods. Just do: void MyMethod(IntTupleSet tuple_set) { ... }

This class is thread hostile as the copy and reference counter are not protected by a mutex.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Fast summation of arrays (vectors, spans) of numbers.

Speed: up to 2x faster than Eigen for float arrays with ~100 elements or more (as of 2023-05). Precision: Better or comparable precision to std::accumulate<> on the same value type. That said, the precision is inferior to precise sum algorithm such as AccurateSum.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. An array class for storing arrays of integers.

The range of indices is specified at the construction of the object. The minimum and maximum indices are inclusive. Think of the Pascal syntax array[min_index..max_index] of ...

For example, ZVector<int32_t>(-100000,100000) will store 200001 signed integers of 32 bits each, and the possible range of indices will be -100000..100000.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Initial version of this code was provided by RTE NOLINTNEXTLINE(build/c++17)

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/bop/bop_parameters.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/constraint_solver/assignment.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/constraint_solver/demon_profiler.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/constraint_solver/routing_enums.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/constraint_solver/routing_ils.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/constraint_solver/routing_parameters.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/constraint_solver/search_limit.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/constraint_solver/search_stats.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/constraint_solver/solver_parameters.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/glop/parameters.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/graph/flow_problem.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/gscip/gscip.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/linear_solver/linear_solver.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/callback.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/infeasible_subsystem.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/model.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/model_parameters.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/model_update.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/parameters.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/result.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/rpc.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/solution.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/solvers/glpk.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/solvers/gurobi.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/solvers/highs.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/solvers/osqp.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/math_opt/sparse_containers.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/packing/multiple_dimensions_bin_packing.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/packing/vector_bin_packing.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/pdlp/solve_log.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/pdlp/solvers.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/sat/boolean_problem.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/sat/cp_model.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/sat/cp_model_service.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/sat/routes_support_graph.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/sat/sat_parameters.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/scheduling/course_scheduling.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/scheduling/jobshop_scheduling.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/scheduling/rcpsp.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/set_cover/capacity.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/set_cover/set_cover.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/util/int128.proto Protobuf C++ Version: 6.31.1 Must be included last.

Generated by the protocol buffer compiler. DO NOT EDIT! NO CHECKED-IN PROTOBUF GENCODE source: ortools/util/optional_boolean.proto Protobuf C++ Version: 6.31.1 Must be included last.

Namespaces

namespace  base
namespace  bop
namespace  cap_prod_util
namespace  fz
namespace  glop
namespace  gtl
namespace  internal
 End of the interface. Below is the implementation.
namespace  lp_format
namespace  math_opt
 An object oriented wrapper for quadratic constraints in ModelStorage.
namespace  mb
namespace  packing
namespace  pdlp
 Validation utilities for solvers.proto.
namespace  routing
 Common utilities for parsing routing instances.
namespace  sat
namespace  scheduling
namespace  scp
namespace  Source
namespace  sysinfo
namespace  use_only_in_tests
namespace  utf8

Classes

class  AcceptanceStrategy
struct  AcceptanceStrategyDefaultTypeInternal
class  AccurateSum
class  AdaptiveParameterValue
class  AffineRelation
class  AlternativeNodeIterator
 Iterators on nodes used by Pathoperator to traverse the search space. More...
class  ArcIndexOrderingByTailNode
struct  ArcWithLength
struct  ArcWithLengthAndResources
class  ArgumentHolder
 Argument Holder: useful when visiting a model. More...
class  ArrayIndexCycleHandler
class  ArrayWithOffset
class  Assignment
class  AssignmentContainer
class  AssignmentElement
class  AssignmentProto
struct  AssignmentProtoDefaultTypeInternal
class  BaseInactiveNodeToPathOperator
class  BaseIntExpr
class  BaseKnapsackSolver
class  BaseLns
class  BaseNodeIterators
class  BaseObject
class  BaseObjectiveMonitor
class  BasePathFilter
 Generic path-based filter class. More...
class  BidirectionalDijkstra
class  BinaryIndexedTree
class  BinCapacities
class  Bitmap
class  BitQueue64
class  Bitset64
class  BlossomGraph
class  BooleanVar
class  BoolVectorBasedSolutionGenerator
class  BopInterface
class  BoundedDijkstraWrapper
class  BronKerboschAlgorithm
class  CachedLog
struct  CallbackRangeConstraint
struct  CallbackSetup
class  CallMethod0
 Demon proxy to a method on the constraint with no arguments. More...
class  CallMethod1
 Demon proxy to a method on the constraint with one argument. More...
class  CallMethod2
 Demon proxy to a method on the constraint with two arguments. More...
class  CallMethod3
 Demon proxy to a method on the constraint with three arguments. More...
class  CapacityConstraintProto
class  CapacityConstraintProto_CapacityTerm
class  CapacityConstraintProto_CapacityTerm_ElementWeightPair
struct  CapacityConstraintProto_CapacityTerm_ElementWeightPairDefaultTypeInternal
struct  CapacityConstraintProto_CapacityTermDefaultTypeInternal
struct  CapacityConstraintProtoDefaultTypeInternal
class  CapacityInvariant
class  CapacityModel
class  CastConstraint
class  CBCInterface
class  ChangeValue
class  CheapestAdditionFilteredHeuristic
class  CheapestInsertionFilteredHeuristic
class  ChristofidesFilteredHeuristic
class  ChristofidesPathSolver
class  ClassAssignment
struct  ClassAssignmentDefaultTypeInternal
struct  ClosedInterval
class  CloseRoutesRemovalRuinProcedure
 Removes a number of routes that are spatially close together. More...
class  CLPInterface
class  CommittableArray
class  CommittableValue
class  ComparatorCheapestAdditionFilteredHeuristic
class  CompleteGraph
class  CompositeRuinProcedure
class  CompressedStrongVector
class  CompressedStrongVectorIterator
class  ConstrainedShortestPathsOnDagWrapper
class  Constraint
class  ConstraintRuns
struct  ConstraintRunsDefaultTypeInternal
class  ConstraintSolverParameters
struct  ConstraintSolverParametersDefaultTypeInternal
class  ConstraintSolverStatistics
struct  ConstraintSolverStatisticsDefaultTypeInternal
class  CoolingScheduleStrategy
struct  CoolingScheduleStrategyDefaultTypeInternal
class  CostValueCycleHandler
class  Course
struct  CourseDefaultTypeInternal
class  CourseSchedulingModel
struct  CourseSchedulingModelDefaultTypeInternal
class  CourseSchedulingResult
struct  CourseSchedulingResultDefaultTypeInternal
class  CplexInterface
class  CppBridge
struct  CppFlags
class  Cross
 --— Cross --— More...
class  CumulBoundsPropagator
struct  DebugStringFormatter
 Helper to display a object with a DebugString method in a absl::StrJoin. More...
class  Decision
class  DecisionBuilder
class  DecisionVisitor
struct  DefaultPhaseParameters
class  DefaultSolutionPool
class  DelayedCallMethod0
 Low-priority demon proxy to a method on the constraint with no arguments. More...
class  DelayedCallMethod1
 Low-priority demon proxy to a method on the constraint with one argument. More...
class  DelayedCallMethod2
 Low-priority demon proxy to a method on the constraint with two arguments. More...
class  Demon
class  DemonProfiler
class  DemonRuns
struct  DemonRunsDefaultTypeInternal
class  DenseDoublyLinkedList
class  DenseIntDuplicateRemover
class  DenseSet
class  Dimension
 -------— Dimension -------— More...
class  DimensionChecker
class  DimensionCumulOptimizerCore
class  DimensionValues
class  DisabledScopedTimeDistributionUpdater
class  DisabledScopedTimeStats
class  DisjunctiveConstraint
struct  DistanceAndParentArc
class  DistanceContainer
 Path container which only stores distances between path nodes. More...
class  DistributionStat
class  Domain
class  DoubleDistribution
 Statistic on the distribution of a sequence of doubles. More...
class  DynamicPartition
class  DynamicPermutation
class  ElementDegreeSolutionGenerator
 The consistency level is maintained up to kFreeAndUncovered. More...
class  ElementIterator
class  EnabledScopedTimeDistributionUpdater
class  EnabledScopedTimeStats
class  EvaluatorCheapestAdditionFilteredHeuristic
class  Exchange
 --— Exchange --— More...
class  ExchangeAndMakeActiveOperator
 --— ExchangeAndMakeActiveOperator --— More...
class  ExchangePathStartEndsAndMakeActiveOperator
 --— ExchangePathEndsAndMakeActiveOperator --— More...
class  ExchangeSubtrip
class  ExtendedSwapActiveOperator
 --— ExtendedSwapActiveOperator --— More...
class  FilteredHeuristicCloseNodesLNSOperator
class  FilteredHeuristicExpensiveChainLNSOperator
class  FilteredHeuristicLocalSearchOperator
class  FilteredHeuristicPathLNSOperator
class  FilterModelView
class  FinalizerVariables
class  FindOneNeighbor
 --— Finds a neighbor of the assignment passed --— More...
class  FirstSolutionStrategy
struct  FirstSolutionStrategyDefaultTypeInternal
class  FixedShapeBinaryTree
class  FlatMatrix
 NOTE(user): T=bool is not yet supported (the [] operator doesn't work). More...
class  FloatSlopePiecewiseLinearFunction
class  FlowArcProto
struct  FlowArcProtoDefaultTypeInternal
class  FlowModelProto
struct  FlowModelProtoDefaultTypeInternal
class  FlowNodeProto
struct  FlowNodeProtoDefaultTypeInternal
class  GenericMaxFlow
class  GenericMinCostFlow
 Forward declaration. More...
class  GenericPathContainer
class  GlobalCheapestInsertionFilteredHeuristic
class  GlobalDimensionCumulOptimizer
class  GLOPInterface
class  GLPKInformation
 Class to store information gathered in the callback. More...
class  GLPKInterface
struct  GraphPathWithLength
class  GraphSymmetryFinder
class  GreedySolutionGenerator
 The consistency level is maintained up to kFreeAndUncovered. More...
class  GroupPairAndRelocateOperator
struct  GScipCallbackStats
class  GScipConstraintHandler
class  GScipConstraintHandlerContext
struct  GScipConstraintHandlerProperties
struct  GScipCutOptions
 Options passed to SCIP when adding a cut. More...
class  GScipEventHandler
class  GScipEventHandlerContext
struct  GScipEventHandlerDescription
struct  GScipIndicatorRangeConstraint
struct  GScipLazyConstraintOptions
 Options passed to SCIP when adding a lazy constraint. More...
struct  GScipLinearExpr
class  GScipOutput
struct  GScipOutputDefaultTypeInternal
class  GScipParameters
class  GScipParameters_BoolParamsEntry_DoNotUse
struct  GScipParameters_BoolParamsEntry_DoNotUseDefaultTypeInternal
class  GScipParameters_CharParamsEntry_DoNotUse
struct  GScipParameters_CharParamsEntry_DoNotUseDefaultTypeInternal
class  GScipParameters_IntParamsEntry_DoNotUse
struct  GScipParameters_IntParamsEntry_DoNotUseDefaultTypeInternal
class  GScipParameters_LongParamsEntry_DoNotUse
struct  GScipParameters_LongParamsEntry_DoNotUseDefaultTypeInternal
class  GScipParameters_RealParamsEntry_DoNotUse
struct  GScipParameters_RealParamsEntry_DoNotUseDefaultTypeInternal
class  GScipParameters_StringParamsEntry_DoNotUse
struct  GScipParameters_StringParamsEntry_DoNotUseDefaultTypeInternal
struct  GScipParametersDefaultTypeInternal
class  GScipSolvingStats
struct  GScipSolvingStatsDefaultTypeInternal
class  GuidedLocalSearch
 The consistency level is maintained up to kRedundancy. More...
class  GuidedTabuSearch
 The consistency level is maintained up to kFreeAndUncovered. More...
class  GurobiInterface
class  HamiltonianPathSolver
class  HighsInterface
class  HungarianOptimizer
class  IfThenElseCt
 -------— Generalized element -------— More...
class  ImprovementSearchLimit
class  IndexListModelView
class  IndexPairSwapActiveOperator
class  IndexRange
class  IndexRangeIterator
 The iterator for an IndexRange. More...
class  InitAndGetValues
class  InMemoryCompactPathContainer
 Path container which stores explicit paths and distances between path nodes. More...
class  InsertionSequenceContainer
class  InsertionSequenceGenerator
 Generates insertion positions respecting structural constraints. More...
class  Int128
struct  Int128DefaultTypeInternal
class  IntegerDistribution
 Statistic on the distribution of a sequence of integers. More...
class  IntegerPriorityQueue
class  IntersectingSubsetsIterator
class  IntersectingSubsetsRange
class  IntervalVar
class  IntervalVarAssignment
struct  IntervalVarAssignmentDefaultTypeInternal
class  IntervalVarElement
class  IntExpr
class  IntTupleSet
 --— Main IntTupleSet class --— More...
class  IntVar
class  IntVarAssignment
struct  IntVarAssignmentDefaultTypeInternal
class  IntVarElement
class  IntVarFilteredDecisionBuilder
class  IntVarFilteredHeuristic
 Generic filter-based heuristic applied to IntVars. More...
class  IntVarIterator
class  IntVarLocalSearchFilter
class  IntVarLocalSearchOperator
class  IterableContainer
class  IterableContainerBase
class  IteratedLocalSearchParameters
struct  IteratedLocalSearchParametersDefaultTypeInternal
class  Knapsack64ItemsSolver
struct  KnapsackAssignment
class  KnapsackBruteForceSolver
class  KnapsackCapacityPropagator
class  KnapsackCpSat
 --— KnapsackCpSat --— More...
class  KnapsackDivideAndConquerSolver
class  KnapsackDynamicProgrammingSolver
class  KnapsackGenericSolver
class  KnapsackInterface
struct  KnapsackItem
struct  KnapsackItemWithEfficiency
class  KnapsackMIPSolver
 --— KnapsackMIPSolver --— More...
class  KnapsackPropagator
class  KnapsackSearchNode
class  KnapsackSearchPath
class  KnapsackSolver
class  KnapsackState
struct  KShortestPaths
class  KShortestPathsOnDagWrapper
class  LatticeMemoryManager
class  LazyElementDegreeSolutionGenerator
class  LazyMutableCopy
class  LazySteepestSearch
class  LightIntFunctionElementCt
 --— LightIntFunctionElementCt --— More...
class  LightIntIntFunctionElementCt
 --— LightIntIntFunctionElementCt --— More...
class  LightIntIntIntFunctionElementCt
 --— LightIntIntIntFunctionElementCt --— More...
class  LightPairRelocateOperator
class  LightVehicleBreaksChecker
class  LinearExpr
class  LinearRange
class  LinearSumAssignment
 This class does not take ownership of its underlying graph. More...
class  LinKernighan
class  LocalCheapestInsertionFilteredHeuristic
class  LocalDimensionCumulOptimizer
class  LocalSearch
 --— Local search decision builder --— More...
class  LocalSearchFilter
class  LocalSearchFilterManager
class  LocalSearchMetaheuristic
struct  LocalSearchMetaheuristicDefaultTypeInternal
class  LocalSearchMonitor
class  LocalSearchMonitorPrimary
 -------— Local Search Monitor Primary -------— More...
class  LocalSearchOperator
class  LocalSearchOperatorState
class  LocalSearchPhaseParameters
 -------— Local Search Phase Parameters -------— More...
class  LocalSearchProfiler
 --— LocalSearchProfiler --— More...
class  LocalSearchState
class  LocalSearchStatistics
class  LocalSearchStatistics_FirstSolutionStatistics
struct  LocalSearchStatistics_FirstSolutionStatisticsDefaultTypeInternal
class  LocalSearchStatistics_LocalSearchFilterStatistics
struct  LocalSearchStatistics_LocalSearchFilterStatisticsDefaultTypeInternal
class  LocalSearchStatistics_LocalSearchOperatorStatistics
struct  LocalSearchStatistics_LocalSearchOperatorStatisticsDefaultTypeInternal
struct  LocalSearchStatisticsDefaultTypeInternal
class  LocationContainer
class  MakeActiveAndRelocateOperator
 --— MakeActiveAndRelocate --— More...
class  MakeActiveOperator
 --— MakeActiveOperator --— More...
class  MakeChainInactiveOperator
 --— MakeChainInactiveOperator --— More...
class  MakeInactiveOperator
 --— MakeInactiveOperator --— More...
class  MakePairActiveOperator
class  MakePairInactiveOperator
 Operator which makes pairs of active nodes inactive. More...
class  MakeRelocateNeighborsOperator
class  MathUtil
class  MatrixOrFunction
class  MatrixOrFunction< ScalarType, std::vector< std::vector< ScalarType > >, square >
 Specialization for vector-based matrices. More...
class  MaxFlowStatusClass
class  MergingPartition
class  Message
struct  MinCostFlow
class  MinCostFlowBase
class  MinCostPerfectMatching
class  ModelCache
class  ModelParser
 Model Parser. More...
class  ModelVisitor
 Model visitor. More...
class  MonoidOperationTree
class  MPAbsConstraint
struct  MPAbsConstraintDefaultTypeInternal
class  MPArrayConstraint
struct  MPArrayConstraintDefaultTypeInternal
class  MPArrayWithConstantConstraint
struct  MPArrayWithConstantConstraintDefaultTypeInternal
class  MPCallback
class  MPCallbackContext
class  MPCallbackList
class  MPCallbackWrapper
 Wraps the MPCallback in order to catch and store exceptions. More...
class  MPConstraint
class  MPConstraintProto
struct  MPConstraintProtoDefaultTypeInternal
class  MPGeneralConstraintProto
struct  MPGeneralConstraintProtoDefaultTypeInternal
class  MPIndicatorConstraint
struct  MPIndicatorConstraintDefaultTypeInternal
class  MPModelDeltaProto
class  MPModelDeltaProto_ConstraintOverridesEntry_DoNotUse
struct  MPModelDeltaProto_ConstraintOverridesEntry_DoNotUseDefaultTypeInternal
class  MPModelDeltaProto_VariableOverridesEntry_DoNotUse
struct  MPModelDeltaProto_VariableOverridesEntry_DoNotUseDefaultTypeInternal
struct  MPModelDeltaProtoDefaultTypeInternal
struct  MPModelExportOptions
 Export options. More...
class  MPModelProto
class  MPModelProto_Annotation
struct  MPModelProto_AnnotationDefaultTypeInternal
struct  MPModelProtoDefaultTypeInternal
class  MPModelRequest
struct  MPModelRequestDefaultTypeInternal
class  MPObjective
 A class to express a linear objective. More...
class  MPQuadraticConstraint
struct  MPQuadraticConstraintDefaultTypeInternal
class  MPQuadraticObjective
struct  MPQuadraticObjectiveDefaultTypeInternal
class  MPSolution
struct  MPSolutionDefaultTypeInternal
class  MPSolutionResponse
struct  MPSolutionResponseDefaultTypeInternal
class  MPSolveInfo
struct  MPSolveInfoDefaultTypeInternal
class  MPSolver
class  MPSolverCommonParameters
struct  MPSolverCommonParametersDefaultTypeInternal
class  MPSolverInterface
class  MPSolverParameters
class  MPSosConstraint
struct  MPSosConstraintDefaultTypeInternal
class  MPVariable
 The class for variables of a Mathematical Programming (MP) model. More...
class  MPVariableProto
struct  MPVariableProtoDefaultTypeInternal
class  NearestNeighbors
 --— Lin-Kernighan --— More...
class  NeighborAcceptanceCriterion
 Neighbor acceptance criterion interface. More...
class  NeighborhoodLimit
 --— Limit the number of neighborhoods explored --— More...
class  NestedTimeLimit
class  NodeEntry
 Priority queue node entry in the boundary of the Dijkstra algorithm. More...
class  NodeNeighborIterator
class  NumericalRev
 Subclass of Rev<T> which adds numerical operations. More...
class  NumericalRevArray
 Subclass of RevArray<T> which adds numerical operations. More...
class  ObjectiveMonitor
class  OptimizeVar
class  OptionalDouble
struct  OptionalDoubleDefaultTypeInternal
class  OrToolsVersion
class  Pack
class  PairExchangeOperator
class  PairExchangeRelocateOperator
class  PairNodeSwapActiveOperator
class  PairRelocateOperator
class  ParallelSavingsFilteredHeuristic
class  PartialVariableAssignment
struct  PartialVariableAssignmentDefaultTypeInternal
class  PathEnergyCostChecker
class  PathLns
 --— Path-based Large Neighborhood Search --— More...
class  PathOperator
class  PathState
class  PathTree
struct  PathWithLength
class  PdlpInterface
class  PermutationApplier
class  PermutationCycleHandler
class  PerturbationStrategy
struct  PerturbationStrategyDefaultTypeInternal
class  PickupAndDeliveryData
 A utility class to maintain pickup and delivery information of nodes. More...
struct  PickupDeliveryInsertion
struct  PickupDeliveryPair
class  PiecewiseLinearExpr
 --— Piecewise Linear --— More...
class  PiecewiseLinearFunction
class  PiecewiseSegment
class  PrePostVisitValues
class  PriorityQueueWithRestrictedPush
class  ProfiledDecisionBuilder
class  PropagationBaseObject
 NOLINT. More...
class  PropagationMonitor
class  PruningHamiltonianSolver
struct  QapProblem
class  Queue
class  RandomDemand
 Random demand. More...
class  RandomSolutionGenerator
 The consistency level is maintained up to kFreeAndUncovered. More...
class  RandomWalkRemovalRuinProcedure
class  RandomWalkRuinStrategy
struct  RandomWalkRuinStrategyDefaultTypeInternal
class  RangeIntToIntFunction
class  RangeMinimumIndexQuery
class  RangeMinimumQuery
class  RangeMinMaxIndexFunction
class  RatioDistribution
 Statistic on the distribution of a sequence of ratios, displayed as %. More...
class  RegularLimit
class  RegularLimitParameters
struct  RegularLimitParametersDefaultTypeInternal
class  Relocate
 --— Relocate --— More...
class  RelocateAndMakeActiveOperator
 -— RelocateAndMakeActiveOperator --— More...
class  RelocateAndMakeInactiveOperator
 --— RelocateAndMakeInactiveOperator --— More...
class  RelocateExpensiveChain
class  RelocatePathAndHeuristicInsertUnperformedOperator
class  RelocateSubtrip
class  Rev
class  RevArray
class  RevBitMatrix
 Matrix version of the RevBitSet class. More...
class  RevBitSet
class  ReversibleInterface
class  RevGrowingArray
class  RevGrowingMultiMap
 A basic backtrackable multi map that can only grow (except on backtrack). More...
class  RevImmutableMultiMap
class  RevIntSet
class  RevMap
class  RevPartialSequence
 --— RevPartialSequence --— More...
class  RevRepository
class  RevSwitch
 A reversible switch that can switch once from false to true. More...
class  RevVector
 A basic reversible vector implementation. More...
class  Room
struct  RoomDefaultTypeInternal
class  RootedTree
class  RoundRobinCompoundObjectiveMonitor
 -------— Objective Management -------— More...
class  RoundTripDoubleFormat
class  RoutingCPSatWrapper
class  RoutingFilteredHeuristic
 Filter-based heuristic dedicated to routing. More...
class  RoutingGlopWrapper
class  RoutingIndexManager
class  RoutingLinearSolverWrapper
class  RoutingModelInspector
class  RoutingModelParameters
struct  RoutingModelParametersDefaultTypeInternal
class  RoutingSearchParameters
class  RoutingSearchParameters_ImprovementSearchLimitParameters
struct  RoutingSearchParameters_ImprovementSearchLimitParametersDefaultTypeInternal
class  RoutingSearchParameters_LocalSearchNeighborhoodOperators
struct  RoutingSearchParameters_LocalSearchNeighborhoodOperatorsDefaultTypeInternal
struct  RoutingSearchParametersDefaultTypeInternal
class  RoutingSearchStatus
struct  RoutingSearchStatusDefaultTypeInternal
class  RoutingSolution
 Wraps a routing assignment providing extra features. More...
class  RuinAndRecreateDecisionBuilder
class  RuinCompositionStrategy
struct  RuinCompositionStrategyDefaultTypeInternal
class  RuinProcedure
 Ruin interface. More...
class  RuinRecreateParameters
struct  RuinRecreateParametersDefaultTypeInternal
class  RuinStrategy
struct  RuinStrategyDefaultTypeInternal
class  RunningAverage
class  RunningMax
class  SatInterface
class  SavingsFilteredHeuristic
struct  ScipCallbackConstraintOptions
class  ScipConstraintHandler
class  ScipConstraintHandlerContext
struct  ScipConstraintHandlerDescription
class  ScipConstraintHandlerForMPCallback
class  SCIPInterface
class  ScipMPCallbackContext
class  ScopedFloatingPointEnv
class  ScopedSolveInterrupterCallback
 ---------------— Search class --------------— More...
class  SearchLimit
 Base class of all search limits. More...
class  SearchLog
class  SearchMonitor
 A search monitor is a simple set of callbacks to monitor all search events. More...
class  SearchStatistics
struct  SearchStatisticsDefaultTypeInternal
class  SequenceVar
class  SequenceVarAssignment
struct  SequenceVarAssignmentDefaultTypeInternal
class  SequenceVarElement
class  SequentialSavingsFilteredHeuristic
class  ServiceTimePlusTransition
 Service time (proportional to demand) + transition time callback. More...
class  Set
class  SetCoverAssignment
class  SetCoverDecision
 A helper class used to store the decisions made during a search. More...
class  SetCoverInvariant
class  SetCoverLagrangian
class  SetCoverMip
class  SetCoverModel
 Main class for describing a weighted set-covering problem. More...
class  SetCoverProto
class  SetCoverProto_Subset
struct  SetCoverProto_SubsetDefaultTypeInternal
struct  SetCoverProtoDefaultTypeInternal
class  SetCoverReader
class  SetCoverSolutionGenerator
class  SetCoverSolutionResponse
struct  SetCoverSolutionResponseDefaultTypeInternal
class  SetRangeIterator
class  SetRangeWithCardinality
class  SharedTimeLimit
 Wrapper around TimeLimit to make it thread safe and add Stop() support. More...
class  ShortestPathOnAlternatives
class  ShortestPathsOnDagWrapper
class  SigintHandler
class  SigtermHandler
class  SimpleDynamicPartition
class  SimpleLinearSumAssignment
class  SimpleMaxFlow
class  SimpleMinCostFlow
class  SimpleRevFIFO
class  SimulatedAnnealingParameters
struct  SimulatedAnnealingParametersDefaultTypeInternal
class  SISRRuinProcedure
class  SISRRuinStrategy
struct  SISRRuinStrategyDefaultTypeInternal
struct  SlopeAndYIntercept
class  SmallRevBitSet
class  SolutionCollector
class  SolutionPool
class  SolveInterrupter
class  Solver
 For the time being, Solver is neither MT_SAFE nor MT_HOT. More...
class  SolverLogger
class  SortedDisjointIntervalList
class  SparseBitset
class  SparsePermutation
class  SpatiallyCloseRoutesRuinStrategy
struct  SpatiallyCloseRoutesRuinStrategyDefaultTypeInternal
class  Stat
 Base class for a statistic that can be pretty-printed. More...
struct  StateInfo
 ---------------— StateMarker / StateInfo struct --------— More...
struct  StateMarker
class  StatsGroup
 Base class to print a nice summary of a group of statistics. More...
class  SteepestSearch
 The consistency level is maintained up to kFreeAndUncovered. More...
class  StopServiceTimePlusTransition
 Stop service time + transition time callback. More...
class  StopWatch
class  StrongIndex
class  StrongInt64
class  StrongModelView
class  Student
class  StudentAssignment
struct  StudentAssignmentDefaultTypeInternal
struct  StudentDefaultTypeInternal
class  SubDagComputer
class  SubsetListBasedSolutionGenerator
class  SwapActiveChainOperator
 --— SwapActiveChainOperator --— More...
class  SwapActiveOperator
 --— SwapActiveOperator --— More...
class  SwapActiveToShortestPathOperator
 | / \ ^ More...
class  SwapIndexPairOperator
class  SweepArranger
class  SymmetryBreaker
class  SymmetryManager
 -------— Symmetry Breaking -------— More...
class  TabuList
class  Teacher
struct  TeacherDefaultTypeInternal
class  ThetaLambdaTree
class  ThreadPool
class  TimeDistribution
class  TimeLimit
class  TimeLimitCheckEveryNCalls
class  Trace
 -------— Trace -------— More...
struct  Trail
class  TrivialSolutionGenerator
 The consistency level is maintained up to kFreeAndUncovered. More...
class  TSPLns
class  TSPOpt
 --— TSP-based operators --— More...
class  TwoOpt
 --— 2Opt --— More...
class  TwoOptWithShortestPathOperator
class  unique_ptr
 STL class. More...
class  UnsortedNullableRevBitset
class  VectorOrFunction
 Template to abstract the access to STL functions or vector values. More...
class  VectorOrFunction< ScalarType, std::vector< ScalarType > >
 Specialization for vectors. More...
class  VehicleTypeCurator
class  WeightedBronKerboschBitsetAlgorithm
class  WeightedWaveletTree
class  WorkerInfo
struct  WorkerInfoDefaultTypeInternal
class  XpressInterface
class  XpressMPCallbackContext
class  ZVector

Typedefs

typedef KnapsackItemKnapsackItemPtr
using NeighborAccessor
 --— Path-based Operators --—
using VariableDomainId = LocalSearchState::VariableDomainId
using NodeId = SubDagComputer::NodeId
using ArcId = SubDagComputer::ArcId
typedef std::function< int64_t(int64_t)> RoutingTransitCallback1
typedef std::function< int64_t(int64_t, int64_t)> RoutingTransitCallback2
typedef std::function< const FloatSlopePiecewiseLinearFunction *(int64_t, int64_t)> RoutingCumulDependentTransitCallback2
typedef int PathNodeIndex
using NodeIndex = BlossomGraph::NodeIndex
using CostValue = BlossomGraph::CostValue
typedef uint32_t PathDistance
typedef util::ReverseArcStaticGraph Graph
 Type of graph to use.
using GScipMessageHandler
typedef std::function< int64_t(RoutingNodeIndex, RoutingNodeIndex)> RoutingNodeEvaluator2
using Cost = double
 Basic non-strict type for cost. The speed penalty for using double is ~2%.
using BaseInt = int32_t
using SubsetRange = util_intops::StrongIntRange<SubsetIndex>
using ElementRange = util_intops::StrongIntRange<ElementIndex>
using ColumnEntryRange = util_intops::StrongIntRange<ColumnEntryIndex>
using SubsetCostVector = util_intops::StrongVector<SubsetIndex, Cost>
using ElementCostVector = util_intops::StrongVector<ElementIndex, Cost>
using SparseColumn = util_intops::StrongVector<ColumnEntryIndex, ElementIndex>
using SparseRow = util_intops::StrongVector<RowEntryIndex, SubsetIndex>
using ElementToIntVector = util_intops::StrongVector<ElementIndex, BaseInt>
using SubsetToIntVector = util_intops::StrongVector<SubsetIndex, BaseInt>
using SparseColumnView = util_intops::StrongVector<SubsetIndex, SparseColumn>
 Views of the sparse vectors.
using SparseRowView = util_intops::StrongVector<ElementIndex, SparseRow>
using SubsetBoolVector = util_intops::StrongVector<SubsetIndex, bool>
using ElementBoolVector = util_intops::StrongVector<ElementIndex, bool>
using ElementToSubsetVector
 Maps from element to subset. Useful to compress the sparse row view.
using CompressedColumn = CompressedStrongVector<ColumnEntryIndex, ElementIndex>
using CompressedRow = CompressedStrongVector<RowEntryIndex, SubsetIndex>
using CompressedColumnView
using CompressedRowView
using CompressedColumnIterator
using CompressedRowIterator
using CapacityWeight = int64_t
 Basic type for weights. For now, the same as Cost for the set covering.
using CapacityElements
using CapacitySubsets
using CapacityWeights
using CL = SetCoverInvariant::ConsistencyLevel
template<typename IndexType, typename ValueType>
using StrictVector = glop::StrictITIVector<IndexType, ValueType>
using BenchmarksTableRow
using FullElementCostVector = util_intops::StrongVector<FullElementIndex, Cost>
using FullSubsetCostVector = util_intops::StrongVector<FullSubsetIndex, Cost>
using FullElementBoolVector = util_intops::StrongVector<FullElementIndex, bool>
using FullSubsetBoolVector = util_intops::StrongVector<FullSubsetIndex, bool>
using FullElementToIntVector
using FullSubsetToIntVector
using FullToCoreElementMapVector
using CoreToFullElementMapVector
using FullToCoreSubsetMapVector
using CoreToFullSubsetMapVector
template<typename T, size_t alignment_bytes>
using AlignedAllocator
 Support for aligned containers in STL.
template<typename T, size_t alignment_bytes>
using AlignedVector = std::vector<T, AlignedAllocator<T, alignment_bytes>>
template<typename T>
using UnsafeDenseSet = DenseSet<T, false>
using random_engine_t = std::mt19937_64
typedef std::pair< int64_t, int64_t > Fraction
template<class Iterator>
using value_type_t = typename std::iterator_traits<Iterator>::value_type
using ScopedTimeDistributionUpdater = DisabledScopedTimeDistributionUpdater
using ScopedTimeStats = DisabledScopedTimeStats
typedef ZVector< int8_t > Int8ZVector
 Shorthands for all the types of ZVector's.
typedef ZVector< int16_t > Int16ZVector
typedef ZVector< int32_t > Int32ZVector
typedef ZVector< int64_t > Int64ZVector
typedef ZVector< uint8_t > UInt8ZVector
typedef ZVector< uint16_t > UInt16ZVector
typedef ZVector< uint32_t > UInt32ZVector
typedef ZVector< uint64_t > UInt64ZVector

Enumerations

enum  VarTypes {
  UNSPECIFIED , DOMAIN_INT_VAR , BOOLEAN_VAR , CONST_VAR ,
  VAR_ADD_CST , VAR_TIMES_CST , CST_SUB_VAR , OPP_VAR ,
  TRACE_VAR
}
enum class  DimensionSchedulingStatus { OPTIMAL , RELAXED_OPTIMAL_ONLY , FEASIBLE , INFEASIBLE }
enum class  CliqueResponse { CONTINUE , STOP }
enum class  BronKerboschAlgorithmStatus { COMPLETED , INTERRUPTED }
enum class  GScipCallbackResult {
  kDidNotRun = 1 , kDelayed = 2 , kDidNotFind = 3 , kFeasible = 4 ,
  kInfeasible = 5 , kUnbounded = 6 , kCutOff = 7 , kSeparated = 8 ,
  kNewRound = 9 , kReducedDomain = 10 , kConstraintAdded = 11 , kConstraintChanged = 12 ,
  kBranched = 13 , kSolveLp = 14 , kFoundSolution = 15 , kSuspend = 16 ,
  kSuccess = 17 , kDelayNode = 18
}
 Equivalent to type_result.h in SCIP. More...
enum class  RoundingLockDirection { kUp , kDown , kBoth }
enum class  ConstraintHandlerCallbackType {
  kSepaLp , kSepaSol , kEnfoLp , kEnfoPs ,
  kConsCheck , kConsLock
}
enum class  GScipMessageType { kInfoMessage , kDialogMessage , kWarningMessage }
enum class  MPCallbackEvent {
  kUnknown , kPolling , kPresolve , kSimplex ,
  kMip , kMipSolution , kMipNode , kBarrier ,
  kMessage , kMultiObj
}
enum class  ScipSeparationResult { kLazyConstraintAdded , kCuttingPlaneAdded , kDidNotFind }
enum  CUSTOM_INTERRUPT_REASON { CALLBACK_EXCEPTION = 0 }
enum class  SetCoverMipSolver : int {
  SCIP = 0 , SAT = 1 , GUROBI = 2 , GLOP = 3 ,
  PDLP = 4
}
enum class  FileFormat {
  EMPTY , ORLIB , RAIL , FIMI ,
  PROTO , PROTO_BIN , TXT
}
enum class  ProtoWriteFormat { kProtoText , kProtoBinary , kJson , kCanonicalJson }
enum  FirstSolutionStrategy_Value : int {
  FirstSolutionStrategy_Value_UNSET = 0 , FirstSolutionStrategy_Value_AUTOMATIC = 15 , FirstSolutionStrategy_Value_PATH_CHEAPEST_ARC = 3 , FirstSolutionStrategy_Value_PATH_MOST_CONSTRAINED_ARC = 4 ,
  FirstSolutionStrategy_Value_EVALUATOR_STRATEGY = 5 , FirstSolutionStrategy_Value_SAVINGS = 10 , FirstSolutionStrategy_Value_PARALLEL_SAVINGS = 17 , FirstSolutionStrategy_Value_SWEEP = 11 ,
  FirstSolutionStrategy_Value_CHRISTOFIDES = 13 , FirstSolutionStrategy_Value_ALL_UNPERFORMED = 6 , FirstSolutionStrategy_Value_BEST_INSERTION = 7 , FirstSolutionStrategy_Value_PARALLEL_CHEAPEST_INSERTION = 8 ,
  FirstSolutionStrategy_Value_SEQUENTIAL_CHEAPEST_INSERTION = 14 , FirstSolutionStrategy_Value_LOCAL_CHEAPEST_INSERTION = 9 , FirstSolutionStrategy_Value_LOCAL_CHEAPEST_COST_INSERTION = 16 , FirstSolutionStrategy_Value_GLOBAL_CHEAPEST_ARC = 1 ,
  FirstSolutionStrategy_Value_LOCAL_CHEAPEST_ARC = 2 , FirstSolutionStrategy_Value_FIRST_UNBOUND_MIN_VALUE = 12 , FirstSolutionStrategy_Value_FirstSolutionStrategy_Value_INT_MIN_SENTINEL_DO_NOT_USE_ , FirstSolutionStrategy_Value_FirstSolutionStrategy_Value_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  LocalSearchMetaheuristic_Value : int {
  LocalSearchMetaheuristic_Value_UNSET = 0 , LocalSearchMetaheuristic_Value_AUTOMATIC = 6 , LocalSearchMetaheuristic_Value_GREEDY_DESCENT = 1 , LocalSearchMetaheuristic_Value_GUIDED_LOCAL_SEARCH = 2 ,
  LocalSearchMetaheuristic_Value_SIMULATED_ANNEALING = 3 , LocalSearchMetaheuristic_Value_TABU_SEARCH = 4 , LocalSearchMetaheuristic_Value_GENERIC_TABU_SEARCH = 5 , LocalSearchMetaheuristic_Value_LocalSearchMetaheuristic_Value_INT_MIN_SENTINEL_DO_NOT_USE_ ,
  LocalSearchMetaheuristic_Value_LocalSearchMetaheuristic_Value_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  RoutingSearchStatus_Value : int {
  RoutingSearchStatus_Value_ROUTING_NOT_SOLVED = 0 , RoutingSearchStatus_Value_ROUTING_SUCCESS = 1 , RoutingSearchStatus_Value_ROUTING_PARTIAL_SUCCESS_LOCAL_OPTIMUM_NOT_REACHED = 2 , RoutingSearchStatus_Value_ROUTING_FAIL = 3 ,
  RoutingSearchStatus_Value_ROUTING_FAIL_TIMEOUT = 4 , RoutingSearchStatus_Value_ROUTING_INVALID = 5 , RoutingSearchStatus_Value_ROUTING_INFEASIBLE = 6 , RoutingSearchStatus_Value_ROUTING_OPTIMAL = 7 ,
  RoutingSearchStatus_Value_RoutingSearchStatus_Value_INT_MIN_SENTINEL_DO_NOT_USE_ , RoutingSearchStatus_Value_RoutingSearchStatus_Value_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  RuinCompositionStrategy_Value : int {
  RuinCompositionStrategy_Value_UNSET = 0 , RuinCompositionStrategy_Value_RUN_ALL_SEQUENTIALLY = 1 , RuinCompositionStrategy_Value_RUN_ALL_RANDOMLY = 2 , RuinCompositionStrategy_Value_RUN_ONE_RANDOMLY = 3 ,
  RuinCompositionStrategy_Value_RuinCompositionStrategy_Value_INT_MIN_SENTINEL_DO_NOT_USE_ , RuinCompositionStrategy_Value_RuinCompositionStrategy_Value_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  PerturbationStrategy_Value : int { PerturbationStrategy_Value_UNSET = 0 , PerturbationStrategy_Value_RUIN_AND_RECREATE = 1 , PerturbationStrategy_Value_PerturbationStrategy_Value_INT_MIN_SENTINEL_DO_NOT_USE_ , PerturbationStrategy_Value_PerturbationStrategy_Value_INT_MAX_SENTINEL_DO_NOT_USE_ }
enum  CoolingScheduleStrategy_Value : int {
  CoolingScheduleStrategy_Value_UNSET = 0 , CoolingScheduleStrategy_Value_EXPONENTIAL = 1 , CoolingScheduleStrategy_Value_LINEAR = 2 , CoolingScheduleStrategy_Value_CoolingScheduleStrategy_Value_INT_MIN_SENTINEL_DO_NOT_USE_ ,
  CoolingScheduleStrategy_Value_CoolingScheduleStrategy_Value_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  AcceptanceStrategy_Value : int {
  AcceptanceStrategy_Value_UNSET = 0 , AcceptanceStrategy_Value_GREEDY_DESCENT = 1 , AcceptanceStrategy_Value_SIMULATED_ANNEALING = 2 , AcceptanceStrategy_Value_AcceptanceStrategy_Value_INT_MIN_SENTINEL_DO_NOT_USE_ ,
  AcceptanceStrategy_Value_AcceptanceStrategy_Value_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  RoutingSearchParameters_PairInsertionStrategy : int {
  RoutingSearchParameters_PairInsertionStrategy_AUTOMATIC = 0 , RoutingSearchParameters_PairInsertionStrategy_BEST_PICKUP_THEN_BEST_DELIVERY = 1 , RoutingSearchParameters_PairInsertionStrategy_BEST_PICKUP_DELIVERY_PAIR = 2 , RoutingSearchParameters_PairInsertionStrategy_BEST_PICKUP_DELIVERY_PAIR_MULTITOUR = 3 ,
  RoutingSearchParameters_PairInsertionStrategy_RoutingSearchParameters_PairInsertionStrategy_INT_MIN_SENTINEL_DO_NOT_USE_ , RoutingSearchParameters_PairInsertionStrategy_RoutingSearchParameters_PairInsertionStrategy_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  RoutingSearchParameters_InsertionSortingProperty : int {
  RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_UNSPECIFIED = 0 , RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_ALLOWED_VEHICLES = 1 , RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_PENALTY = 2 , RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_PENALTY_OVER_ALLOWED_VEHICLES_RATIO = 3 ,
  RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_HIGHEST_AVG_ARC_COST_TO_VEHICLE_START_ENDS = 4 , RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_LOWEST_AVG_ARC_COST_TO_VEHICLE_START_ENDS = 5 , RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_LOWEST_MIN_ARC_COST_TO_VEHICLE_START_ENDS = 6 , RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_HIGHEST_DIMENSION_USAGE = 7 ,
  RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_RANDOM = 8 , RoutingSearchParameters_InsertionSortingProperty_RoutingSearchParameters_InsertionSortingProperty_INT_MIN_SENTINEL_DO_NOT_USE_ , RoutingSearchParameters_InsertionSortingProperty_RoutingSearchParameters_InsertionSortingProperty_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  RoutingSearchParameters_SchedulingSolver : int {
  RoutingSearchParameters_SchedulingSolver_SCHEDULING_UNSET = 0 , RoutingSearchParameters_SchedulingSolver_SCHEDULING_GLOP = 1 , RoutingSearchParameters_SchedulingSolver_SCHEDULING_CP_SAT = 2 , RoutingSearchParameters_SchedulingSolver_RoutingSearchParameters_SchedulingSolver_INT_MIN_SENTINEL_DO_NOT_USE_ ,
  RoutingSearchParameters_SchedulingSolver_RoutingSearchParameters_SchedulingSolver_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  ConstraintSolverParameters_TrailCompression : int { ConstraintSolverParameters_TrailCompression_NO_COMPRESSION = 0 , ConstraintSolverParameters_TrailCompression_COMPRESS_WITH_ZLIB = 1 , ConstraintSolverParameters_TrailCompression_ConstraintSolverParameters_TrailCompression_INT_MIN_SENTINEL_DO_NOT_USE_ , ConstraintSolverParameters_TrailCompression_ConstraintSolverParameters_TrailCompression_INT_MAX_SENTINEL_DO_NOT_USE_ }
enum  FlowModelProto_ProblemType : int { FlowModelProto_ProblemType_LINEAR_SUM_ASSIGNMENT = 0 , FlowModelProto_ProblemType_MAX_FLOW = 1 , FlowModelProto_ProblemType_MIN_COST_FLOW = 2 }
enum  GScipParameters_Emphasis : int {
  GScipParameters_Emphasis_DEFAULT_EMPHASIS = 0 , GScipParameters_Emphasis_COUNTER = 1 , GScipParameters_Emphasis_CP_SOLVER = 2 , GScipParameters_Emphasis_EASY_CIP = 3 ,
  GScipParameters_Emphasis_FEASIBILITY = 4 , GScipParameters_Emphasis_HARD_LP = 5 , GScipParameters_Emphasis_OPTIMALITY = 6 , GScipParameters_Emphasis_PHASE_FEAS = 7 ,
  GScipParameters_Emphasis_PHASE_IMPROVE = 8 , GScipParameters_Emphasis_PHASE_PROOF = 9 , GScipParameters_Emphasis_GScipParameters_Emphasis_INT_MIN_SENTINEL_DO_NOT_USE_ , GScipParameters_Emphasis_GScipParameters_Emphasis_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  GScipParameters_MetaParamValue : int {
  GScipParameters_MetaParamValue_DEFAULT_META_PARAM_VALUE = 0 , GScipParameters_MetaParamValue_AGGRESSIVE = 1 , GScipParameters_MetaParamValue_FAST = 2 , GScipParameters_MetaParamValue_OFF = 3 ,
  GScipParameters_MetaParamValue_GScipParameters_MetaParamValue_INT_MIN_SENTINEL_DO_NOT_USE_ , GScipParameters_MetaParamValue_GScipParameters_MetaParamValue_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  GScipOutput_Status : int {
  GScipOutput_Status_UNKNOWN = 0 , GScipOutput_Status_USER_INTERRUPT = 1 , GScipOutput_Status_NODE_LIMIT = 2 , GScipOutput_Status_TOTAL_NODE_LIMIT = 3 ,
  GScipOutput_Status_STALL_NODE_LIMIT = 4 , GScipOutput_Status_TIME_LIMIT = 5 , GScipOutput_Status_MEM_LIMIT = 6 , GScipOutput_Status_GAP_LIMIT = 7 ,
  GScipOutput_Status_SOL_LIMIT = 8 , GScipOutput_Status_BEST_SOL_LIMIT = 9 , GScipOutput_Status_RESTART_LIMIT = 10 , GScipOutput_Status_OPTIMAL = 11 ,
  GScipOutput_Status_INFEASIBLE = 12 , GScipOutput_Status_UNBOUNDED = 13 , GScipOutput_Status_INF_OR_UNBD = 14 , GScipOutput_Status_TERMINATE = 15 ,
  GScipOutput_Status_INVALID_SOLVER_PARAMETERS = 16 , GScipOutput_Status_GScipOutput_Status_INT_MIN_SENTINEL_DO_NOT_USE_ , GScipOutput_Status_GScipOutput_Status_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  MPSosConstraint_Type : int { MPSosConstraint_Type_SOS1_DEFAULT = 0 , MPSosConstraint_Type_SOS2 = 1 }
enum  MPModelProto_Annotation_TargetType : int { MPModelProto_Annotation_TargetType_VARIABLE_DEFAULT = 0 , MPModelProto_Annotation_TargetType_CONSTRAINT = 1 , MPModelProto_Annotation_TargetType_GENERAL_CONSTRAINT = 2 }
enum  MPSolverCommonParameters_LPAlgorithmValues : int { MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_UNSPECIFIED = 0 , MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_DUAL = 1 , MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_PRIMAL = 2 , MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_BARRIER = 3 }
enum  MPModelRequest_SolverType : int {
  MPModelRequest_SolverType_CLP_LINEAR_PROGRAMMING = 0 , MPModelRequest_SolverType_GLOP_LINEAR_PROGRAMMING = 2 , MPModelRequest_SolverType_GLPK_LINEAR_PROGRAMMING = 1 , MPModelRequest_SolverType_GUROBI_LINEAR_PROGRAMMING = 6 ,
  MPModelRequest_SolverType_XPRESS_LINEAR_PROGRAMMING = 101 , MPModelRequest_SolverType_CPLEX_LINEAR_PROGRAMMING = 10 , MPModelRequest_SolverType_HIGHS_LINEAR_PROGRAMMING = 15 , MPModelRequest_SolverType_SCIP_MIXED_INTEGER_PROGRAMMING = 3 ,
  MPModelRequest_SolverType_GLPK_MIXED_INTEGER_PROGRAMMING = 4 , MPModelRequest_SolverType_CBC_MIXED_INTEGER_PROGRAMMING = 5 , MPModelRequest_SolverType_GUROBI_MIXED_INTEGER_PROGRAMMING = 7 , MPModelRequest_SolverType_XPRESS_MIXED_INTEGER_PROGRAMMING = 102 ,
  MPModelRequest_SolverType_CPLEX_MIXED_INTEGER_PROGRAMMING = 11 , MPModelRequest_SolverType_HIGHS_MIXED_INTEGER_PROGRAMMING = 16 , MPModelRequest_SolverType_BOP_INTEGER_PROGRAMMING = 12 , MPModelRequest_SolverType_SAT_INTEGER_PROGRAMMING = 14 ,
  MPModelRequest_SolverType_PDLP_LINEAR_PROGRAMMING = 8 , MPModelRequest_SolverType_KNAPSACK_MIXED_INTEGER_PROGRAMMING = 13
}
enum  MPSolverResponseStatus : int {
  MPSOLVER_OPTIMAL = 0 , MPSOLVER_FEASIBLE = 1 , MPSOLVER_INFEASIBLE = 2 , MPSOLVER_UNBOUNDED = 3 ,
  MPSOLVER_ABNORMAL = 4 , MPSOLVER_NOT_SOLVED = 6 , MPSOLVER_MODEL_IS_VALID = 97 , MPSOLVER_CANCELLED_BY_USER = 98 ,
  MPSOLVER_UNKNOWN_STATUS = 99 , MPSOLVER_MODEL_INVALID = 5 , MPSOLVER_MODEL_INVALID_SOLUTION_HINT = 84 , MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS = 85 ,
  MPSOLVER_SOLVER_TYPE_UNAVAILABLE = 7 , MPSOLVER_INCOMPATIBLE_OPTIONS = 113
}
enum  CourseSchedulingResultStatus : int {
  COURSE_SCHEDULING_RESULT_STATUS_UNSPECIFIED = 0 , SOLVER_FEASIBLE = 1 , SOLVER_OPTIMAL = 2 , SOLVER_INFEASIBLE = 3 ,
  SOLVER_MODEL_INVALID = 4 , SOLVER_NOT_SOLVED = 5 , ABNORMAL = 6 , CourseSchedulingResultStatus_INT_MIN_SENTINEL_DO_NOT_USE_ ,
  CourseSchedulingResultStatus_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  SetCoverSolutionResponse_Status : int {
  SetCoverSolutionResponse_Status_UNDEFINED = 0 , SetCoverSolutionResponse_Status_OPTIMAL = 1 , SetCoverSolutionResponse_Status_FEASIBLE = 2 , SetCoverSolutionResponse_Status_INFEASIBLE = 3 ,
  SetCoverSolutionResponse_Status_INVALID = 4 , SetCoverSolutionResponse_Status_SetCoverSolutionResponse_Status_INT_MIN_SENTINEL_DO_NOT_USE_ , SetCoverSolutionResponse_Status_SetCoverSolutionResponse_Status_INT_MAX_SENTINEL_DO_NOT_USE_
}
enum  OptionalBoolean : int {
  BOOL_UNSPECIFIED = 0 , BOOL_FALSE = 2 , BOOL_TRUE = 3 , OptionalBoolean_INT_MIN_SENTINEL_DO_NOT_USE_ ,
  OptionalBoolean_INT_MAX_SENTINEL_DO_NOT_USE_
}

Functions

template<class Point, bool check_bounds = DEBUG_MODE>
Point BinarySearch (Point x_true, Point x_false, std::function< bool(Point)> f)
template<class Point>
Point BinarySearchMidpoint (Point x, Point y)
template<class Point, class Value>
std::pair< Point, Value > ConvexMinimum (absl::Span< const Point > sorted_points, std::function< Value(Point)> f)
template<class Point, class Value>
std::pair< Point, Value > ConvexMinimum (bool is_to_the_right, std::pair< Point, Value > current_min, absl::Span< const Point > sorted_points, std::function< Value(Point)> f)
template<class Point, class Value>
std::pair< Point, Value > RangeConvexMinimum (Point begin, Point end, absl::FunctionRef< Value(Point)> f)
 Searches in the range [begin, end), where Point supports basic arithmetic.
template<class Point, class Value>
std::pair< Point, Value > RangeConvexMinimum (std::pair< Point, Value > current_min, Point begin, Point end, absl::FunctionRef< Value(Point)> f)
std::vector< int > CountTriangles (const ::util::StaticGraph< int, int > &graph, int max_degree)
 HELPER FUNCTIONS: PUBLIC FOR UNIT TESTING ONLY.
void LocalBfs (const ::util::StaticGraph< int, int > &graph, int source, int stop_after_num_nodes, std::vector< int > *visited, std::vector< int > *num_within_radius, std::vector< bool > *tmp_mask)
bool InputContainsNan (absl::Span< const std::vector< double > > input)
void MinimizeLinearAssignment (absl::Span< const std::vector< double > > cost, absl::flat_hash_map< int, int > *direct_assignment, absl::flat_hash_map< int, int > *reverse_assignment)
 See IMPORTANT NOTE at the top of the file.
void MaximizeLinearAssignment (absl::Span< const std::vector< double > > cost, absl::flat_hash_map< int, int > *direct_assignment, absl::flat_hash_map< int, int > *reverse_assignment)
 See IMPORTANT NOTE at the top of the file.
bool CompareKnapsackItemWithEfficiencyInDecreasingEfficiencyOrder (const KnapsackItemWithEfficiency &item1, const KnapsackItemWithEfficiency &item2)
 Comparator used to sort item in decreasing efficiency order.
Select next search node to expand Select next item_i to assign (using primary propagator) - Generate a new search node where item_i is in the knapsack - Check validity of this new partial solution(using propagators) - If valid
Select next search node to expand Select next item_i to add this new search node to the search Generate a new search node where item_i is not in the knapsack Check validity of this new partial solution (using propagators) - If valid
absl::StatusOr< int64_t > NChooseK (int64_t n, int64_t k)
template<typename T>
void RadixSort (absl::Span< T > values, int num_bits=sizeof(T) *8)
template<typename T>
int NumBitsForZeroTo (T max_value)
template<typename T, int radix_width, int num_passes>
void RadixSortTpl (absl::Span< T > values)
 The internal template that does all the work.
uint64_t fasthash64 (const void *buf, size_t len, uint64_t seed)
static void mix (uint64_t &a, uint64_t &b, uint64_t &c)
 64 bit version.
void FixFlagsAndEnvironmentForSwig ()
int32_t strtoint32 (absl::string_view word)
int64_t strtoint64 (absl::string_view word)
int32_t atoi32 (absl::string_view word)
 Convenience versions of the above that take a string argument.
int64_t atoi64 (absl::string_view word)
int64_t GetProcessMemoryUsage ()
 GetProcessMemoryUsage.
void RunWorker (void *data)
int OrToolsMajorVersion ()
int OrToolsMinorVersion ()
int OrToolsPatchVersion ()
std::string OrToolsVersionString ()
template<class Var, class Element, class Proto, class Container>
void RealLoad (const AssignmentProto &assignment_proto, Container *const container, int(AssignmentProto::*GetSize)() const, const Proto &(AssignmentProto::*GetElem)(int) const)
template<class Var, class Element, class Proto, class Container>
void RealSave (AssignmentProto *const assignment_proto, const Container &container, Proto *(AssignmentProto::*Add)())
template<class Container, class Element>
void RealDebugString (const Container &container, std::string *const out)
void SetAssignmentFromAssignment (Assignment *target_assignment, const std::vector< IntVar * > &target_vars, const Assignment *source_assignment, const std::vector< IntVar * > &source_vars)
 NOLINT.
std::ostream & operator<< (std::ostream &out, const Assignment &assignment)
void InstallDemonProfiler (DemonProfiler *monitor)
 --— Forward Declarations and Profiling Support --—
DemonProfilerBuildDemonProfiler (Solver *solver)
void DeleteDemonProfiler (DemonProfiler *monitor)
void InstallLocalSearchProfiler (LocalSearchProfiler *monitor)
LocalSearchProfilerBuildLocalSearchProfiler (Solver *solver)
void DeleteLocalSearchProfiler (LocalSearchProfiler *monitor)
void CleanVariableOnFail (IntVar *var)
 ---------------— Queue class ---------------—
void RestoreBoolValue (IntVar *var)
 --— Trail --—
void InternalSaveBooleanVarValue (Solver *const solver, IntVar *const var)
bool LocalOptimumReached (Search *search)
 Returns true if a local optimum has been reached and cannot be improved.
bool AcceptDelta (Search *search, Assignment *delta, Assignment *deltadelta)
void AcceptNeighbor (Search *search)
 Notifies the search that a neighbor has been accepted by local search.
void AcceptUncheckedNeighbor (Search *search)
PropagationMonitorBuildTrace (Solver *s)
LocalSearchMonitorBuildLocalSearchMonitorPrimary (Solver *s)
ModelCacheBuildModelCache (Solver *solver)
PropagationMonitorBuildPrintTrace (Solver *s)
std::ostream & operator<< (std::ostream &out, const Solver *const s)
 ---------------— Useful Operators ---------------—
std::ostream & operator<< (std::ostream &out, const BaseObject *const o)
int64_t CpRandomSeed ()
int64_t Zero ()
 NOLINT.
int64_t One ()
 This method returns 1.
uint64_t Hash1 (uint64_t value)
uint64_t Hash1 (uint32_t value)
uint64_t Hash1 (int64_t value)
uint64_t Hash1 (int value)
uint64_t Hash1 (void *const ptr)
template<class T>
uint64_t Hash1 (const std::vector< T * > &ptrs)
uint64_t Hash1 (const std::vector< int64_t > &ptrs)
LocalSearchOperatorMakeTwoOpt (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_incoming_neighbors=nullptr, std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors=nullptr)
 --— 2Opt --—
LocalSearchOperatorMakeRelocate (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_incoming_neighbors=nullptr, std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors=nullptr, int64_t chain_length=1LL, bool single_path=false, const std::string &name="Relocate")
 --— Relocate --—
LocalSearchOperatorMakeExchange (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_incoming_neighbors=nullptr, std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors=nullptr)
 --— Exchange --—
LocalSearchOperatorMakeCross (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_incoming_neighbors=nullptr, std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors=nullptr)
 --— Cross --—
LocalSearchOperatorMakeActive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_incoming_neighbors=nullptr, std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors=nullptr)
 --— MakeActive --—
LocalSearchOperatorRelocateAndMakeActive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class)
 -— RelocateAndMakeActive --—
LocalSearchOperatorExchangeAndMakeActive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class)
 --— ExchangeAndMakeActive --—
LocalSearchOperatorExchangePathStartEndsAndMakeActive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class)
 --— ExchangePathEndsAndMakeActive --—
LocalSearchOperatorMakeActiveAndRelocate (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class)
 --— MakeActiveAndRelocate --—
LocalSearchOperatorMakeInactive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class)
 --— MakeInactive --—
LocalSearchOperatorRelocateAndMakeInactive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class)
 --— RelocateAndMakeInactive --—
LocalSearchOperatorMakeChainInactive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class)
 --— MakeChainInactive --—
LocalSearchOperatorMakeSwapActive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class)
 --— SwapActive --—
LocalSearchOperatorMakeSwapActiveChain (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, int max_chain_size)
 --— SwapActiveChain --—
LocalSearchOperatorMakeExtendedSwapActive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class)
 --— ExtendedSwapActive --—
LocalSearchOperatorMakeTSPOpt (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, Solver::IndexEvaluator3 evaluator, int chain_length)
 --— TSP-based operators --—
LocalSearchOperatorMakeTSPLns (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, Solver::IndexEvaluator3 evaluator, int tsp_size)
LocalSearchOperatorMakeLinKernighan (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, const Solver::IndexEvaluator3 &evaluator, bool topt)
 --— Lin-Kernighan --—
LocalSearchOperatorMakePathLns (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, int number_of_chunks, int chunk_size, bool unactive_fragments)
 --— Path-based Large Neighborhood Search --—
template<class T>
bool IsArrayConstant (const std::vector< T > &values, const T &value)
template<class T>
bool IsArrayBoolean (const std::vector< T > &values)
template<class T>
bool AreAllOnes (const std::vector< T > &values)
template<class T>
bool AreAllNull (const std::vector< T > &values)
template<class T>
bool AreAllGreaterOrEqual (const std::vector< T > &values, const T &value)
template<class T>
bool AreAllLessOrEqual (const std::vector< T > &values, const T &value)
template<class T>
bool AreAllPositive (const std::vector< T > &values)
template<class T>
bool AreAllNegative (const std::vector< T > &values)
template<class T>
bool AreAllStrictlyPositive (const std::vector< T > &values)
template<class T>
bool AreAllStrictlyNegative (const std::vector< T > &values)
template<class T>
bool IsIncreasingContiguous (const std::vector< T > &values)
template<class T>
bool IsIncreasing (const std::vector< T > &values)
template<class T>
bool IsArrayInRange (const std::vector< IntVar * > &vars, T range_min, T range_max)
bool AreAllBound (const std::vector< IntVar * > &vars)
bool AreAllBooleans (const std::vector< IntVar * > &vars)
template<class T>
bool AreAllBoundOrNull (const std::vector< IntVar * > &vars, const std::vector< T > &values)
bool AreAllBoundTo (const std::vector< IntVar * > &vars, int64_t value)
 Returns true if all variables are assigned to 'value'.
int64_t MaxVarArray (const std::vector< IntVar * > &vars)
int64_t MinVarArray (const std::vector< IntVar * > &vars)
void FillValues (const std::vector< IntVar * > &vars, std::vector< int64_t > *const values)
int64_t PosIntDivUp (int64_t e, int64_t v)
int64_t PosIntDivDown (int64_t e, int64_t v)
std::vector< int64_t > ToInt64Vector (const std::vector< int > &input)
 --— Vector manipulations --—
std::string DefaultPhaseStatString (DecisionBuilder *db)
 -------— API -------—
void RegisterDemon (Solver *const solver, Demon *const demon, DemonProfiler *const monitor)
 --— Exported Methods for Unit Tests --—
void DemonProfilerAddFakeRun (DemonProfiler *const monitor, Demon *const demon, int64_t start_time, int64_t end_time, bool is_fail)
void DemonProfilerExportInformation (DemonProfiler *const monitor, const Constraint *const constraint, int64_t *const fails, int64_t *const initial_propagation_runtime, int64_t *const demon_invocations, int64_t *const total_demon_runtime, int *const demon_count)
void DemonProfilerBeginInitialPropagation (DemonProfiler *const monitor, Constraint *const constraint)
void DemonProfilerEndInitialPropagation (DemonProfiler *const monitor, Constraint *const constraint)
void LinkVarExpr (Solver *s, IntExpr *expr, IntVar *var)
 --— IntExprElement --—
ConstraintSetIsEqual (IntVar *const var, absl::Span< const int64_t > values, const std::vector< IntVar * > &vars)
ConstraintSetIsGreaterOrEqual (IntVar *const var, absl::Span< const int64_t > values, const std::vector< IntVar * > &vars)
IntExprBuildStartExpr (IntervalVar *var)
 --— Expression builders ---—
IntExprBuildDurationExpr (IntervalVar *var)
IntExprBuildEndExpr (IntervalVar *var)
IntExprBuildSafeStartExpr (IntervalVar *var, int64_t unperformed_value)
IntExprBuildSafeDurationExpr (IntervalVar *var, int64_t unperformed_value)
IntExprBuildSafeEndExpr (IntervalVar *var, int64_t unperformed_value)
LocalSearchOperatorMakeTwoOpt (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, NeighborAccessor get_incoming_neighbors, NeighborAccessor get_outgoing_neighbors)
LocalSearchOperatorMakeRelocate (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, NeighborAccessor get_incoming_neighbors, NeighborAccessor get_outgoing_neighbors, int64_t chain_length, bool single_path, const std::string &name)
LocalSearchOperatorMakeExchange (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, NeighborAccessor get_incoming_neighbors, NeighborAccessor get_outgoing_neighbors)
LocalSearchOperatorMakeCross (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, NeighborAccessor get_incoming_neighbors, NeighborAccessor get_outgoing_neighbors)
LocalSearchOperatorMakeActive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, NeighborAccessor get_incoming_neighbors, NeighborAccessor get_outgoing_neighbors)
std::unique_ptr< BinCapacitiesMakeBinCapacities (const std::vector< RoutingDimension * > &dimensions, const PathsMetadata &paths_metadata)
void FillPathEvaluation (absl::Span< const int64_t > path, const RoutingModel::TransitCallback2 &evaluator, std::vector< int64_t > *values)
void AppendTasksFromPath (absl::Span< const int64_t > path, const TravelBounds &travel_bounds, const RoutingDimension &dimension, DisjunctivePropagator::Tasks *tasks)
void FillTravelBoundsOfVehicle (int vehicle, absl::Span< const int64_t > path, const RoutingDimension &dimension, TravelBounds *travel_bounds)
void AppendTasksFromIntervals (const std::vector< IntervalVar * > &intervals, DisjunctivePropagator::Tasks *tasks)
IntVarLocalSearchFilterMakeVehicleBreaksFilter (const RoutingModel &routing_model, const RoutingDimension &dimension)
ConstraintMakeDifferentFromValues (Solver *solver, IntVar *var, std::vector< int64_t > values)
ConstraintMakeResourceConstraint (const RoutingModel::ResourceGroup *resource_group, const std::vector< IntVar * > *vehicle_resource_vars, RoutingModel *model)
ConstraintMakePathSpansAndTotalSlacks (const RoutingDimension *dimension, std::vector< IntVar * > spans, std::vector< IntVar * > total_slacks)
ConstraintMakeRouteConstraint (RoutingModel *model, std::vector< IntVar * > route_cost_vars, std::function< std::optional< int64_t >(const std::vector< int64_t > &)> route_evaluator)
DecisionBuilderMakeSetValuesFromTargets (Solver *solver, std::vector< IntVar * > variables, std::vector< int64_t > targets)
DecisionBuilderMakeSetCumulsFromLocalDimensionCosts (Solver *solver, LocalDimensionCumulOptimizer *lp_optimizer, LocalDimensionCumulOptimizer *mp_optimizer, bool optimize_and_pack, std::vector< RoutingModel::RouteDimensionTravelInfo > dimension_travel_info_per_route)
DecisionBuilderMakeSetCumulsFromGlobalDimensionCosts (Solver *solver, GlobalDimensionCumulOptimizer *global_optimizer, GlobalDimensionCumulOptimizer *global_mp_optimizer, SearchMonitor *monitor, bool optimize_and_pack=false, std::vector< RoutingModel::RouteDimensionTravelInfo > dimension_travel_info_per_route={})
 Variant based on global optimizers, handling all routes together.
DecisionBuilderMakeRestoreDimensionValuesForUnchangedRoutes (RoutingModel *model)
template<typename T>
void DefragmentRanges (std::vector< T > &mutable_input, CommittableArray< IndexRange > &ranges, std::vector< T > &temp_container)
IntVarLocalSearchFilterMakeRouteConstraintFilter (const RoutingModel &routing_model)
 Returns a filter tracking route constraints.
IntVarLocalSearchFilterMakeMaxActiveVehiclesFilter (const RoutingModel &routing_model)
 Returns a filter ensuring that max active vehicles constraints are enforced.
IntVarLocalSearchFilterMakeActiveNodeGroupFilter (const RoutingModel &routing_model)
IntVarLocalSearchFilterMakeNodeDisjunctionFilter (const RoutingModel &routing_model, bool filter_cost)
 Returns a filter ensuring that node disjunction constraints are enforced.
IntVarLocalSearchFilterMakeVehicleAmortizedCostFilter (const RoutingModel &routing_model)
 Returns a filter computing vehicle amortized costs.
IntVarLocalSearchFilterMakeTypeRegulationsFilter (const RoutingModel &routing_model)
 Returns a filter ensuring type regulation constraints are enforced.
bool FillDimensionValuesFromRoutingDimension (int path, int64_t capacity, int64_t span_upper_bound, absl::Span< const DimensionValues::Interval > cumul_of_node, absl::Span< const DimensionValues::Interval > slack_of_node, absl::AnyInvocable< int64_t(int64_t, int64_t) const > evaluator, DimensionValues &dimension_values)
void FillPrePostVisitValues (int path, const DimensionValues &dimension_values, absl::AnyInvocable< int64_t(int64_t, int64_t) const > pre_travel_evaluator, absl::AnyInvocable< int64_t(int64_t, int64_t) const > post_travel_evaluator, PrePostVisitValues &visit_values)
bool PropagateLightweightVehicleBreaks (int path, DimensionValues &dimension_values, absl::Span< const std::pair< int64_t, int64_t > > interbreaks)
IntVarLocalSearchFilterMakePathCumulFilter (const RoutingDimension &dimension, bool propagate_own_objective_value, bool filter_objective_cost, bool may_use_optimizers)
 Returns a filter handling dimension costs and constraints.
void AppendLightWeightDimensionFilters (const PathState *path_state, const std::vector< RoutingDimension * > &dimensions, std::vector< LocalSearchFilterManager::FilterEvent > *filters)
void AppendDimensionCumulFilters (const std::vector< RoutingDimension * > &dimensions, const RoutingSearchParameters &parameters, bool filter_objective_cost, bool use_chain_cumul_filter, std::vector< LocalSearchFilterManager::FilterEvent > *filters)
LocalSearchFilterMakePickupDeliveryFilter (const RoutingModel &routing_model, const PathState *path_state, const std::vector< PickupDeliveryPair > &pairs, const std::vector< RoutingModel::PickupAndDeliveryPolicy > &vehicle_policies)
LocalSearchFilterMakeVehicleVarFilter (const RoutingModel &routing_model, const PathState *path_state)
 Returns a filter checking that vehicle variable domains are respected.
IntVarLocalSearchFilterMakeCumulBoundsPropagatorFilter (const RoutingDimension &dimension)
 Returns a filter handling dimension cumul bounds.
IntVarLocalSearchFilterMakeGlobalLPCumulFilter (GlobalDimensionCumulOptimizer *lp_optimizer, GlobalDimensionCumulOptimizer *mp_optimizer, bool filter_objective_cost)
 Returns a filter checking global linear constraints and costs.
LocalSearchFilterMakeResourceAssignmentFilter (LocalDimensionCumulOptimizer *lp_optimizer, LocalDimensionCumulOptimizer *mp_optimizer, bool propagate_own_objective_value, bool filter_objective_cost)
IntVarLocalSearchFilterMakeCPFeasibilityFilter (RoutingModel *routing_model)
 Returns a filter checking the current solution using CP propagation.
LocalSearchFilterMakePathStateFilter (Solver *solver, std::unique_ptr< PathState > path_state, const std::vector< IntVar * > &nexts)
LocalSearchFilterMakeDimensionFilter (Solver *solver, std::unique_ptr< DimensionChecker > checker, absl::string_view dimension_name)
LocalSearchFilterMakeLightVehicleBreaksFilter (Solver *solver, std::unique_ptr< LightVehicleBreaksChecker > checker, absl::string_view dimension_name)
LocalSearchFilterMakePathEnergyCostFilter (Solver *solver, std::unique_ptr< PathEnergyCostChecker > checker, absl::string_view dimension_name)
DecisionBuilderMakeRuinAndRecreateDecisionBuilder (const RoutingSearchParameters &parameters, RoutingModel *model, std::mt19937 *rnd, const Assignment *assignment, std::function< bool()> stop_search, LocalSearchFilterManager *filter_manager)
DecisionBuilderMakePerturbationDecisionBuilder (const RoutingSearchParameters &parameters, RoutingModel *model, std::mt19937 *rnd, const Assignment *assignment, std::function< bool()> stop_search, LocalSearchFilterManager *filter_manager)
std::unique_ptr< NeighborAcceptanceCriterionMakeNeighborAcceptanceCriterion (const RoutingModel &model, const RoutingSearchParameters &parameters, std::mt19937 *rnd)
 Returns a neighbor acceptance criterion based on the given parameters.
std::pair< double, double > GetSimulatedAnnealingTemperatures (const RoutingModel &model, const SimulatedAnnealingParameters &sa_params, std::mt19937 *rnd)
std::vector< SlopeAndYInterceptPiecewiseLinearFunctionToSlopeAndYIntercept (const FloatSlopePiecewiseLinearFunction &pwl_function, int index_start, int index_end)
std::vector< bool > SlopeAndYInterceptToConvexityRegions (absl::Span< const SlopeAndYIntercept > slope_and_y_intercept)
bool ComputeVehicleToResourceClassAssignmentCosts (int v, double solve_duration_ratio, const RoutingModel::ResourceGroup &resource_group, const util_intops::StrongVector< RoutingModel::ResourceClassIndex, absl::flat_hash_set< int > > &ignored_resources_per_class, const std::function< int64_t(int64_t)> &next_accessor, const std::function< int64_t(int64_t, int64_t)> &transit_accessor, bool optimize_vehicle_costs, LocalDimensionCumulOptimizer *lp_optimizer, LocalDimensionCumulOptimizer *mp_optimizer, std::vector< int64_t > *assignment_costs, std::vector< std::vector< int64_t > > *cumul_values, std::vector< std::vector< int64_t > > *break_values)
int64_t ComputeBestVehicleToResourceAssignment (absl::Span< const int > vehicles, const util_intops::StrongVector< RoutingModel::ResourceClassIndex, std::vector< int > > &resource_indices_per_class, const util_intops::StrongVector< RoutingModel::ResourceClassIndex, absl::flat_hash_set< int > > &ignored_resources_per_class, std::function< const std::vector< int64_t > *(int)> vehicle_to_resource_class_assignment_costs, std::vector< int > *resource_indices)
std::string Int64ToStr (int64_t number)
std::string DomainToString (const ::google::protobuf::RepeatedField< int64_t > *domain)
std::string VariableToString (std::pair< sat::IntegerVariableProto, int > &variable_pair, const sat::CpSolverResponse &response_)
std::string ConstraintToString (const sat::ConstraintProto &constraint, const sat::CpModelProto &model_, bool show_enforcement=true)
std::string VariablesToString (absl::flat_hash_map< std::string, std::pair< sat::IntegerVariableProto, int > > &variables, absl::flat_hash_map< std::string, std::vector< int > > &variable_instances, absl::flat_hash_map< std::string, absl::flat_hash_set< std::string > > &variable_childs, const sat::CpSolverResponse &response_, absl::string_view variable, std::string prefix="")
LocalSearchOperatorMakeRelocateNeighbors (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_incoming_neighbors, std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors, RoutingTransitCallback2 arc_evaluator)
LocalSearchOperatorMakeRelocateNeighbors (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, RoutingTransitCallback2 arc_evaluator)
LocalSearchOperatorMakeTwoOptWithShortestPath (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::vector< std::vector< int64_t > > alternative_sets, RoutingTransitCallback2 arc_evaluator)
LocalSearchOperatorMakeSwapActiveToShortestPath (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::vector< std::vector< int64_t > > alternative_sets, RoutingTransitCallback2 arc_evaluator)
LocalSearchOperatorMakePairActive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, const std::vector< PickupDeliveryPair > &pairs)
LocalSearchOperatorMakePairInactive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, const std::vector< PickupDeliveryPair > &pairs)
LocalSearchOperatorMakePairRelocate (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, const std::vector< PickupDeliveryPair > &pairs)
LocalSearchOperatorMakeGroupPairAndRelocate (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_incoming_neighbors, std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors, const std::vector< PickupDeliveryPair > &pairs)
LocalSearchOperatorMakeGroupPairAndRelocate (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, const std::vector< PickupDeliveryPair > &pairs)
LocalSearchOperatorMakeLightPairRelocate (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_incoming_neighbors, std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors, const std::vector< PickupDeliveryPair > &pairs, std::function< bool(int64_t)> force_lifo)
LocalSearchOperatorMakeLightPairRelocate (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, const std::vector< PickupDeliveryPair > &pairs, std::function< bool(int64_t)> force_lifo)
LocalSearchOperatorMakePairExchange (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_incoming_neighbors, std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors, const std::vector< PickupDeliveryPair > &pairs)
LocalSearchOperatorMakePairExchange (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, const std::vector< PickupDeliveryPair > &pairs)
LocalSearchOperatorMakePairExchangeRelocate (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, const std::vector< PickupDeliveryPair > &pairs)
LocalSearchOperatorMakeIndexPairSwapActive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, const std::vector< PickupDeliveryPair > &pairs)
LocalSearchOperatorMakeRelocateExpensiveChain (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, int num_arcs_to_consider, std::function< int64_t(int64_t, int64_t, int64_t)> arc_cost_for_path_start)
LocalSearchOperatorMakeRelocateSubtrip (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_incoming_neighbors, std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors, absl::Span< const PickupDeliveryPair > pairs)
LocalSearchOperatorMakeRelocateSubtrip (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, absl::Span< const PickupDeliveryPair > pairs)
LocalSearchOperatorMakeExchangeSubtrip (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, std::function< const std::vector< int > &(int, int)> get_incoming_neighbors, std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors, absl::Span< const PickupDeliveryPair > pairs)
LocalSearchOperatorMakeExchangeSubtrip (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, absl::Span< const PickupDeliveryPair > pairs)
template<bool swap_first>
LocalSearchOperatorMakePairNodeSwapActive (Solver *solver, const std::vector< IntVar * > &vars, const std::vector< IntVar * > &secondary_vars, std::function< int(int64_t)> start_empty_path_class, const std::vector< PickupDeliveryPair > &pairs)
RoutingModelParameters DefaultRoutingModelParameters ()
RoutingSearchParameters DefaultRoutingSearchParameters ()
 static
RoutingSearchParameters DefaultSecondaryRoutingSearchParameters ()
std::string FindErrorInRoutingSearchParameters (const RoutingSearchParameters &search_parameters)
std::vector< std::string > FindErrorsInRoutingSearchParameters (const RoutingSearchParameters &search_parameters)
std::vector< RoutingSearchParameters::InsertionSortingPropertyGetLocalCheapestInsertionSortingProperties (absl::Span< const int > lci_insertion_sorting_properties)
void DisableAllLocalSearchOperators (RoutingSearchParameters::LocalSearchNeighborhoodOperators *operators)
bool SolveModelWithSat (RoutingModel *model, const RoutingSearchParameters &search_parameters, const Assignment *initial_solution, Assignment *solution)
const AssignmentSolveWithAlternativeSolvers (RoutingModel *primary_model, const std::vector< RoutingModel * > &alternative_models, const RoutingSearchParameters &parameters, int max_non_improving_iterations)
const AssignmentSolveFromAssignmentWithAlternativeSolvers (const Assignment *assignment, RoutingModel *primary_model, const std::vector< RoutingModel * > &alternative_models, const RoutingSearchParameters &parameters, int max_non_improving_iterations)
 Same as above, but taking an initial solution.
const AssignmentSolveFromAssignmentWithAlternativeSolversAndParameters (const Assignment *assignment, RoutingModel *primary_model, const RoutingSearchParameters &parameters, const std::vector< RoutingModel * > &alternative_models, const std::vector< RoutingSearchParameters > &alternative_parameters, int max_non_improving_iterations)
 Same as above but taking alternative parameters for each alternative model.
FirstSolutionStrategy::Value AutomaticFirstSolutionStrategy (bool has_pickup_deliveries, bool has_node_precedences, bool has_single_vehicle_node)
std::vector< int64_t > ComputeVehicleEndChainStarts (const RoutingModel &model)
DecisionBuilderMakeSweepDecisionBuilder (RoutingModel *model, bool check_assignment)
DecisionBuilderMakeAllUnperformed (RoutingModel *model)
 Returns a DecisionBuilder making all nodes unperformed.
 DEFINE_INT_TYPE (RoutingNodeIndex, int)
 DEFINE_INT_TYPE (RoutingCostClassIndex, int)
 DEFINE_INT_TYPE (RoutingDimensionIndex, int)
 DEFINE_INT_TYPE (RoutingDisjunctionIndex, int)
 DEFINE_INT_TYPE (RoutingVehicleClassIndex, int)
 DEFINE_INT_TYPE (RoutingResourceClassIndex, int)
bool FindMostExpensiveArcsOnRoute (int num_arcs, int64_t start, const std::function< int64_t(int64_t)> &next_accessor, const std::function< bool(int64_t)> &is_end, const std::function< int64_t(int64_t, int64_t, int64_t)> &arc_cost_for_route_start, std::vector< std::pair< int64_t, int > > *most_expensive_arc_starts_and_ranks, std::pair< int, int > *first_expensive_arc_indices)
BaseAssignVariables::Mode ChooseMode (Solver::IntValueStrategy val_str)
int ComputeFormVarStatus (glp_prob *const problem, const int num_cstrs, const int k)
double ComputeFormVarReducedCost (glp_prob *const problem, const int num_cstrs, const int k)
double ComputeFormVarPrimalValue (glp_prob *const problem, const int num_cstrs, const int k)
double ComputeFormVarLowerBound (glp_prob *const problem, const int num_cstrs, const int k)
double ComputeFormVarUpperBound (glp_prob *const problem, const int num_cstrs, const int k)
void SetupGlpkEnvAutomaticDeletion ()
std::string SolutionStatusString (int status)
 Formats a solution status (GLP_OPT,...).
std::string BasisStatusString (int stat)
 Formats a linear constraint or variable basis status (GLP_BS,...).
std::string ReturnCodeString (const int rc)
std::string TruncateAndQuoteGLPKName (const std::string_view original_name)
template<typename NodeIndex, typename DistanceType>
std::pair< DistanceType, std::vector< NodeIndex > > SimpleOneToOneShortestPath (NodeIndex source, NodeIndex destination, absl::Span< const NodeIndex > tails, absl::Span< const NodeIndex > heads, absl::Span< const DistanceType > lengths, DistanceType limit=std::numeric_limits< DistanceType >::max())
template<typename WeightFunctionType, typename GraphType>
absl::StatusOr< std::vector< std::pair< typename GraphType::NodeIndex, typename GraphType::NodeIndex > > > ComputeMinimumWeightMatching (const GraphType &graph, const WeightFunctionType &weight)
 Computes a minimum weight perfect matching on an undirected graph.
template<typename WeightFunctionType, typename GraphType>
absl::StatusOr< std::vector< std::pair< typename GraphType::NodeIndex, typename GraphType::NodeIndex > > > ComputeMinimumWeightMatchingWithMIP (const GraphType &graph, const WeightFunctionType &weight)
void FindCliques (std::function< bool(int, int)> graph, int node_count, std::function< bool(const std::vector< int > &)> callback)
void CoverArcsByCliques (std::function< bool(int, int)> graph, int node_count, std::function< bool(const std::vector< int > &)> callback)
std::vector< Bitset64< int64_t > > ComputeDagConnectivity (absl::Span< const std::pair< int, int > > arcs, bool *error_was_cyclic, std::vector< int > *error_cycle_out)
std::vector< Bitset64< int64_t > > ComputeDagConnectivityOrDie (absl::Span< const std::pair< int, int > > arcs)
PathWithLength ConstrainedShortestPathsOnDag (const int num_nodes, absl::Span< const ArcWithLengthAndResources > arcs_with_length_and_resources, int source, int destination, const std::vector< double > &max_resources)
PathWithLength ShortestPathsOnDag (const int num_nodes, absl::Span< const ArcWithLength > arcs_with_length, const int source, const int destination)
std::vector< PathWithLengthKShortestPathsOnDag (const int num_nodes, absl::Span< const ArcWithLength > arcs_with_length, const int source, const int destination, const int path_count)
template<class GraphType, typename ArcLengths>
absl::Status TopologicalOrderIsValid (const GraphType &graph, absl::Span< const typename GraphType::NodeIndex > topological_order)
template<typename GraphType>
std::vector< typename GraphType::NodeIndex > NodePathImpliedBy (absl::Span< const typename GraphType::ArcIndex > arc_path, const GraphType &graph)
template<class GraphType>
void CheckNodeIsValid (typename GraphType::NodeIndex node, const GraphType &graph)
template<class GraphType>
absl::Status TopologicalOrderIsValid (const GraphType &graph, absl::Span< const typename GraphType::NodeIndex > topological_order)
template<typename Graph>
bool IsEulerianGraph (const Graph &graph, bool assume_connectivity=true)
 Returns true if a graph is Eulerian, aka all its nodes are of even degree.
template<typename NodeIndex, typename Graph>
bool IsSemiEulerianGraph (const Graph &graph, std::vector< NodeIndex > *odd_nodes, bool assume_connectivity=true)
template<typename NodeIndex, typename Graph>
std::vector< NodeIndexBuildEulerianPathFromNode (const Graph &graph, NodeIndex root)
template<typename NodeIndex, typename Graph>
std::vector< NodeIndexBuildEulerianTourFromNode (const Graph &graph, NodeIndex root, bool assume_connectivity=true)
template<typename Graph>
std::vector< typename Graph::NodeIndexBuildEulerianTour (const Graph &graph, bool assume_connectivity=true)
template<typename Graph>
std::vector< typename Graph::NodeIndexBuildEulerianPath (const Graph &graph, bool assume_connectivity=true)
template<typename CostType, typename CostFunction>
HamiltonianPathSolver< CostType, CostFunction > MakeHamiltonianPathSolver (int num_nodes, CostFunction cost)
 Utility function to simplify building a HamiltonianPathSolver from a functor.
template<class GraphType>
KShortestPaths< GraphType > YenKShortestPaths (const GraphType &graph, const std::vector< PathDistance > &arc_lengths, typename GraphType::NodeIndex source, typename GraphType::NodeIndex destination, unsigned k)
template<typename GraphType>
bool BuildLineGraph (const GraphType &graph, GraphType *const line_graph)
template<typename Graph>
std::vector< typename Graph::ArcIndexBuildKruskalMinimumSpanningTreeFromSortedArcs (const Graph &graph, absl::Span< const typename Graph::ArcIndex > sorted_arcs)
template<typename Graph, typename ArcComparator>
std::vector< typename Graph::ArcIndexBuildKruskalMinimumSpanningTree (const Graph &graph, const ArcComparator &arc_comparator)
template<typename Graph, typename ArcValue>
std::vector< typename Graph::ArcIndexBuildPrimMinimumSpanningTree (const Graph &graph, const ArcValue &arc_value)
std::vector< bool > BipartiteMinimumVertexCover (const std::vector< std::vector< int > > &left_to_right_arcs, int num_right)
template<class DistanceType>
std::ostream & operator<< (std::ostream &out, DistanceAndParentArc< DistanceType > distance_and_parent_arc)
template<class DistanceType, class Graph, class ArcLengthFunctor, class SettledNodeCallbackType>
std::vector< absl::flat_hash_map< int, DistanceAndParentArc< DistanceType > > > MultiDijkstra (const Graph &graph, ArcLengthFunctor arc_length_functor, const std::vector< std::vector< int > > &source_sets, SettledNodeCallbackType settled_node_callback)
template<typename Graph>
absl::StatusOr< RootedTree< typename Graph::NodeType > > RootedTreeFromGraph (typename Graph::NodeType root, const Graph &graph, std::vector< typename Graph::NodeType > *topological_order=nullptr, std::vector< typename Graph::NodeType > *depths=nullptr)
template<typename Graph>
absl::StatusOr< RootedTree< typename Graph::NodeIndex > > RootedTreeFromGraph (const typename Graph::NodeIndex root, const Graph &graph, std::vector< typename Graph::NodeIndex > *const topological_order, std::vector< typename Graph::NodeIndex > *const depths)
template<class NodeIndex, NodeIndex kNilNode>
bool InsertOrUpdateEntry (PathDistance distance, NodeEntry< NodeIndex, kNilNode > *entry, AdjustablePriorityQueue< NodeEntry< NodeIndex, kNilNode > > *priority_queue)
template<class GraphType>
void ComputeOneToManyOnGraph (const GraphType *const graph, const std::vector< PathDistance > *const arc_lengths, typename GraphType::NodeIndex source, const std::vector< typename GraphType::NodeIndex > *const destinations, typename GenericPathContainer< GraphType >::Impl *const paths)
void ConvertFlowModelToDimacs (const FlowModelProto &flow_model, std::string *dimacs)
bool ConvertDimacsToFlowModel (absl::string_view file, FlowModelProto *flow_model)
void SolveMinCostFlow (const FlowModelProto &flow_model, double *loading_time, double *solving_time)
 Loads a FlowModelProto proto into the MinCostFlow class and solves it.
template<typename GraphType>
void SolveMaxFlow (const FlowModelProto &flow_model, double *loading_time, double *solving_time, std::function< void(GraphType *graph)> configure_graph_options=nullptr)
 Loads a FlowModelProto proto into the MaxFlow class and solves it.
const GScipVariableOptions & DefaultGScipVariableOptions ()
const GScipConstraintOptions & DefaultGScipConstraintOptions ()
SCIP_RESULT ConvertGScipCallbackResult (const GScipCallbackResult result)
int ConstraintHandlerResultPriority (const GScipCallbackResult result, const ConstraintHandlerCallbackType callback_type)
GScipCallbackResult MergeConstraintHandlerResults (const GScipCallbackResult result1, const GScipCallbackResult result2, const ConstraintHandlerCallbackType callback_type)
SCIP_RETCODE DropAllEvents (GScipEventHandler &handler)
GScipLinearExpr GScipDifference (GScipLinearExpr left, const GScipLinearExpr &right)
 Returns left - right.
GScipLinearExpr GScipNegate (GScipLinearExpr expr)
 Returns -expr.
GScipLinearRange GScipLe (const GScipLinearExpr left, const GScipLinearExpr &right)
absl::Status GScipCreateAbs (GScip *gscip, SCIP_Var *x, SCIP_Var *abs_x, absl::string_view name)
absl::Status GScipCreateMaximum (GScip *gscip, const GScipLinearExpr &resultant, absl::Span< const GScipLinearExpr > terms, absl::string_view name)
absl::Status GScipCreateMinimum (GScip *gscip, const GScipLinearExpr &resultant, absl::Span< const GScipLinearExpr > terms, absl::string_view name)
absl::Status GScipAddQuadraticObjectiveTerm (GScip *gscip, std::vector< SCIP_Var * > quadratic_variables1, std::vector< SCIP_Var * > quadratic_variables2, std::vector< double > quadratic_coefficients, absl::string_view name)
absl::Status GScipCreateIndicatorRange (GScip *gscip, const GScipIndicatorRangeConstraint &indicator_range, absl::string_view name="", const GScipConstraintOptions &options=GScipConstraintOptions())
 Supports unbounded variables in indicator_range.range.variables.
void GScipSetTimeLimit (absl::Duration time_limit, GScipParameters *parameters)
absl::Duration GScipTimeLimit (const GScipParameters &parameters)
bool GScipTimeLimitSet (const GScipParameters &parameters)
void GScipSetMaxNumThreads (int num_threads, GScipParameters *parameters)
 CHECK fails if num_threads < 1.
int GScipMaxNumThreads (const GScipParameters &parameters)
 Returns 1 if the number of threads it not specified.
bool GScipMaxNumThreadsSet (const GScipParameters &parameters)
void GScipSetLogLevel (GScipParameters *parameters, int log_level)
int GScipLogLevel (const GScipParameters &parameters)
bool GScipLogLevelSet (const GScipParameters &parameters)
void GScipSetOutputEnabled (GScipParameters *parameters, bool output_enabled)
 Sets the log level to 4 if enabled, 0 if disabled (see above).
bool GScipOutputEnabled (const GScipParameters &parameters)
 Checks if the log level is equal to zero.
bool GScipOutputEnabledSet (const GScipParameters &parameters)
void GScipSetRandomSeed (GScipParameters *parameters, int random_seed)
int GScipRandomSeed (const GScipParameters &parameters)
 Returns -1 if unset.
bool GScipRandomSeedSet (const GScipParameters &parameters)
void GScipSetCatchCtrlC (bool catch_ctrl_c, GScipParameters *parameters)
 Sets the misc/catchctrlc property.
bool GScipCatchCtrlC (const GScipParameters &parameters)
bool GScipCatchCtrlCSet (const GScipParameters &parameters)
 Returns true when the misc/catchctrlc property is set.
void DisableAllCutsExceptUserDefined (GScipParameters *parameters)
 Turns off all SCIP separators.
absl::Status LegacyScipSetSolverSpecificParameters (absl::string_view parameters, SCIP *scip)
bool GurobiIsCorrectlyInstalled ()
void LoadGurobiFunctions (DynamicLibrary *gurobi_dynamic_library)
std::vector< std::string > GurobiDynamicLibraryPotentialPaths ()
absl::Status LoadGurobiDynamicLibrary (std::vector< absl::string_view > potential_paths)
absl::StatusOr< GRBenv * > GetGurobiEnv ()
testing::Matcher< std::string > EmptyOrGurobiLicenseWarning ()
testing::Matcher< std::string > EmptyOrGurobiLicenseWarningIfGurobi (const bool is_gurobi)
std::string GurobiParamInfoForLogging (GRBenv *grb, bool one_liner_output)
MPSolverInterfaceBuildBopInterface (MPSolver *const solver)
 Register BOP in the global linear solver factory.
MPSolverInterfaceBuildCBCInterface (MPSolver *const solver)
MPSolverInterfaceBuildCLPInterface (MPSolver *const solver)
MPSolverInterfaceBuildCplexInterface (bool mip, MPSolver *const solver)
MPSolverInterfaceBuildGLOPInterface (MPSolver *const solver)
 Register GLOP in the global linear solver factory.
MPSolver::ResultStatus GlopToMPSolverResultStatus (glop::ProblemStatus s)
MPSolver::BasisStatus GlopToMPSolverVariableStatus (glop::VariableStatus s)
glop::VariableStatus MPSolverToGlopVariableStatus (MPSolver::BasisStatus s)
MPSolver::BasisStatus GlopToMPSolverConstraintStatus (glop::ConstraintStatus s)
glop::ConstraintStatus MPSolverToGlopConstraintStatus (MPSolver::BasisStatus s)
void GLPKGatherInformationCallback (glp_tree *tree, void *info)
 Function to be called in the GLPK callback.
MPSolverInterfaceBuildGLPKInterface (bool mip, MPSolver *const solver)
MPSolverInterfaceBuildGurobiInterface (bool mip, MPSolver *const solver)
MPSolverInterfaceBuildHighsInterface (bool mip, MPSolver *const solver)
 Register PDLP in the global linear solver factory.
MPSolverInterfaceBuildKnapsackInterface (MPSolver *const solver)
 Register Knapsack solver in the global linear solver factory.
std::ostream & operator<< (std::ostream &stream, const LinearExpr &linear_expr)
LinearExpr operator+ (LinearExpr lhs, const LinearExpr &rhs)
LinearExpr operator- (LinearExpr lhs, const LinearExpr &rhs)
LinearExpr operator* (LinearExpr lhs, double rhs)
LinearExpr operator/ (LinearExpr lhs, double rhs)
LinearExpr operator* (double lhs, LinearExpr rhs)
LinearRange operator<= (const LinearExpr &lhs, const LinearExpr &rhs)
LinearRange operator== (const LinearExpr &lhs, const LinearExpr &rhs)
LinearRange operator>= (const LinearExpr &lhs, const LinearExpr &rhs)
bool SolverTypeIsMip (MPModelRequest::SolverType solver_type)
 There is a homonymous version taking a MPSolver::OptimizationProblemType.
MPSolverInterfaceBuildPdlpInterface (MPSolver *const solver)
 Register PDLP in the global linear solver factory.
MPSolverInterfaceBuildSatInterface (MPSolver *const solver)
 Register Sat in the global linear solver factory.
MPSolverInterfaceBuildSCIPInterface (MPSolver *const solver)
MPSolverInterfaceBuildXpressInterface (bool mip, MPSolver *const solver)
bool XpressIsCorrectlyInstalled ()
absl::string_view ToString (MPSolver::OptimizationProblemType optimization_problem_type)
bool AbslParseFlag (const absl::string_view text, MPSolver::OptimizationProblemType *solver_type, std::string *error)
bool MPSolverResponseStatusIsRpcError (MPSolverResponseStatus status)
bool SolverTypeIsMip (MPSolver::OptimizationProblemType solver_type)
std::ostream & operator<< (std::ostream &os, MPSolver::OptimizationProblemType optimization_problem_type)
std::ostream & operator<< (std::ostream &os, MPSolver::ResultStatus status)
std::string AbslUnparseFlag (MPSolver::OptimizationProblemType solver_type)
std::string ToString (MPCallbackEvent event)
absl::StatusOr< std::string > ExportModelAsLpFormat (const MPModelProto &model, const MPModelExportOptions &options)
absl::StatusOr< std::string > ExportModelAsMpsFormat (const MPModelProto &model, const MPModelExportOptions &options)
absl::Status WriteModelToMpsFile (absl::string_view filename, const MPModelProto &model, const MPModelExportOptions &options)
std::string FindErrorInMPModelProto (const MPModelProto &model, double abs_value_threshold, const bool accept_trivially_infeasible_bounds)
std::optional< LazyMutableCopy< MPModelProto > > ExtractValidMPModelOrPopulateResponseStatus (const MPModelRequest &request, MPSolutionResponse *response)
std::optional< LazyMutableCopy< MPModelProto > > GetMPModelOrPopulateResponse (LazyMutableCopy< MPModelRequest > &request, MPSolutionResponse *response)
std::string FindFeasibilityErrorInSolutionHint (const MPModelProto &model, double tolerance)
std::string FindErrorInMPModelDeltaProto (const MPModelDeltaProto &delta, const MPModelProto &model)
void MergeMPConstraintProtoExceptTerms (const MPConstraintProto &from, MPConstraintProto *to)
void ApplyVerifiedMPModelDelta (const MPModelDeltaProto &delta, MPModelProto *model)
MPSolutionResponse GlopSolveProto (LazyMutableCopy< MPModelRequest > request, std::atomic< bool > *interrupt_solve, std::function< void(const std::string &)> logging_callback)
std::string GlopSolverVersion ()
 Returns a string that describes the version of the GLOP solver.
absl::Status SetSolverSpecificParameters (absl::string_view parameters, GRBenv *gurobi)
absl::StatusOr< MPSolutionResponseGurobiSolveProto (LazyMutableCopy< MPModelRequest > request, GRBenv *gurobi_env)
absl::Status SetSolverSpecificParameters (const std::string &parameters, Highs &highs)
absl::StatusOr< MPSolutionResponseHighsSolveProto (LazyMutableCopy< MPModelRequest > request)
 Solve the input MIP model with the HIGHS solver.
absl::StatusOr< MPSolutionResponsePdlpSolveProto (LazyMutableCopy< MPModelRequest > request, const bool relax_integer_variables, const std::atomic< bool > *interrupt_solve)
MPSolutionResponse ConvertStatusOrMPSolutionResponse (bool log_error, absl::StatusOr< MPSolutionResponse > response)
template<typename P>
std::string EncodeParametersAsString (const P &parameters)
MPSolutionResponse SatSolveProto (LazyMutableCopy< MPModelRequest > request, std::atomic< bool > *interrupt_solve, std::function< void(const std::string &)> logging_callback, std::function< void(const MPSolution &)> solution_callback)
std::string SatSolverVersion ()
 Returns a string that describes the version of the CP-SAT solver.
glop::ProblemStatus ApplyMipPresolveSteps (const glop::GlopParameters &glop_params, MPModelProto *model, std::vector< std::unique_ptr< glop::Preprocessor > > *for_postsolve, SolverLogger *logger)
std::string FindErrorInMPModelForScip (const MPModelProto &model, SCIP *scip)
absl::StatusOr< MPSolutionResponseScipSolveProto (LazyMutableCopy< MPModelRequest > request)
MPSolutionResponse XPressSolveProto (LazyMutableCopy< MPModelRequest > request)
 Solves the input request.
bool LinearConstraintIsViolated (const ScipConstraintHandlerContext &context, const LinearRange &constraint)
ScipSeparationResult RunSeparation (internal::ScipCallbackRunner *runner, const ScipConstraintHandlerContext &context, absl::Span< SCIP_CONS * > constraints, bool is_integral)
template<typename Constraint>
void RegisterConstraintHandler (ScipConstraintHandler< Constraint > *handler, SCIP *scip)
 handler is not owned but held.
template<typename ConstraintData>
void AddCallbackConstraint (SCIP *scip, ScipConstraintHandler< ConstraintData > *handler, const std::string &constraint_name, const ConstraintData *constraint_data, const ScipCallbackConstraintOptions &options)
 constraint_data is not owned but held.
template<typename ConstraintData>
void RegisterConstraintHandler (ScipConstraintHandler< ConstraintData > *handler, SCIP *scip)
MPSolutionResponse SolveMPModel (LazyMutableCopy< MPModelRequest > request, const SolveInterrupter *interrupter)
bool SolverTypeSupportsInterruption (const MPModelRequest::SolverType solver)
std::string MPModelRequestLoggingInfo (const MPModelRequest &request)
std::string getSolverVersion (XPRSprob const &prob)
bool readParameter (XPRSprob const &prob, std::string const &name, std::string const &value)
 Apply the specified name=value setting to prob.
void printError (const XPRSprob &mLp, int line)
void XPRS_CC XpressIntSolCallbackImpl (XPRSprob cbprob, void *cbdata)
void XPRS_CC optimizermsg (XPRSprob prob, void *data, const char *sMsg, int nLen, int nMsgLvl)
int getnumcols (const XPRSprob &mLp)
int getnumrows (const XPRSprob &mLp)
int getitcnt (const XPRSprob &mLp)
int getnodecnt (const XPRSprob &mLp)
int setobjoffset (const XPRSprob &mLp, double value)
void addhint (const XPRSprob &mLp, int length, const double solval[], const int colind[])
void interruptXPRESS (XPRSprob &xprsProb, CUSTOM_INTERRUPT_REASON reason)
static int MPSolverToXpressBasisStatus (MPSolver::BasisStatus mpsolver_basis_status)
 Transform MPSolver basis status to XPRESS status.
static MPSolver::BasisStatus XpressToMPSolverBasisStatus (int xpress_basis_status)
 Transform XPRESS basis status to MPSolver basis status.
static std::map< std::string, int > & getMapStringControls ()
static std::map< std::string, int > & getMapDoubleControls ()
static std::map< std::string, int > & getMapIntControls ()
static std::map< std::string, int > & getMapInt64Controls ()
std::vector< int > XpressBasisStatusesFrom (const std::vector< MPSolver::BasisStatus > &statuses)
template<class Container>
void splitMyString (const std::string &str, Container &cont, char delim=' ')
bool stringToCharPtr (const std::string &var, const char **out)
absl::StatusOr< MPModelProtoModelProtoFromLpFormat (absl::string_view model)
 This calls ParseLp() under the hood. See below.
absl::StatusOr< glop::DenseRowParseSolFile (absl::string_view file_name, const glop::LinearProgram &model)
 Parse a solution to model from a file.
absl::StatusOr< MPSolutionResponseParseSolFile (absl::string_view file_name, const MPModelProto &model)
absl::StatusOr< glop::DenseRowParseSolString (const std::string &solution, const glop::LinearProgram &model)
 Parse a solution to model from a string.
absl::StatusOr< MPSolutionResponseParseSolString (const std::string &solution, const MPModelProto &model)
void ParseAndSolve (const std::string &filename, absl::string_view solver, const std::string &params)
::absl::Status PortableFileSetContents (absl::string_view file_name, absl::string_view content)
::absl::Status PortableFileGetContents (absl::string_view file_name, std::string *output)
bool PortableTemporaryFile (const char *directory_prefix, std::string *filename_out)
 Returns true if successful. Outputs temp file to filename.
::absl::Status PortableDeleteFile (absl::string_view file_name)
std::string ProtobufTextFormatPrintToStringForFlag (const google::protobuf::Message &proto)
std::string ProtobufTextFormatPrintToStringForFlag (const google::protobuf::MessageLite &proto)
 Prints an error message when compiling with lite protos.
template<class P>
std::string ProtobufDebugString (const P &message)
template<class P>
std::string ProtobufShortDebugString (const P &message)
template<typename ProtoEnumType>
std::string ProtoEnumToString (ProtoEnumType enum_value)
template<typename ProtoType>
bool ProtobufTextFormatMergeFromString (absl::string_view proto_text_string, ProtoType *proto)
template<typename ProtoType>
bool ProtobufParseTextProtoForFlag (absl::string_view text, ProtoType *message_out, std::string *error_out)
int32_t GetSeed (bool deterministic)
 Random seed generator.
void DisplayPlan (const RoutingIndexManager &manager, const RoutingModel &routing, const operations_research::Assignment &plan, bool use_same_vehicle_costs, int64_t max_nodes_per_group, int64_t same_vehicle_cost, absl::Span< const std::string > dimension_names)
void DisplayPlan (const operations_research::RoutingIndexManager &manager, const operations_research::RoutingModel &routing, const operations_research::Assignment &plan, bool use_same_vehicle_costs, int64_t max_nodes_per_group, int64_t same_vehicle_cost, absl::Span< const std::string > dimension_names)
 DEFINE_STRONG_INT_TYPE (SubsetIndex, BaseInt)
 DEFINE_STRONG_INT_TYPE (ElementIndex, BaseInt)
 Element index.
 DEFINE_STRONG_INT_TYPE (ColumnEntryIndex, BaseInt)
 DEFINE_STRONG_INT_TYPE (RowEntryIndex, BaseInt)
template<class Index>
 IndexRange (Index a, Index b) -> IndexRange< Index >
 Additional deduction guide.
template<typename T>
 IterableContainer (const T &data_source) -> IterableContainer< T >
 Additional deduction guide.
 DEFINE_STRONG_INT_TYPE (CapacityTermIndex, BaseInt)
 Term index in a capacity constraint.
constexpr SubsetIndex kNotFound (-1)
std::vector< SubsetIndex > ClearRandomSubsets (BaseInt num_subsets, SetCoverInvariant *inv)
 The consistency level is maintained up to kCostAndCoverage.
std::vector< SubsetIndex > ClearRandomSubsets (absl::Span< const SubsetIndex > focus, BaseInt num_subsets, SetCoverInvariant *inv)
 Same as above, but clears the subset indices in focus.
std::vector< SubsetIndex > ClearMostCoveredElements (BaseInt num_subsets, SetCoverInvariant *inv)
 The consistency level is maintained up to kCostAndCoverage.
std::vector< SubsetIndex > ClearMostCoveredElements (absl::Span< const SubsetIndex > focus, BaseInt num_subsets, SetCoverInvariant *inv)
 Same as above, but clears the subset indices in focus.
template<typename T>
SetCoverModel::Stats ComputeStats (std::vector< T > samples)
template<typename T>
std::vector< T > ComputeDeciles (std::vector< T > values)
SetCoverModel ReadOrlibScp (absl::string_view filename)
 This is a row-based format where the elements are 1-indexed.
SetCoverModel ReadOrlibRail (absl::string_view filename)
 This is a column-based format where the elements are 1-indexed.
SetCoverModel ReadFimiDat (absl::string_view filename)
SetCoverModel ReadSetCoverProto (absl::string_view filename, bool binary)
void WriteOrlibScp (const SetCoverModel &model, absl::string_view filename)
void WriteOrlibRail (const SetCoverModel &model, absl::string_view filename)
 Beware the fact that elements written are converted to 1-indexed.
void WriteSetCoverProto (const SetCoverModel &model, absl::string_view filename, bool binary)
SubsetBoolVector ReadSetCoverSolutionText (absl::string_view filename)
SubsetBoolVector ReadSetCoverSolutionProto (absl::string_view filename, bool binary)
void WriteSetCoverSolutionText (const SetCoverModel &model, const SubsetBoolVector &solution, absl::string_view filename)
void WriteSetCoverSolutionProto (const SetCoverModel &model, const SubsetBoolVector &solution, absl::string_view filename, bool binary)
int64_t RunTimeInMicroseconds (const SetCoverSolutionGenerator &gen)
int64_t RunTimeInNanoseconds (const SetCoverSolutionGenerator &gen)
void LogStats (const SetCoverModel &model)
void LogCostAndTiming (const absl::string_view problem_name, absl::string_view alg_name, const SetCoverInvariant &inv, int64_t run_time)
void LogCostAndTiming (const SetCoverSolutionGenerator &generator)
FileFormat ParseFileFormat (const std::string &format_name)
SetCoverModel ReadModel (absl::string_view filename, FileFormat format)
SubsetBoolVector ReadSolution (absl::string_view filename, FileFormat format)
void WriteModel (const SetCoverModel &model, const std::string &filename, FileFormat format)
void WriteSolution (const SetCoverModel &model, const SubsetBoolVector &solution, absl::string_view filename, FileFormat format)
SetCoverInvariant RunLazyElementDegree (SetCoverModel *model)
SetCoverInvariant RunGreedy (SetCoverModel *model)
std::vector< BenchmarksTableRowBenchmarksTable ()
void Benchmarks ()
void Run ()
 DEFINE_STRONG_INT_TYPE (FullSubsetIndex, BaseInt)
 DEFINE_STRONG_INT_TYPE (FullElementIndex, BaseInt)
 ENABLE_EXPLICIT_STRONG_TYPE_CAST (SubsetIndex, FullSubsetIndex)
 ENABLE_EXPLICIT_STRONG_TYPE_CAST (FullSubsetIndex, SubsetIndex)
 ENABLE_EXPLICIT_STRONG_TYPE_CAST (ElementIndex, FullElementIndex)
 ENABLE_EXPLICIT_STRONG_TYPE_CAST (FullElementIndex, ElementIndex)
template<size_t alignment_bytes, typename Value>
Value * AlignUp (Value *ptr)
template<size_t alignment_bytes, typename Value>
Value * AlignDown (Value *ptr)
template<size_t alignment_bytes, typename Value>
bool IsAligned (Value *ptr)
 Returns true when ptr is aligned to alignment_bytes bytes.
uint64_t OneBit64 (int pos)
 Returns a word with only bit pos set.
uint32_t OneBit32 (int pos)
uint64_t BitCount64 (uint64_t n)
 Returns the number of bits set in n.
uint32_t BitCount32 (uint32_t n)
uint64_t LeastSignificantBitWord64 (uint64_t n)
 Returns a word with only the least significant bit of n set.
uint32_t LeastSignificantBitWord32 (uint32_t n)
int LeastSignificantBitPosition64DeBruijn (uint64_t n)
int LeastSignificantBitPosition64Default (uint64_t n)
int LeastSignificantBitPosition64 (uint64_t n)
int LeastSignificantBitPosition32DeBruijn (uint32_t n)
int LeastSignificantBitPosition32Default (uint32_t n)
int LeastSignificantBitPosition32 (uint32_t n)
int MostSignificantBitPosition64Default (uint64_t n)
 Returns the most significant bit position in n.
int MostSignificantBitPosition64 (uint64_t n)
int MostSignificantBitPosition32Default (uint32_t n)
int MostSignificantBitPosition32 (uint32_t n)
uint64_t OneRange64 (uint64_t s, uint64_t e)
 Returns a word with bits from s to e set.
uint32_t OneRange32 (uint32_t s, uint32_t e)
uint64_t IntervalUp64 (uint64_t s)
 Returns a word with s least significant bits unset.
uint32_t IntervalUp32 (uint32_t s)
uint64_t IntervalDown64 (uint64_t s)
 Returns a word with the s most significant bits unset.
uint32_t IntervalDown32 (uint32_t s)
uint32_t BitPos64 (uint64_t pos)
 Bit operators used to manipulates bitsets.
uint32_t BitPos32 (uint32_t pos)
uint64_t BitOffset64 (uint64_t pos)
 Returns the word number corresponding to bit number pos.
uint32_t BitOffset32 (uint32_t pos)
uint64_t BitLength64 (uint64_t size)
 Returns the number of words needed to store size bits.
uint32_t BitLength32 (uint32_t size)
uint64_t BitShift64 (uint64_t v)
 Returns the bit number in the bitset of the first bit of word number v.
uint32_t BitShift32 (uint32_t v)
bool IsBitSet64 (const uint64_t *const bitset, uint64_t pos)
 Returns true if the bit pos is set in bitset.
bool IsBitSet32 (const uint32_t *const bitset, uint32_t pos)
void SetBit64 (uint64_t *const bitset, uint64_t pos)
 Sets the bit pos to true in bitset.
void SetBit32 (uint32_t *const bitset, uint32_t pos)
void ClearBit64 (uint64_t *const bitset, uint64_t pos)
 Sets the bit pos to false in bitset.
void ClearBit32 (uint32_t *const bitset, uint32_t pos)
uint64_t BitCountRange64 (const uint64_t *bitset, uint64_t start, uint64_t end)
 Returns the number of bits set in bitset between positions start and end.
uint32_t BitCountRange32 (const uint32_t *bitset, uint32_t start, uint32_t end)
bool IsEmptyRange64 (const uint64_t *bitset, uint64_t start, uint64_t end)
 Returns true if no bits are set in bitset between start and end.
bool IsEmptyRange32 (const uint32_t *bitset, uint32_t start, uint32_t end)
int64_t LeastSignificantBitPosition64 (const uint64_t *bitset, uint64_t start, uint64_t end)
 Returns the first bit set in bitset between start and max_bit.
int LeastSignificantBitPosition32 (const uint32_t *bitset, uint32_t start, uint32_t end)
int64_t MostSignificantBitPosition64 (const uint64_t *bitset, uint64_t start, uint64_t end)
 Returns the last bit set in bitset between min_bit and start.
int MostSignificantBitPosition32 (const uint32_t *bitset, uint32_t start, uint32_t end)
int64_t UnsafeLeastSignificantBitPosition64 (const uint64_t *bitset, uint64_t start, uint64_t end)
int32_t UnsafeLeastSignificantBitPosition32 (const uint32_t *bitset, uint32_t start, uint32_t end)
int64_t UnsafeMostSignificantBitPosition64 (const uint64_t *bitset, uint64_t start, uint64_t end)
int32_t UnsafeMostSignificantBitPosition32 (const uint32_t *bitset, uint32_t start, uint32_t end)
uint64_t TwoBitsFromPos64 (uint64_t pos)
 Returns a mask with the bits pos % 64 and (pos ^ 1) % 64 sets.
absl::StatusOr< std::string > ReadFileToString (absl::string_view filename)
 Reads a file, optionally gzipped, to a string.
absl::Status ReadFileToProto (absl::string_view filename, google::protobuf::Message *proto, bool allow_partial)
absl::Status StringToProto (absl::string_view data, google::protobuf::Message *proto, bool allow_partial=false)
 Exactly like ReadFileToProto(), but directly from the contents.
absl::Status WriteProtoToFile (absl::string_view filename, const google::protobuf::Message &proto, ProtoWriteFormat proto_write_format, bool gzipped, bool append_extension_to_file_name)
template<typename Proto>
absl::StatusOr< Proto > ReadFileToProto (absl::string_view filename, bool allow_partial=false)
template<typename Proto>
std::vector< Proto > ReadAllRecordsOrDie (absl::string_view filename)
template<typename Proto>
std::vector< Proto > ReadAllRecordsOrDie (File *file)
template<typename Proto>
Proto ReadOneRecordOrDie (absl::string_view filename)
template<typename Proto>
void WriteRecordsOrDie (absl::string_view filename, const std::vector< Proto > &protos)
 DEFINE_STRONG_INDEX_TYPE (TreeNodeIndex)
 DEFINE_STRONG_INDEX_TYPE (LeafIndex)
std::ostream & operator<< (std::ostream &out, const RoundTripDoubleFormat &format)
void ComputeScalingErrors (absl::Span< const double > input, absl::Span< const double > lb, absl::Span< const double > ub, double scaling_factor, double *max_relative_coeff_error, double *max_scaled_sum_error)
double GetBestScalingOfDoublesToInt64 (absl::Span< const double > input, absl::Span< const double > lb, absl::Span< const double > ub, int64_t max_absolute_sum)
void GetBestScalingOfDoublesToInt64 (absl::Span< const double > input, int64_t max_absolute_sum, double *scaling_factor, double *max_relative_coeff_error)
int64_t ComputeGcdOfRoundedDoubles (absl::Span< const double > x, double scaling_factor)
template<typename FloatType>
bool IsPositiveOrNegativeInfinity (FloatType x)
template<typename FloatType>
bool AreWithinAbsoluteOrRelativeTolerances (FloatType x, FloatType y, FloatType relative_tolerance, FloatType absolute_tolerance)
template<typename FloatType>
bool AreWithinAbsoluteTolerance (FloatType x, FloatType y, FloatType absolute_tolerance)
template<typename FloatType>
bool IsSmallerWithinTolerance (FloatType x, FloatType y, FloatType tolerance)
template<typename FloatType>
bool IsIntegerWithinTolerance (FloatType x, FloatType tolerance)
template<typename FloatType>
FloatType Interpolate (FloatType x, FloatType y, FloatType alpha)
 Returns alpha * x + (1 - alpha) * y.
int fast_ilogb (double value)
double fast_scalbn (double value, int exponent)
bool ParseTextProtoForFlag (const absl::string_view text, google::protobuf::Message *const message_out, std::string *const error_out)
std::string FullProtocolMessageAsString (const google::protobuf::Message &message, int indent_level)
template<class Proto>
absl::StatusOr< Proto * > SafeProtoDownCast (google::protobuf::Message *proto)
 Implementation of function templates.
template<class Proto>
absl::StatusOr< const Proto * > SafeProtoConstDownCast (const google::protobuf::Message *proto)
QapProblem ReadQapProblemOrDie (absl::string_view filepath)
RangeIntToIntFunctionMakeBareIntToIntFunction (std::function< int64_t(int64_t)> f)
RangeIntToIntFunctionMakeCachedIntToIntFunction (const std::function< int64_t(int64_t)> &f, int64_t domain_start, int64_t domain_end)
RangeMinMaxIndexFunctionMakeCachedRangeMinMaxIndexFunction (const std::function< int64_t(int64_t)> &f, int64_t domain_start, int64_t domain_end)
Fraction RationalApproximation (const double x, const double precision)
bool AtMinOrMaxInt64 (int64_t x)
 Checks if x is equal to the min or the max value of an int64_t.
int64_t CapOpp (int64_t v)
 Note(user): -kint64min != kint64max, but kint64max == ~kint64min.
int64_t CapAbs (int64_t v)
int64_t TwosComplementAddition (int64_t x, int64_t y)
 -------— Overflow utility functions -------—
int64_t TwosComplementSubtraction (int64_t x, int64_t y)
bool AddHadOverflow (int64_t x, int64_t y, int64_t sum)
bool SubHadOverflow (int64_t x, int64_t y, int64_t diff)
bool AddOverflows (int64_t x, int64_t y)
int64_t SubOverflows (int64_t x, int64_t y)
template<typename IntegerType>
bool SafeAddInto (IntegerType a, IntegerType *b)
int64_t CapWithSignOf (int64_t x)
 Returns kint64max if x >= 0 and kint64min if x < 0.
int64_t CapAddGeneric (int64_t x, int64_t y)
int64_t CapSubGeneric (int64_t x, int64_t y)
int64_t CapProdGeneric (int64_t x, int64_t y)
template<typename T>
CapOrFloatAdd (T x, T y)
int64_t CapAdd (int64_t x, int64_t y)
bool AddIntoOverflow (int64_t x, int64_t *y)
void CapAddTo (int64_t x, int64_t *y)
int64_t CapSub (int64_t x, int64_t y)
void CapSubFrom (int64_t amount, int64_t *target)
 Updates *target with CapSub(*target, amount).
int64_t CapProd (int64_t x, int64_t y)
template<class Iterator, class Compare = std::less<value_type_t<Iterator>>>
void IncrementalSort (int max_comparisons, Iterator begin, Iterator end, Compare comp=Compare{}, bool is_stable=false)
template<class Iterator, class Compare = std::less<value_type_t<Iterator>>>
void InsertionSort (Iterator begin, Iterator end, Compare comp=Compare{})
template<class Iterator, class Compare = std::less<value_type_t<Iterator>>>
void IncrementalSort (Iterator begin, Iterator end, Compare comp=Compare{}, bool is_stable=false)
bool IntervalsAreSortedAndNonAdjacent (absl::Span< const ClosedInterval > intervals)
int64_t CeilRatio (int64_t value, int64_t positive_coeff)
int64_t FloorRatio (int64_t value, int64_t positive_coeff)
std::ostream & operator<< (std::ostream &out, const ClosedInterval &interval)
std::ostream & operator<< (std::ostream &out, const std::vector< ClosedInterval > &intervals)
std::ostream & operator<< (std::ostream &out, const Domain &domain)
int64_t SumOfKMinValueInDomain (const Domain &domain, int k)
 Returns the sum of smallest k values in the domain.
int64_t SumOfKMaxValueInDomain (const Domain &domain, int k)
 Returns the sum of largest k values in the domain.
ClosedInterval::Iterator begin (ClosedInterval interval)
ClosedInterval::Iterator end (ClosedInterval interval)
std::string MemoryUsage ()
 Returns the current thread's total memory usage in an human-readable string.
template<class T>
std::string JoinDebugString (const std::vector< T > &v, absl::string_view separator)
 Join v[i].DebugString().
template<class T>
std::string JoinDebugStringPtr (const std::vector< T > &v, absl::string_view separator)
 Join v[i]->DebugString().
template<class T>
std::string JoinNamePtr (const std::vector< T > &v, absl::string_view separator)
 Join v[i]->name().
template<class T>
std::string JoinNameFieldPtr (const std::vector< T > &v, absl::string_view separator)
 Join v[i]->name.
std::string CropMultiLineString (const std::string &s, int max_line_length, int max_num_lines)
template<typename StrongIndexName>
std::ostream & operator<< (std::ostream &os, StrongIndex< StrongIndexName > arg)
template<typename Sink, typename... T>
void AbslStringify (Sink &sink, StrongIndex< T... > arg)
template<typename StrongIntegerName>
std::ostream & operator<< (std::ostream &os, StrongInt64< StrongIntegerName > arg)
template<typename Sink, typename... T>
void AbslStringify (Sink &sink, StrongInt64< T... > arg)
 STRONG_TYPE_ARITHMETIC_OP (StrongIndex, int,+)
 STRONG_TYPE_ARITHMETIC_OP (StrongIndex, int, -)
 STRONG_TYPE_ARITHMETIC_OP (StrongIndex, int, *)
 STRONG_TYPE_ARITHMETIC_OP (StrongIndex, int, %)
 STRONG_TYPE_ARITHMETIC_OP (StrongInt64, int64_t,+)
 STRONG_TYPE_ARITHMETIC_OP (StrongInt64, int64_t, -)
 STRONG_TYPE_ARITHMETIC_OP (StrongInt64, int64_t, *)
 STRONG_TYPE_ARITHMETIC_OP (StrongInt64, int64_t,/)
 STRONG_TYPE_ARITHMETIC_OP (StrongInt64, int64_t,<<)
 STRONG_TYPE_ARITHMETIC_OP (StrongInt64, int64_t, > >)
 STRONG_TYPE_ARITHMETIC_OP (StrongInt64, int64_t, %)
 STRONG_TYPE_COMPARISON_OP (StrongIndex, int,==)
 STRONG_TYPE_COMPARISON_OP (StrongIndex, int, !=)
 STRONG_TYPE_COMPARISON_OP (StrongIndex, int,<=)
 STRONG_TYPE_COMPARISON_OP (StrongIndex, int, >=)
 STRONG_TYPE_COMPARISON_OP (StrongInt64, int64_t,==)
 STRONG_TYPE_COMPARISON_OP (StrongInt64, int64_t, !=)
 STRONG_TYPE_COMPARISON_OP (StrongInt64, int64_t,<=)
 STRONG_TYPE_COMPARISON_OP (StrongInt64, int64_t, >=)
template<typename StrongIndexName, typename H>
AbslHashValue (H h, const StrongIndex< StrongIndexName > &i)
 – ABSL HASHING SUPPORT --------------------------------------------------—
template<typename StrongIntegerName, typename H>
AbslHashValue (H h, const StrongInt64< StrongIntegerName > &i)
bool ProbablyRunningInsideUnitTest ()
float AlignedVectorSum (absl::Span< const float > values)
float VectorSum (absl::Span< const float > values)
 Computes the sum of values without assuming anything.
void LoadXpressFunctions (DynamicLibrary *xpress_dynamic_library)
void printXpressBanner (bool error)
std::vector< std::string > XpressDynamicLibraryPotentialPaths ()
absl::Status LoadXpressDynamicLibrary (std::string &xpresspath)
void log_message_about_XPRSinit_argument ()
void log_full_license_error (int code, const std::string &xpress_lib_dir)
bool initXpressEnv (bool verbose, int xpress_oem_license_key)
 ! init XPRESS environment.
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL FirstSolutionStrategy_Value_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL LocalSearchMetaheuristic_Value_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL RoutingSearchStatus_Value_descriptor ()
bool FirstSolutionStrategy_Value_IsValid (int value)
template<typename T>
const ::std::string & FirstSolutionStrategy_Value_Name (T value)
template<>
const ::std::string & FirstSolutionStrategy_Value_Name (FirstSolutionStrategy_Value value)
bool FirstSolutionStrategy_Value_Parse (::absl::string_view name, FirstSolutionStrategy_Value *PROTOBUF_NONNULL value)
bool LocalSearchMetaheuristic_Value_IsValid (int value)
template<typename T>
const ::std::string & LocalSearchMetaheuristic_Value_Name (T value)
template<>
const ::std::string & LocalSearchMetaheuristic_Value_Name (LocalSearchMetaheuristic_Value value)
bool LocalSearchMetaheuristic_Value_Parse (::absl::string_view name, LocalSearchMetaheuristic_Value *PROTOBUF_NONNULL value)
bool RoutingSearchStatus_Value_IsValid (int value)
template<typename T>
const ::std::string & RoutingSearchStatus_Value_Name (T value)
template<>
const ::std::string & RoutingSearchStatus_Value_Name (RoutingSearchStatus_Value value)
bool RoutingSearchStatus_Value_Parse (::absl::string_view name, RoutingSearchStatus_Value *PROTOBUF_NONNULL value)
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL RuinCompositionStrategy_Value_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL PerturbationStrategy_Value_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL CoolingScheduleStrategy_Value_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL AcceptanceStrategy_Value_descriptor ()
bool RuinCompositionStrategy_Value_IsValid (int value)
template<typename T>
const ::std::string & RuinCompositionStrategy_Value_Name (T value)
template<>
const ::std::string & RuinCompositionStrategy_Value_Name (RuinCompositionStrategy_Value value)
bool RuinCompositionStrategy_Value_Parse (::absl::string_view name, RuinCompositionStrategy_Value *PROTOBUF_NONNULL value)
bool PerturbationStrategy_Value_IsValid (int value)
template<typename T>
const ::std::string & PerturbationStrategy_Value_Name (T value)
template<>
const ::std::string & PerturbationStrategy_Value_Name (PerturbationStrategy_Value value)
bool PerturbationStrategy_Value_Parse (::absl::string_view name, PerturbationStrategy_Value *PROTOBUF_NONNULL value)
bool CoolingScheduleStrategy_Value_IsValid (int value)
template<typename T>
const ::std::string & CoolingScheduleStrategy_Value_Name (T value)
template<>
const ::std::string & CoolingScheduleStrategy_Value_Name (CoolingScheduleStrategy_Value value)
bool CoolingScheduleStrategy_Value_Parse (::absl::string_view name, CoolingScheduleStrategy_Value *PROTOBUF_NONNULL value)
bool AcceptanceStrategy_Value_IsValid (int value)
template<typename T>
const ::std::string & AcceptanceStrategy_Value_Name (T value)
template<>
const ::std::string & AcceptanceStrategy_Value_Name (AcceptanceStrategy_Value value)
bool AcceptanceStrategy_Value_Parse (::absl::string_view name, AcceptanceStrategy_Value *PROTOBUF_NONNULL value)
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL RoutingSearchParameters_PairInsertionStrategy_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL RoutingSearchParameters_InsertionSortingProperty_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL RoutingSearchParameters_SchedulingSolver_descriptor ()
bool RoutingSearchParameters_PairInsertionStrategy_IsValid (int value)
template<typename T>
const ::std::string & RoutingSearchParameters_PairInsertionStrategy_Name (T value)
template<>
const ::std::string & RoutingSearchParameters_PairInsertionStrategy_Name (RoutingSearchParameters_PairInsertionStrategy value)
bool RoutingSearchParameters_PairInsertionStrategy_Parse (::absl::string_view name, RoutingSearchParameters_PairInsertionStrategy *PROTOBUF_NONNULL value)
bool RoutingSearchParameters_InsertionSortingProperty_IsValid (int value)
template<typename T>
const ::std::string & RoutingSearchParameters_InsertionSortingProperty_Name (T value)
template<>
const ::std::string & RoutingSearchParameters_InsertionSortingProperty_Name (RoutingSearchParameters_InsertionSortingProperty value)
bool RoutingSearchParameters_InsertionSortingProperty_Parse (::absl::string_view name, RoutingSearchParameters_InsertionSortingProperty *PROTOBUF_NONNULL value)
bool RoutingSearchParameters_SchedulingSolver_IsValid (int value)
template<typename T>
const ::std::string & RoutingSearchParameters_SchedulingSolver_Name (T value)
template<>
const ::std::string & RoutingSearchParameters_SchedulingSolver_Name (RoutingSearchParameters_SchedulingSolver value)
bool RoutingSearchParameters_SchedulingSolver_Parse (::absl::string_view name, RoutingSearchParameters_SchedulingSolver *PROTOBUF_NONNULL value)
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL ConstraintSolverParameters_TrailCompression_descriptor ()
bool ConstraintSolverParameters_TrailCompression_IsValid (int value)
template<typename T>
const ::std::string & ConstraintSolverParameters_TrailCompression_Name (T value)
template<>
const ::std::string & ConstraintSolverParameters_TrailCompression_Name (ConstraintSolverParameters_TrailCompression value)
bool ConstraintSolverParameters_TrailCompression_Parse (::absl::string_view name, ConstraintSolverParameters_TrailCompression *PROTOBUF_NONNULL value)
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL FlowModelProto_ProblemType_descriptor ()
bool FlowModelProto_ProblemType_IsValid (int value)
template<typename T>
const ::std::string & FlowModelProto_ProblemType_Name (T value)
template<>
const ::std::string & FlowModelProto_ProblemType_Name (FlowModelProto_ProblemType value)
bool FlowModelProto_ProblemType_Parse (::absl::string_view name, FlowModelProto_ProblemType *PROTOBUF_NONNULL value)
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL GScipParameters_Emphasis_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL GScipParameters_MetaParamValue_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL GScipOutput_Status_descriptor ()
bool GScipParameters_Emphasis_IsValid (int value)
template<typename T>
const ::std::string & GScipParameters_Emphasis_Name (T value)
template<>
const ::std::string & GScipParameters_Emphasis_Name (GScipParameters_Emphasis value)
bool GScipParameters_Emphasis_Parse (::absl::string_view name, GScipParameters_Emphasis *PROTOBUF_NONNULL value)
bool GScipParameters_MetaParamValue_IsValid (int value)
template<typename T>
const ::std::string & GScipParameters_MetaParamValue_Name (T value)
template<>
const ::std::string & GScipParameters_MetaParamValue_Name (GScipParameters_MetaParamValue value)
bool GScipParameters_MetaParamValue_Parse (::absl::string_view name, GScipParameters_MetaParamValue *PROTOBUF_NONNULL value)
bool GScipOutput_Status_IsValid (int value)
template<typename T>
const ::std::string & GScipOutput_Status_Name (T value)
template<>
const ::std::string & GScipOutput_Status_Name (GScipOutput_Status value)
bool GScipOutput_Status_Parse (::absl::string_view name, GScipOutput_Status *PROTOBUF_NONNULL value)
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL MPSosConstraint_Type_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL MPModelProto_Annotation_TargetType_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL MPSolverCommonParameters_LPAlgorithmValues_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL MPModelRequest_SolverType_descriptor ()
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL MPSolverResponseStatus_descriptor ()
bool MPSosConstraint_Type_IsValid (int value)
template<typename T>
const ::std::string & MPSosConstraint_Type_Name (T value)
template<>
const ::std::string & MPSosConstraint_Type_Name (MPSosConstraint_Type value)
bool MPSosConstraint_Type_Parse (::absl::string_view name, MPSosConstraint_Type *PROTOBUF_NONNULL value)
bool MPModelProto_Annotation_TargetType_IsValid (int value)
template<typename T>
const ::std::string & MPModelProto_Annotation_TargetType_Name (T value)
template<>
const ::std::string & MPModelProto_Annotation_TargetType_Name (MPModelProto_Annotation_TargetType value)
bool MPModelProto_Annotation_TargetType_Parse (::absl::string_view name, MPModelProto_Annotation_TargetType *PROTOBUF_NONNULL value)
bool MPSolverCommonParameters_LPAlgorithmValues_IsValid (int value)
template<typename T>
const ::std::string & MPSolverCommonParameters_LPAlgorithmValues_Name (T value)
template<>
const ::std::string & MPSolverCommonParameters_LPAlgorithmValues_Name (MPSolverCommonParameters_LPAlgorithmValues value)
bool MPSolverCommonParameters_LPAlgorithmValues_Parse (::absl::string_view name, MPSolverCommonParameters_LPAlgorithmValues *PROTOBUF_NONNULL value)
bool MPModelRequest_SolverType_IsValid (int value)
template<typename T>
const ::std::string & MPModelRequest_SolverType_Name (T value)
bool MPModelRequest_SolverType_Parse (::absl::string_view name, MPModelRequest_SolverType *PROTOBUF_NONNULL value)
bool MPSolverResponseStatus_IsValid (int value)
template<typename T>
const ::std::string & MPSolverResponseStatus_Name (T value)
bool MPSolverResponseStatus_Parse (::absl::string_view name, MPSolverResponseStatus *PROTOBUF_NONNULL value)
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL CourseSchedulingResultStatus_descriptor ()
bool CourseSchedulingResultStatus_IsValid (int value)
template<typename T>
const ::std::string & CourseSchedulingResultStatus_Name (T value)
template<>
const ::std::string & CourseSchedulingResultStatus_Name (CourseSchedulingResultStatus value)
bool CourseSchedulingResultStatus_Parse (::absl::string_view name, CourseSchedulingResultStatus *PROTOBUF_NONNULL value)
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL SetCoverSolutionResponse_Status_descriptor ()
bool SetCoverSolutionResponse_Status_IsValid (int value)
template<typename T>
const ::std::string & SetCoverSolutionResponse_Status_Name (T value)
template<>
const ::std::string & SetCoverSolutionResponse_Status_Name (SetCoverSolutionResponse_Status value)
bool SetCoverSolutionResponse_Status_Parse (::absl::string_view name, SetCoverSolutionResponse_Status *PROTOBUF_NONNULL value)
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL OptionalBoolean_descriptor ()
bool OptionalBoolean_IsValid (int value)
template<typename T>
const ::std::string & OptionalBoolean_Name (T value)
template<>
const ::std::string & OptionalBoolean_Name (OptionalBoolean value)
bool OptionalBoolean_Parse (::absl::string_view name, OptionalBoolean *PROTOBUF_NONNULL value)
template<class Graph>
bool GraphIsSymmetric (const Graph &graph)
template<class T>
DemonMakeConstraintDemon0 (Solver *const s, T *const ct, void(T::*method)(), const std::string &name)
template<class P>
std::string ParameterDebugString (P param)
template<class P>
std::string ParameterDebugString (P *param)
 Support limited to pointers to classes which define DebugString().
template<class T, class P>
DemonMakeConstraintDemon1 (Solver *const s, T *const ct, void(T::*method)(P), const std::string &name, P param1)
template<class T, class P, class Q>
DemonMakeConstraintDemon2 (Solver *const s, T *const ct, void(T::*method)(P, Q), const std::string &name, P param1, Q param2)
template<class T, class P, class Q, class R>
DemonMakeConstraintDemon3 (Solver *const s, T *const ct, void(T::*method)(P, Q, R), const std::string &name, P param1, Q param2, R param3)
template<class T>
DemonMakeDelayedConstraintDemon0 (Solver *const s, T *const ct, void(T::*method)(), const std::string &name)
template<class T, class P>
DemonMakeDelayedConstraintDemon1 (Solver *const s, T *const ct, void(T::*method)(P), const std::string &name, P param1)
template<class T, class P, class Q>
DemonMakeDelayedConstraintDemon2 (Solver *const s, T *const ct, void(T::*method)(P, Q), const std::string &name, P param1, Q param2)

Variables

const bool DEBUG_MODE = true
static const int kUnassigned = -1
 --— Routing model --—
constexpr std::size_t kMaxGLPKNameLen = 255
template<typename NodeIndex>
const double BronKerboschAlgorithm< NodeIndex >::kPushStateDeterministicTimeSecondsPerCandidate = 0.54663e-7
const PathDistance kDisconnectedPathDistance
std::function< int(GRBmodel *model, const char *attrname)> GRBisattravailable
 This is the 'define' section.
std::function< int(GRBmodel *model, const char *attrname, int *valueP)> GRBgetintattr = nullptr
std::function< int(GRBmodel *model, const char *attrname, int newvalue)> GRBsetintattr = nullptr
std::function< int(GRBmodel *model, const char *attrname, int element, int *valueP)> GRBgetintattrelement = nullptr
std::function< int(GRBmodel *model, const char *attrname, int element, int newvalue)> GRBsetintattrelement = nullptr
std::function< int(GRBmodel *model, const char *attrname, int first, int len, int *values)> GRBgetintattrarray = nullptr
std::function< int(GRBmodel *model, const char *attrname, int first, int len, int *newvalues)> GRBsetintattrarray = nullptr
std::function< int(GRBmodel *model, const char *attrname, int len, int *ind, int *newvalues)> GRBsetintattrlist = nullptr
std::function< int(GRBmodel *model, const char *attrname, int element, char *valueP)> GRBgetcharattrelement = nullptr
std::function< int(GRBmodel *model, const char *attrname, int element, char newvalue)> GRBsetcharattrelement = nullptr
std::function< int(GRBmodel *model, const char *attrname, int first, int len, char *values)> GRBgetcharattrarray = nullptr
std::function< int(GRBmodel *model, const char *attrname, int first, int len, char *newvalues)> GRBsetcharattrarray = nullptr
std::function< int(GRBmodel *model, const char *attrname, int len, int *ind, char *newvalues)> GRBsetcharattrlist = nullptr
std::function< int(GRBmodel *model, const char *attrname, double *valueP)> GRBgetdblattr = nullptr
std::function< int(GRBmodel *model, const char *attrname, double newvalue)> GRBsetdblattr = nullptr
std::function< int(GRBmodel *model, const char *attrname, int element, double *valueP)> GRBgetdblattrelement = nullptr
std::function< int(GRBmodel *model, const char *attrname, int element, double newvalue)> GRBsetdblattrelement = nullptr
std::function< int(GRBmodel *model, const char *attrname, int first, int len, double *values)> GRBgetdblattrarray = nullptr
std::function< int(GRBmodel *model, const char *attrname, int first, int len, double *newvalues)> GRBsetdblattrarray = nullptr
std::function< int(GRBmodel *model, const char *attrname, int len, int *ind, double *newvalues)> GRBsetdblattrlist = nullptr
std::function< int(GRBmodel *model, const char *attrname, char **valueP)> GRBgetstrattr = nullptr
std::function< int(GRBmodel *model, const char *attrname, const char *newvalue)> GRBsetstrattr = nullptr
std::function< int(GRBmodel *model, int(GUROBI_STDCALL *cb)(CB_ARGS), void *usrdata)> GRBsetcallbackfunc = nullptr
std::function< int(void *cbdata, int where, int what, void *resultP)> GRBcbget
std::function< int(void *cbdata, const double *solution, double *objvalP)> GRBcbsolution = nullptr
std::function< int(void *cbdata, int cutlen, const int *cutind, const double *cutval, char cutsense, double cutrhs)> GRBcbcut = nullptr
std::function< int(void *cbdata, int lazylen, const int *lazyind, const double *lazyval, char lazysense, double lazyrhs)> GRBcblazy = nullptr
std::function< int(GRBmodel *model, int *numnzP, int *vbeg, int *vind, double *vval, int start, int len)> GRBgetvars = nullptr
std::function< int(GRBmodel *model)> GRBoptimize = nullptr
std::function< int(GRBmodel *model)> GRBcomputeIIS = nullptr
std::function< int(GRBmodel *model, const char *filename)> GRBwrite = nullptr
std::function< int(GRBenv *env, GRBmodel **modelP, const char *Pname, int numvars, double *obj, double *lb, double *ub, char *vtype, char **varnames)> GRBnewmodel = nullptr
std::function< int(GRBmodel *model, int numnz, int *vind, double *vval, double obj, double lb, double ub, char vtype, const char *varname)> GRBaddvar = nullptr
std::function< int(GRBmodel *model, int numvars, int numnz, int *vbeg, int *vind, double *vval, double *obj, double *lb, double *ub, char *vtype, char **varnames)> GRBaddvars = nullptr
std::function< int(GRBmodel *model, int numnz, int *cind, double *cval, char sense, double rhs, const char *constrname)> GRBaddconstr = nullptr
std::function< int(GRBmodel *model, int numconstrs, int numnz, int *cbeg, int *cind, double *cval, char *sense, double *rhs, char **constrnames)> GRBaddconstrs = nullptr
std::function< int(GRBmodel *model, int numnz, int *cind, double *cval, double lower, double upper, const char *constrname)> GRBaddrangeconstr = nullptr
std::function< int(GRBmodel *model, int numsos, int nummembers, int *types, int *beg, int *ind, double *weight)> GRBaddsos = nullptr
std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars, double constant)> GRBaddgenconstrMax = nullptr
std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars, double constant)> GRBaddgenconstrMin = nullptr
std::function< int(GRBmodel *model, const char *name, int resvar, int argvar)> GRBaddgenconstrAbs = nullptr
std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars)> GRBaddgenconstrAnd = nullptr
std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars)> GRBaddgenconstrOr = nullptr
std::function< int(GRBmodel *model, const char *name, int binvar, int binval, int nvars, const int *vars, const double *vals, char sense, double rhs)> GRBaddgenconstrIndicator = nullptr
std::function< int(GRBmodel *model, int numlnz, int *lind, double *lval, int numqnz, int *qrow, int *qcol, double *qval, char sense, double rhs, const char *QCname)> GRBaddqconstr = nullptr
std::function< int(GRBmodel *model, int numqnz, int *qrow, int *qcol, double *qval)> GRBaddqpterms = nullptr
std::function< int(GRBmodel *model, int len, int *ind)> GRBdelvars = nullptr
std::function< int(GRBmodel *model, int len, int *ind)> GRBdelconstrs = nullptr
std::function< int(GRBmodel *model, int len, int *ind)> GRBdelsos = nullptr
std::function< int(GRBmodel *model, int len, int *ind)> GRBdelgenconstrs
std::function< int(GRBmodel *model, int len, int *ind)> GRBdelqconstrs = nullptr
std::function< int(GRBmodel *model)> GRBdelq = nullptr
std::function< int(GRBmodel *model, int cnt, int *cind, int *vind, double *val)> GRBchgcoeffs = nullptr
std::function< int(GRBmodel *model)> GRBupdatemodel = nullptr
std::function< int(GRBmodel *model)> GRBfreemodel = nullptr
std::function< void(GRBmodel *model)> GRBterminate = nullptr
std::function< int(GRBmodel *model, int index, int priority, double weight, double abstol, double reltol, const char *name, double constant, int lnz, int *lind, double *lval)> GRBsetobjectiven = nullptr
std::function< int(GRBenv *env, const char *paramname, int *valueP)> GRBgetintparam = nullptr
std::function< int(GRBenv *env, const char *paramname, double *valueP)> GRBgetdblparam = nullptr
std::function< int(GRBenv *env, const char *paramname, char *valueP)> GRBgetstrparam = nullptr
std::function< int(GRBenv *env, const char *paramname, int *valueP, int *minP, int *maxP, int *defP)> GRBgetintparaminfo = nullptr
std::function< int(GRBenv *env, const char *paramname, double *valueP, double *minP, double *maxP, double *defP)> GRBgetdblparaminfo = nullptr
std::function< int(GRBenv *env, const char *paramname, char *valueP, char *defP)> GRBgetstrparaminfo = nullptr
std::function< int(GRBenv *env, const char *paramname)> GRBgetparamtype
std::function< int(GRBenv *env, int i, char **paramnameP)> GRBgetparamname
std::function< int(GRBenv *env, const char *paramname, const char *value)> GRBsetparam = nullptr
std::function< int(GRBenv *env, const char *paramname, int value)> GRBsetintparam = nullptr
std::function< int(GRBenv *env, const char *paramname, double value)> GRBsetdblparam = nullptr
std::function< int(GRBenv *env, const char *paramname, const char *value)> GRBsetstrparam = nullptr
std::function< int(GRBenv *env)> GRBresetparams = nullptr
std::function< int(GRBenv *dest, GRBenv *src)> GRBcopyparams = nullptr
std::function< int(GRBenv *env)> GRBgetnumparams = nullptr
std::function< int(GRBenv **envP)> GRBemptyenv = nullptr
std::function< int(GRBenv **envP, const char *logfilename)> GRBloadenv = nullptr
std::function< int(GRBenv *env)> GRBstartenv = nullptr
std::function< GRBenv *(GRBmodel *model)> GRBgetenv = nullptr
std::function< GRBenv *(GRBmodel *model, int num)> GRBgetmultiobjenv = nullptr
std::function< GRBenv *(GRBmodel *model)> GRBdiscardmultiobjenvs = nullptr
std::function< void(GRBenv *env)> GRBfreeenv = nullptr
std::function< const char *(GRBenv *env)> GRBgeterrormsg = nullptr
std::function< void(int *majorP, int *minorP, int *technicalP)> GRBversion
std::function< char *(void)> GRBplatform = nullptr
constexpr NamedOptimizationProblemType kOptimizationProblemTypeNames []
constexpr double kDefaultPrimalTolerance = 1e-07
static constexpr Cost kMaxPossibleCost = std::numeric_limits<Cost>::max()
static constexpr double kInfinity = std::numeric_limits<float>::infinity()
 num_uncovered_elements_
 num_free_elements_ [subset]
static const char *const kRailFiles []
 List all the files from the literature.
static const char *const kScp4To6Files []
static const char *const kScpAToEFiles []
static const char *const kScpNrFiles []
static const char *const kScpClrFiles []
static const char *const kScpCycFiles []
static const char *const kWedelinFiles []
static const char *const kBalasFiles []
static const char *const kFimiFiles []
static const uint64_t kAllBits64 = uint64_t{0xFFFFFFFFFFFFFFFF}
 Basic bit operations.
static const uint64_t kAllBitsButLsb64 = uint64_t{0xFFFFFFFFFFFFFFFE}
static const uint32_t kAllBits32 = 0xFFFFFFFFU
ABSL_CONST_INIT const bool kStdToCharsDoubleIsSupported
constexpr double kRoundTripTestNumber = 0.10000000000000002
constexpr absl::string_view kRoundTripTestNumberStr
constexpr bool kAsanEnabled = false
constexpr bool kMsanEnabled = false
constexpr bool kTsanEnabled = false
constexpr bool kAnyXsanEnabled
std::function< int(XPRSprob *p_prob)> XPRScreateprob = nullptr
std::function< int(XPRSprob prob)> XPRSdestroyprob = nullptr
std::function< int(const char *path)> XPRSinit = nullptr
std::function< int(void)> XPRSfree = nullptr
std::function< int(char *buffer, int maxbytes)> XPRSgetlicerrmsg = nullptr
std::function< int(int *p_i, char *p_c)> XPRSlicense = nullptr
std::function< int(char *banner)> XPRSgetbanner = nullptr
std::function< int(char *version)> XPRSgetversion = nullptr
std::function< int(XPRSprob prob, const char *probname)> XPRSsetprobname = nullptr
std::function< int(XPRSprob prob, int control)> XPRSsetdefaultcontrol = nullptr
std::function< int(XPRSprob prob, int reason)> XPRSinterrupt = nullptr
std::function< int(XPRSprob prob, int control, int value)> XPRSsetintcontrol = nullptr
std::function< int(XPRSprob prob, int control, XPRSint64 value)> XPRSsetintcontrol64 = nullptr
std::function< int(XPRSprob prob, int control, double value)> XPRSsetdblcontrol = nullptr
std::function< int(XPRSprob prob, int control, const char *value)> XPRSsetstrcontrol = nullptr
std::function< int(XPRSprob prob, int control, int *p_value)> XPRSgetintcontrol = nullptr
std::function< int(XPRSprob prob, int control, XPRSint64 *p_value)> XPRSgetintcontrol64 = nullptr
std::function< int(XPRSprob prob, int control, double *p_value)> XPRSgetdblcontrol = nullptr
std::function< int(XPRSprob prob, int control, char *value, int maxbytes, int *p_nbytes)> XPRSgetstringcontrol = nullptr
std::function< int(XPRSprob prob, int attrib, int *p_value)> XPRSgetintattrib = nullptr
std::function< int(XPRSprob prob, int attrib, char *value, int maxbytes, int *p_nbytes)> XPRSgetstringattrib = nullptr
std::function< int(XPRSprob prob, int attrib, double *p_value)> XPRSgetdblattrib = nullptr
std::function< int(XPRSprob prob, const char *name, int *p_id, int *p_type)> XPRSgetcontrolinfo = nullptr
std::function< int(XPRSprob prob, double objcoef[], int first, int last)> XPRSgetobj = nullptr
std::function< int(XPRSprob prob, double rhs[], int first, int last)> XPRSgetrhs = nullptr
std::function< int(XPRSprob prob, double rng[], int first, int last)> XPRSgetrhsrange = nullptr
std::function< int(XPRSprob prob, double lb[], int first, int last)> XPRSgetlb = nullptr
std::function< int(XPRSprob prob, double ub[], int first, int last)> XPRSgetub = nullptr
std::function< int(XPRSprob prob, int row, int col, double *p_coef)> XPRSgetcoef = nullptr
std::function< int(XPRSprob prob, int *status, double duals[], int first, int last)> XPRSgetduals = nullptr
std::function< int(XPRSprob prob, int *status, double djs[], int first, int last)> XPRSgetredcosts = nullptr
std::function< int(XPRSprob prob, int nrows, int ncoefs, const char rowtype[], const double rhs[], const double rng[], const int start[], const int colind[], const double rowcoef[])> XPRSaddrows = nullptr
std::function< int(XPRSprob prob, int nrows, const int rowind[])> XPRSdelrows = nullptr
std::function< int(XPRSprob prob, int ncols, int ncoefs, const double objcoef[], const int start[], const int rowind[], const double rowcoef[], const double lb[], const double ub[])> XPRSaddcols = nullptr
std::function< int(XPRSprob prob, int type, const char names[], int first, int last)> XPRSaddnames = nullptr
std::function< int(XPRSprob prob, int type, char names[], int first, int last)> XPRSgetnames = nullptr
std::function< int(XPRSprob prob, int ncols, const int colind[])> XPRSdelcols = nullptr
std::function< int(XPRSprob prob, int ncols, const int colind[], const char coltype[])> XPRSchgcoltype = nullptr
std::function< int(XPRSprob prob, const int rowstat[], const int colstat[])> XPRSloadbasis = nullptr
std::function< int(XPRSprob prob)> XPRSpostsolve = nullptr
std::function< int(XPRSprob prob, int objsense)> XPRSchgobjsense = nullptr
std::function< int(XPRSprob prob, char *errmsg)> XPRSgetlasterror = nullptr
std::function< int(XPRSprob prob, int rowstat[], int colstat[])> XPRSgetbasis = nullptr
std::function< int(XPRSprob prob, const char *filename, const char *flags)> XPRSwriteprob = nullptr
std::function< int(XPRSprob prob, char rowtype[], int first, int last)> XPRSgetrowtype = nullptr
std::function< int(XPRSprob prob, char coltype[], int first, int last)> XPRSgetcoltype = nullptr
std::function< int(XPRSprob prob, int nbounds, const int colind[], const char bndtype[], const double bndval[])> XPRSchgbounds = nullptr
std::function< int(XPRSprob prob, int length, const double solval[], const int colind[], const char *name)> XPRSaddmipsol = nullptr
std::function< int(XPRSprob prob, double x[], double slack[], double duals[], double djs[])> XPRSgetlpsol = nullptr
std::function< int(XPRSprob prob, double x[], double slack[])> XPRSgetmipsol = nullptr
std::function< int(XPRSprob prob, int ncols, const int colind[], const double objcoef[])> XPRSchgobj = nullptr
std::function< int(XPRSprob prob, int row, int col, double coef)> XPRSchgcoef = nullptr
std::function< int(XPRSprob prob, int ncoefs, const int rowind[], const int colind[], const double rowcoef[])> XPRSchgmcoef = nullptr
std::function< int(XPRSprob prob, XPRSint64 ncoefs, const int rowind[], const int colind[], const double rowcoef[])> XPRSchgmcoef64 = nullptr
std::function< int(XPRSprob prob, int ncoefs, const int objqcol1[], const int objqcol2[], const double objqcoef[])> XPRSchgmqobj = nullptr
std::function< int(XPRSprob prob, int nrows, const int rowind[], const double rhs[])> XPRSchgrhs = nullptr
std::function< int(XPRSprob prob, int nrows, const int rowind[], const double rng[])> XPRSchgrhsrange = nullptr
std::function< int(XPRSprob prob, int nrows, const int rowind[], const char rowtype[])> XPRSchgrowtype = nullptr
std::function< int(XPRSprob prob, int objidx)> XPRSdelobj = nullptr
std::function< int(XPRSprob prob, void(XPRS_CC *f_intsol)(XPRSprob cbprob, void *cbdata), void *p, int priority)> XPRSaddcbintsol = nullptr
std::function< int(XPRSprob prob, void(XPRS_CC *f_intsol)(XPRSprob cbprob, void *cbdata), void *p)> XPRSremovecbintsol = nullptr
std::function< int(XPRSprob prob, void(XPRS_CC *f_message)(XPRSprob cbprob, void *cbdata, const char *msg, int msglen, int msgtype), void *p, int priority)> XPRSaddcbmessage = nullptr
std::function< int(XPRSprob prob, const char *flags)> XPRSlpoptimize = nullptr
std::function< int(XPRSprob prob, const char *flags)> XPRSmipoptimize = nullptr
std::function< int(XPRSprob prob, const char *flags, int *solvestatus, int *solstatus)> XPRSoptimize = nullptr
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WorkerInfoDefaultTypeInternal _WorkerInfo_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SequenceVarAssignmentDefaultTypeInternal _SequenceVarAssignment_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IntervalVarAssignmentDefaultTypeInternal _IntervalVarAssignment_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IntVarAssignmentDefaultTypeInternal _IntVarAssignment_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AssignmentProtoDefaultTypeInternal _AssignmentProto_default_instance_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull IntVarAssignment_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull IntervalVarAssignment_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull SequenceVarAssignment_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull WorkerInfo_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull AssignmentProto_class_data_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DemonRunsDefaultTypeInternal _DemonRuns_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConstraintRunsDefaultTypeInternal _ConstraintRuns_default_instance_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull DemonRuns_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull ConstraintRuns_class_data_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoutingSearchStatusDefaultTypeInternal _RoutingSearchStatus_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LocalSearchMetaheuristicDefaultTypeInternal _LocalSearchMetaheuristic_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FirstSolutionStrategyDefaultTypeInternal _FirstSolutionStrategy_default_instance_
PROTOBUF_CONSTINIT const uint32_t FirstSolutionStrategy_Value_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t LocalSearchMetaheuristic_Value_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t RoutingSearchStatus_Value_internal_data_ []
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull FirstSolutionStrategy_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull LocalSearchMetaheuristic_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull RoutingSearchStatus_class_data_
constexpr FirstSolutionStrategy_Value FirstSolutionStrategy_Value_Value_MIN
constexpr FirstSolutionStrategy_Value FirstSolutionStrategy_Value_Value_MAX
constexpr int FirstSolutionStrategy_Value_Value_ARRAYSIZE = 17 + 1
constexpr LocalSearchMetaheuristic_Value LocalSearchMetaheuristic_Value_Value_MIN
constexpr LocalSearchMetaheuristic_Value LocalSearchMetaheuristic_Value_Value_MAX
constexpr int LocalSearchMetaheuristic_Value_Value_ARRAYSIZE = 6 + 1
constexpr RoutingSearchStatus_Value RoutingSearchStatus_Value_Value_MIN
constexpr RoutingSearchStatus_Value RoutingSearchStatus_Value_Value_MAX
constexpr int RoutingSearchStatus_Value_Value_ARRAYSIZE = 7 + 1
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SpatiallyCloseRoutesRuinStrategyDefaultTypeInternal _SpatiallyCloseRoutesRuinStrategy_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SimulatedAnnealingParametersDefaultTypeInternal _SimulatedAnnealingParameters_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SISRRuinStrategyDefaultTypeInternal _SISRRuinStrategy_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RuinCompositionStrategyDefaultTypeInternal _RuinCompositionStrategy_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RandomWalkRuinStrategyDefaultTypeInternal _RandomWalkRuinStrategy_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PerturbationStrategyDefaultTypeInternal _PerturbationStrategy_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CoolingScheduleStrategyDefaultTypeInternal _CoolingScheduleStrategy_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AcceptanceStrategyDefaultTypeInternal _AcceptanceStrategy_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RuinStrategyDefaultTypeInternal _RuinStrategy_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RuinRecreateParametersDefaultTypeInternal _RuinRecreateParameters_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IteratedLocalSearchParametersDefaultTypeInternal _IteratedLocalSearchParameters_default_instance_
PROTOBUF_CONSTINIT const uint32_t RuinCompositionStrategy_Value_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t PerturbationStrategy_Value_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t CoolingScheduleStrategy_Value_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t AcceptanceStrategy_Value_internal_data_ []
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull SpatiallyCloseRoutesRuinStrategy_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull RandomWalkRuinStrategy_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull SISRRuinStrategy_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull RuinStrategy_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull RuinCompositionStrategy_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull RuinRecreateParameters_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull PerturbationStrategy_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull CoolingScheduleStrategy_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull SimulatedAnnealingParameters_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull AcceptanceStrategy_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull IteratedLocalSearchParameters_class_data_
constexpr RuinCompositionStrategy_Value RuinCompositionStrategy_Value_Value_MIN
constexpr RuinCompositionStrategy_Value RuinCompositionStrategy_Value_Value_MAX
constexpr int RuinCompositionStrategy_Value_Value_ARRAYSIZE = 3 + 1
constexpr PerturbationStrategy_Value PerturbationStrategy_Value_Value_MIN
constexpr PerturbationStrategy_Value PerturbationStrategy_Value_Value_MAX
constexpr int PerturbationStrategy_Value_Value_ARRAYSIZE = 1 + 1
constexpr CoolingScheduleStrategy_Value CoolingScheduleStrategy_Value_Value_MIN
constexpr CoolingScheduleStrategy_Value CoolingScheduleStrategy_Value_Value_MAX
constexpr int CoolingScheduleStrategy_Value_Value_ARRAYSIZE = 2 + 1
constexpr AcceptanceStrategy_Value AcceptanceStrategy_Value_Value_MIN
constexpr AcceptanceStrategy_Value AcceptanceStrategy_Value_Value_MAX
constexpr int AcceptanceStrategy_Value_Value_ARRAYSIZE = 2 + 1
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoutingSearchParameters_LocalSearchNeighborhoodOperatorsDefaultTypeInternal _RoutingSearchParameters_LocalSearchNeighborhoodOperators_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoutingSearchParameters_ImprovementSearchLimitParametersDefaultTypeInternal _RoutingSearchParameters_ImprovementSearchLimitParameters_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoutingModelParametersDefaultTypeInternal _RoutingModelParameters_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoutingSearchParametersDefaultTypeInternal _RoutingSearchParameters_default_instance_
PROTOBUF_CONSTINIT const uint32_t RoutingSearchParameters_PairInsertionStrategy_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t RoutingSearchParameters_InsertionSortingProperty_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t RoutingSearchParameters_SchedulingSolver_internal_data_ []
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull RoutingSearchParameters_LocalSearchNeighborhoodOperators_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull RoutingSearchParameters_ImprovementSearchLimitParameters_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull RoutingSearchParameters_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull RoutingModelParameters_class_data_
constexpr RoutingSearchParameters_PairInsertionStrategy RoutingSearchParameters_PairInsertionStrategy_PairInsertionStrategy_MIN
constexpr RoutingSearchParameters_PairInsertionStrategy RoutingSearchParameters_PairInsertionStrategy_PairInsertionStrategy_MAX
constexpr int RoutingSearchParameters_PairInsertionStrategy_PairInsertionStrategy_ARRAYSIZE = 3 + 1
constexpr RoutingSearchParameters_InsertionSortingProperty RoutingSearchParameters_InsertionSortingProperty_InsertionSortingProperty_MIN
constexpr RoutingSearchParameters_InsertionSortingProperty RoutingSearchParameters_InsertionSortingProperty_InsertionSortingProperty_MAX
constexpr int RoutingSearchParameters_InsertionSortingProperty_InsertionSortingProperty_ARRAYSIZE = 8 + 1
constexpr RoutingSearchParameters_SchedulingSolver RoutingSearchParameters_SchedulingSolver_SchedulingSolver_MIN
constexpr RoutingSearchParameters_SchedulingSolver RoutingSearchParameters_SchedulingSolver_SchedulingSolver_MAX
constexpr int RoutingSearchParameters_SchedulingSolver_SchedulingSolver_ARRAYSIZE = 2 + 1
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegularLimitParametersDefaultTypeInternal _RegularLimitParameters_default_instance_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull RegularLimitParameters_class_data_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LocalSearchStatistics_LocalSearchOperatorStatisticsDefaultTypeInternal _LocalSearchStatistics_LocalSearchOperatorStatistics_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LocalSearchStatistics_LocalSearchFilterStatisticsDefaultTypeInternal _LocalSearchStatistics_LocalSearchFilterStatistics_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LocalSearchStatistics_FirstSolutionStatisticsDefaultTypeInternal _LocalSearchStatistics_FirstSolutionStatistics_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConstraintSolverStatisticsDefaultTypeInternal _ConstraintSolverStatistics_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LocalSearchStatisticsDefaultTypeInternal _LocalSearchStatistics_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchStatisticsDefaultTypeInternal _SearchStatistics_default_instance_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull LocalSearchStatistics_FirstSolutionStatistics_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull LocalSearchStatistics_LocalSearchOperatorStatistics_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull LocalSearchStatistics_LocalSearchFilterStatistics_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull LocalSearchStatistics_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull ConstraintSolverStatistics_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull SearchStatistics_class_data_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConstraintSolverParametersDefaultTypeInternal _ConstraintSolverParameters_default_instance_
PROTOBUF_CONSTINIT const uint32_t ConstraintSolverParameters_TrailCompression_internal_data_ []
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull ConstraintSolverParameters_class_data_
constexpr ConstraintSolverParameters_TrailCompression ConstraintSolverParameters_TrailCompression_TrailCompression_MIN
constexpr ConstraintSolverParameters_TrailCompression ConstraintSolverParameters_TrailCompression_TrailCompression_MAX
constexpr int ConstraintSolverParameters_TrailCompression_TrailCompression_ARRAYSIZE = 1 + 1
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowNodeProtoDefaultTypeInternal _FlowNodeProto_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowArcProtoDefaultTypeInternal _FlowArcProto_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowModelProtoDefaultTypeInternal _FlowModelProto_default_instance_
PROTOBUF_CONSTINIT const uint32_t FlowModelProto_ProblemType_internal_data_ []
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull FlowArcProto_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull FlowNodeProto_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull FlowModelProto_class_data_
constexpr FlowModelProto_ProblemType FlowModelProto_ProblemType_ProblemType_MIN
constexpr FlowModelProto_ProblemType FlowModelProto_ProblemType_ProblemType_MAX
constexpr int FlowModelProto_ProblemType_ProblemType_ARRAYSIZE = 2 + 1
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GScipSolvingStatsDefaultTypeInternal _GScipSolvingStats_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GScipParameters_StringParamsEntry_DoNotUseDefaultTypeInternal _GScipParameters_StringParamsEntry_DoNotUse_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GScipParameters_RealParamsEntry_DoNotUseDefaultTypeInternal _GScipParameters_RealParamsEntry_DoNotUse_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GScipParameters_LongParamsEntry_DoNotUseDefaultTypeInternal _GScipParameters_LongParamsEntry_DoNotUse_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GScipParameters_IntParamsEntry_DoNotUseDefaultTypeInternal _GScipParameters_IntParamsEntry_DoNotUse_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GScipParameters_CharParamsEntry_DoNotUseDefaultTypeInternal _GScipParameters_CharParamsEntry_DoNotUse_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GScipParameters_BoolParamsEntry_DoNotUseDefaultTypeInternal _GScipParameters_BoolParamsEntry_DoNotUse_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GScipParametersDefaultTypeInternal _GScipParameters_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GScipOutputDefaultTypeInternal _GScipOutput_default_instance_
PROTOBUF_CONSTINIT const uint32_t GScipParameters_Emphasis_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t GScipParameters_MetaParamValue_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t GScipOutput_Status_internal_data_ []
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull GScipParameters_BoolParamsEntry_DoNotUse_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull GScipParameters_IntParamsEntry_DoNotUse_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull GScipParameters_LongParamsEntry_DoNotUse_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull GScipParameters_RealParamsEntry_DoNotUse_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull GScipParameters_CharParamsEntry_DoNotUse_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull GScipParameters_StringParamsEntry_DoNotUse_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull GScipParameters_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull GScipSolvingStats_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull GScipOutput_class_data_
constexpr GScipParameters_Emphasis GScipParameters_Emphasis_Emphasis_MIN
constexpr GScipParameters_Emphasis GScipParameters_Emphasis_Emphasis_MAX
constexpr int GScipParameters_Emphasis_Emphasis_ARRAYSIZE = 9 + 1
constexpr GScipParameters_MetaParamValue GScipParameters_MetaParamValue_MetaParamValue_MIN
constexpr GScipParameters_MetaParamValue GScipParameters_MetaParamValue_MetaParamValue_MAX
constexpr int GScipParameters_MetaParamValue_MetaParamValue_ARRAYSIZE = 3 + 1
constexpr GScipOutput_Status GScipOutput_Status_Status_MIN
constexpr GScipOutput_Status GScipOutput_Status_Status_MAX
constexpr int GScipOutput_Status_Status_ARRAYSIZE = 16 + 1
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PartialVariableAssignmentDefaultTypeInternal _PartialVariableAssignment_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OptionalDoubleDefaultTypeInternal _OptionalDouble_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPVariableProtoDefaultTypeInternal _MPVariableProto_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPSosConstraintDefaultTypeInternal _MPSosConstraint_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPSolveInfoDefaultTypeInternal _MPSolveInfo_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPSolutionDefaultTypeInternal _MPSolution_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPQuadraticObjectiveDefaultTypeInternal _MPQuadraticObjective_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPQuadraticConstraintDefaultTypeInternal _MPQuadraticConstraint_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPModelProto_AnnotationDefaultTypeInternal _MPModelProto_Annotation_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPConstraintProtoDefaultTypeInternal _MPConstraintProto_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPArrayWithConstantConstraintDefaultTypeInternal _MPArrayWithConstantConstraint_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPArrayConstraintDefaultTypeInternal _MPArrayConstraint_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPAbsConstraintDefaultTypeInternal _MPAbsConstraint_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPSolverCommonParametersDefaultTypeInternal _MPSolverCommonParameters_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPSolutionResponseDefaultTypeInternal _MPSolutionResponse_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPModelDeltaProto_VariableOverridesEntry_DoNotUseDefaultTypeInternal _MPModelDeltaProto_VariableOverridesEntry_DoNotUse_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPModelDeltaProto_ConstraintOverridesEntry_DoNotUseDefaultTypeInternal _MPModelDeltaProto_ConstraintOverridesEntry_DoNotUse_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPIndicatorConstraintDefaultTypeInternal _MPIndicatorConstraint_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPModelDeltaProtoDefaultTypeInternal _MPModelDeltaProto_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPGeneralConstraintProtoDefaultTypeInternal _MPGeneralConstraintProto_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPModelProtoDefaultTypeInternal _MPModelProto_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MPModelRequestDefaultTypeInternal _MPModelRequest_default_instance_
PROTOBUF_CONSTINIT const uint32_t MPSosConstraint_Type_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t MPModelProto_Annotation_TargetType_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t MPSolverCommonParameters_LPAlgorithmValues_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t MPModelRequest_SolverType_internal_data_ []
PROTOBUF_CONSTINIT const uint32_t MPSolverResponseStatus_internal_data_ []
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPVariableProto_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPConstraintProto_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPGeneralConstraintProto_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPIndicatorConstraint_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPSosConstraint_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPQuadraticConstraint_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPAbsConstraint_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPArrayConstraint_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPArrayWithConstantConstraint_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPQuadraticObjective_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull PartialVariableAssignment_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPModelProto_Annotation_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPModelProto_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull OptionalDouble_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPSolverCommonParameters_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPModelDeltaProto_VariableOverridesEntry_DoNotUse_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPModelDeltaProto_ConstraintOverridesEntry_DoNotUse_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPModelDeltaProto_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPModelRequest_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPSolution_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPSolveInfo_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull MPSolutionResponse_class_data_
constexpr MPSosConstraint_Type MPSosConstraint_Type_Type_MIN
constexpr MPSosConstraint_Type MPSosConstraint_Type_Type_MAX
constexpr int MPSosConstraint_Type_Type_ARRAYSIZE = 1 + 1
constexpr MPModelProto_Annotation_TargetType MPModelProto_Annotation_TargetType_TargetType_MIN
constexpr MPModelProto_Annotation_TargetType MPModelProto_Annotation_TargetType_TargetType_MAX
constexpr int MPModelProto_Annotation_TargetType_TargetType_ARRAYSIZE = 2 + 1
constexpr MPSolverCommonParameters_LPAlgorithmValues MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MIN
constexpr MPSolverCommonParameters_LPAlgorithmValues MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MAX
constexpr int MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_ARRAYSIZE = 3 + 1
constexpr MPModelRequest_SolverType MPModelRequest_SolverType_SolverType_MIN
constexpr MPModelRequest_SolverType MPModelRequest_SolverType_SolverType_MAX
constexpr int MPModelRequest_SolverType_SolverType_ARRAYSIZE = 102 + 1
constexpr MPSolverResponseStatus MPSolverResponseStatus_MIN
constexpr MPSolverResponseStatus MPSolverResponseStatus_MAX
constexpr int MPSolverResponseStatus_ARRAYSIZE = 113 + 1
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TeacherDefaultTypeInternal _Teacher_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StudentAssignmentDefaultTypeInternal _StudentAssignment_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StudentDefaultTypeInternal _Student_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RoomDefaultTypeInternal _Room_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CourseDefaultTypeInternal _Course_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ClassAssignmentDefaultTypeInternal _ClassAssignment_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CourseSchedulingResultDefaultTypeInternal _CourseSchedulingResult_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CourseSchedulingModelDefaultTypeInternal _CourseSchedulingModel_default_instance_
PROTOBUF_CONSTINIT const uint32_t CourseSchedulingResultStatus_internal_data_ []
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull CourseSchedulingModel_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull CourseSchedulingResult_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull ClassAssignment_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull StudentAssignment_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull Course_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull Teacher_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull Student_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull Room_class_data_
constexpr CourseSchedulingResultStatus CourseSchedulingResultStatus_MIN
constexpr CourseSchedulingResultStatus CourseSchedulingResultStatus_MAX
constexpr int CourseSchedulingResultStatus_ARRAYSIZE = 6 + 1
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CapacityConstraintProto_CapacityTerm_ElementWeightPairDefaultTypeInternal _CapacityConstraintProto_CapacityTerm_ElementWeightPair_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CapacityConstraintProto_CapacityTermDefaultTypeInternal _CapacityConstraintProto_CapacityTerm_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CapacityConstraintProtoDefaultTypeInternal _CapacityConstraintProto_default_instance_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull CapacityConstraintProto_CapacityTerm_ElementWeightPair_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull CapacityConstraintProto_CapacityTerm_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull CapacityConstraintProto_class_data_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SetCoverProto_SubsetDefaultTypeInternal _SetCoverProto_Subset_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SetCoverSolutionResponseDefaultTypeInternal _SetCoverSolutionResponse_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SetCoverProtoDefaultTypeInternal _SetCoverProto_default_instance_
PROTOBUF_CONSTINIT const uint32_t SetCoverSolutionResponse_Status_internal_data_ []
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull SetCoverProto_Subset_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull SetCoverProto_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull SetCoverSolutionResponse_class_data_
constexpr SetCoverSolutionResponse_Status SetCoverSolutionResponse_Status_Status_MIN
constexpr SetCoverSolutionResponse_Status SetCoverSolutionResponse_Status_Status_MAX
constexpr int SetCoverSolutionResponse_Status_Status_ARRAYSIZE = 4 + 1
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Int128DefaultTypeInternal _Int128_default_instance_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull Int128_class_data_
PROTOBUF_CONSTINIT const uint32_t OptionalBoolean_internal_data_ []
constexpr OptionalBoolean OptionalBoolean_MIN
constexpr OptionalBoolean OptionalBoolean_MAX
constexpr int OptionalBoolean_ARRAYSIZE = 3 + 1

Typedef Documentation

◆ AlignedAllocator

template<typename T, size_t alignment_bytes>
using operations_research::AlignedAllocator
Initial value:

Support for aligned containers in STL.

An allocator that always aligns its memory to alignment_bytes.

Definition at line 72 of file aligned_memory.h.

◆ AlignedVector

template<typename T, size_t alignment_bytes>
using operations_research::AlignedVector = std::vector<T, AlignedAllocator<T, alignment_bytes>>

A version of std::vector<T> whose data() pointer is always aligned to alignment_bytes.

Definition at line 78 of file aligned_memory.h.

◆ ArcId

using operations_research::ArcId = SubDagComputer::ArcId

Definition at line 3164 of file local_search.cc.

◆ BaseInt

Base non-strict integer type for counting elements and subsets. Using ints makes it possible to represent problems with more than 2 billion (2e9) elements and subsets. If need arises one day, BaseInt can be split into SubsetBaseInt and ElementBaseInt. Quick testing has shown a slowdown of about 20-25% when using int64_t.

Definition at line 39 of file base_types.h.

◆ BenchmarksTableRow

Initial value:
std::tuple<std::string, std::vector<std::string>, FileFormat>

Definition at line 492 of file set_cover_solve.cc.

◆ CapacityElements

Initial value:

The terms are represented as three aligned vectors: the element, the subset, and the weight. Each vector is indexed by the term.

Definition at line 48 of file capacity_model.h.

◆ CapacitySubsets

◆ CapacityWeight

Basic type for weights. For now, the same as Cost for the set covering.

Definition at line 41 of file capacity_model.h.

◆ CapacityWeights

◆ CL

◆ ColumnEntryRange

using operations_research::ColumnEntryRange = util_intops::StrongIntRange<ColumnEntryIndex>

Definition at line 56 of file base_types.h.

◆ CompressedColumn

using operations_research::CompressedColumn = CompressedStrongVector<ColumnEntryIndex, ElementIndex>

Definition at line 259 of file base_types.h.

◆ CompressedColumnIterator

◆ CompressedColumnView

◆ CompressedRow

using operations_research::CompressedRow = CompressedStrongVector<RowEntryIndex, SubsetIndex>

Definition at line 260 of file base_types.h.

◆ CompressedRowIterator

◆ CompressedRowView

◆ CoreToFullElementMapVector

◆ CoreToFullSubsetMapVector

◆ Cost

using operations_research::Cost = double

Basic non-strict type for cost. The speed penalty for using double is ~2%.

Definition at line 32 of file base_types.h.

◆ CostValue

using operations_research::CostValue = BlossomGraph::CostValue

Definition at line 121 of file perfect_matching.cc.

◆ ElementBoolVector

Definition at line 72 of file base_types.h.

◆ ElementCostVector

Definition at line 59 of file base_types.h.

◆ ElementRange

using operations_research::ElementRange = util_intops::StrongIntRange<ElementIndex>

Definition at line 55 of file base_types.h.

◆ ElementToIntVector

Definition at line 64 of file base_types.h.

◆ ElementToSubsetVector

Initial value:

Maps from element to subset. Useful to compress the sparse row view.

Definition at line 75 of file base_types.h.

◆ Fraction

typedef std::pair<int64_t, int64_t> operations_research::Fraction

The type Fraction represents a number in the form of two integers: numerator and denominator. This type is used to display the rational approximation of a Fractional number.

Definition at line 25 of file rational_approximation.h.

◆ FullElementBoolVector

Definition at line 58 of file set_cover_views.h.

◆ FullElementCostVector

Definition at line 56 of file set_cover_views.h.

◆ FullElementToIntVector

◆ FullSubsetBoolVector

Definition at line 59 of file set_cover_views.h.

◆ FullSubsetCostVector

Definition at line 57 of file set_cover_views.h.

◆ FullSubsetToIntVector

◆ FullToCoreElementMapVector

Initial value:

When a sub-model is created, indicies are compacted to be consecutive and strarting from 0 (to reduce memory usage). Core ElementIndex to original ElementIndex mappings are stored to translate back to the original model space.

Definition at line 69 of file set_cover_views.h.

◆ FullToCoreSubsetMapVector

Initial value:

The same applies to SubsetIndex, which also needs to be mapped back to the original indexing space.

Definition at line 76 of file set_cover_views.h.

◆ Graph

Type of graph to use.

Definition at line 183 of file solve_flow_model.cc.

◆ GScipMessageHandler

Initial value:
std::function<void(GScipMessageType type, absl::string_view message)>

An optional callback function to redirect the SCIP logging messages.

The input message usually ends with a newline character. This may not be the case though when the internal buffer of SCIP is full, in the case this function is called with a partial message. This will also happen when the last message the solve ends with an unfinished line.

Definition at line 36 of file gscip_message_handler.h.

◆ Int16ZVector

Definition at line 159 of file zvector.h.

◆ Int32ZVector

Definition at line 160 of file zvector.h.

◆ Int64ZVector

Definition at line 161 of file zvector.h.

◆ Int8ZVector

Shorthands for all the types of ZVector's.

Definition at line 158 of file zvector.h.

◆ KnapsackItemPtr

◆ NeighborAccessor

typedef std::function< const std::vector< int > &(int, int)> operations_research::NeighborAccessor
Initial value:
std::function<const std::vector<int>&(int, int)>

--— Path-based Operators --—

Definition at line 345 of file local_search.cc.

◆ NodeId

using operations_research::NodeId = SubDagComputer::NodeId

Definition at line 3118 of file local_search.cc.

◆ NodeIndex

Definition at line 120 of file perfect_matching.cc.

◆ PathDistance

Storing distances on 32 bits to limit memory consumption of distance matrices. If distances don't fit on 32 bits, scaling and losing a bit of precision should be acceptable in practice.

Definition at line 90 of file shortest_paths.h.

◆ PathNodeIndex

Deprecated
type.

Definition at line 455 of file hamiltonian_path.h.

◆ random_engine_t

using operations_research::random_engine_t = std::mt19937_64

Definition at line 23 of file random_engine.h.

◆ RoutingCumulDependentTransitCallback2

Definition at line 54 of file routing_types.h.

◆ RoutingNodeEvaluator2

typedef std::function<int64_t(RoutingNodeIndex, RoutingNodeIndex)> operations_research::RoutingNodeEvaluator2

Definition at line 33 of file cvrptw_lib.h.

◆ RoutingTransitCallback1

typedef std::function<int64_t(int64_t)> operations_research::RoutingTransitCallback1

Definition at line 50 of file routing_types.h.

◆ RoutingTransitCallback2

typedef std::function<int64_t(int64_t, int64_t)> operations_research::RoutingTransitCallback2

Definition at line 51 of file routing_types.h.

◆ ScopedTimeDistributionUpdater

If OR_STATS is not defined, we remove some instructions that may be time consuming.

Definition at line 409 of file stats.h.

◆ ScopedTimeStats

◆ SparseColumn

using operations_research::SparseColumn = util_intops::StrongVector<ColumnEntryIndex, ElementIndex>

Definition at line 61 of file base_types.h.

◆ SparseColumnView

Views of the sparse vectors.

Definition at line 68 of file base_types.h.

◆ SparseRow

using operations_research::SparseRow = util_intops::StrongVector<RowEntryIndex, SubsetIndex>

Definition at line 62 of file base_types.h.

◆ SparseRowView

Definition at line 69 of file base_types.h.

◆ StrictVector

template<typename IndexType, typename ValueType>
using operations_research::StrictVector = glop::StrictITIVector<IndexType, ValueType>

Definition at line 44 of file set_cover_mip.cc.

◆ SubsetBoolVector

Definition at line 71 of file base_types.h.

◆ SubsetCostVector

Definition at line 58 of file base_types.h.

◆ SubsetRange

using operations_research::SubsetRange = util_intops::StrongIntRange<SubsetIndex>

Definition at line 54 of file base_types.h.

◆ SubsetToIntVector

Definition at line 65 of file base_types.h.

◆ UInt16ZVector

Definition at line 163 of file zvector.h.

◆ UInt32ZVector

Definition at line 164 of file zvector.h.

◆ UInt64ZVector

Definition at line 165 of file zvector.h.

◆ UInt8ZVector

Definition at line 162 of file zvector.h.

◆ UnsafeDenseSet

template<typename T>
using operations_research::UnsafeDenseSet = DenseSet<T, false>

Like DenseSet, but does not automatically resize the internal position vector, which is ~30% faster.

Definition at line 135 of file dense_set.h.

◆ value_type_t

template<class Iterator>
using operations_research::value_type_t = typename std::iterator_traits<Iterator>::value_type

Definition at line 24 of file sort.h.

◆ VariableDomainId

using operations_research::VariableDomainId = LocalSearchState::VariableDomainId

Definition at line 2987 of file local_search.cc.

Enumeration Type Documentation

◆ AcceptanceStrategy_Value

Enumerator
AcceptanceStrategy_Value_UNSET 
AcceptanceStrategy_Value_GREEDY_DESCENT 
AcceptanceStrategy_Value_SIMULATED_ANNEALING 
AcceptanceStrategy_Value_AcceptanceStrategy_Value_INT_MIN_SENTINEL_DO_NOT_USE_ 
AcceptanceStrategy_Value_AcceptanceStrategy_Value_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 241 of file routing_ils.pb.h.

◆ BronKerboschAlgorithmStatus

The status value returned by BronKerboschAlgorithm::Run and BronKerboschAlgorithm::RunIterations.

Enumerator
COMPLETED 

The algorithm has enumerated all maximal cliques.

INTERRUPTED 

The search algorithm was interrupted either because it reached the iteration limit or because the clique callback returned CliqueResponse::STOP.

Definition at line 73 of file cliques.h.

◆ CliqueResponse

Possible return values of the callback for reporting cliques. The returned value determines whether the algorithm will continue the search.

Enumerator
CONTINUE 

The algorithm will continue searching for other maximal cliques.

STOP 

The algorithm will stop the search immediately. The search can be resumed by calling BronKerboschAlgorithm::Run (resp. RunIterations) again.

Definition at line 63 of file cliques.h.

◆ ConstraintHandlerCallbackType

Helpers for implementing callbacks Enum with supported user-implementable callback functions in the SCIP constraint handler. Non-user-implementable functions are not included here (e.g. CONSFREE). Same order as in type_cons.h.

Enumerator
kSepaLp 
kSepaSol 
kEnfoLp 
kEnfoPs 

Unsupported: kEnfoRelax, ///< CONSENFORELAX.

kConsCheck 
kConsLock 

Unsupported: kConsProp, ///< CONSPROP Unsupported: kConsPresol, ///< CONSPRESOL Unsupported: kConsResProp, ///< CONSRESPROP

Definition at line 462 of file gscip_constraint_handler.h.

◆ ConstraintSolverParameters_TrailCompression

Enumerator
ConstraintSolverParameters_TrailCompression_NO_COMPRESSION 
ConstraintSolverParameters_TrailCompression_COMPRESS_WITH_ZLIB 
ConstraintSolverParameters_TrailCompression_ConstraintSolverParameters_TrailCompression_INT_MIN_SENTINEL_DO_NOT_USE_ 
ConstraintSolverParameters_TrailCompression_ConstraintSolverParameters_TrailCompression_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 73 of file solver_parameters.pb.h.

◆ CoolingScheduleStrategy_Value

Enumerator
CoolingScheduleStrategy_Value_UNSET 
CoolingScheduleStrategy_Value_EXPONENTIAL 
CoolingScheduleStrategy_Value_LINEAR 
CoolingScheduleStrategy_Value_CoolingScheduleStrategy_Value_INT_MIN_SENTINEL_DO_NOT_USE_ 
CoolingScheduleStrategy_Value_CoolingScheduleStrategy_Value_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 204 of file routing_ils.pb.h.

◆ CourseSchedulingResultStatus

Enumerator
COURSE_SCHEDULING_RESULT_STATUS_UNSPECIFIED 
SOLVER_FEASIBLE 
SOLVER_OPTIMAL 
SOLVER_INFEASIBLE 
SOLVER_MODEL_INVALID 
SOLVER_NOT_SOLVED 
ABNORMAL 
CourseSchedulingResultStatus_INT_MIN_SENTINEL_DO_NOT_USE_ 
CourseSchedulingResultStatus_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 101 of file course_scheduling.pb.h.

◆ CUSTOM_INTERRUPT_REASON

Enumerator
CALLBACK_EXCEPTION 

Definition at line 201 of file xpress_interface.cc.

◆ DimensionSchedulingStatus

Enumerator
OPTIMAL 

An optimal solution was found respecting all constraints.

RELAXED_OPTIMAL_ONLY 

An optimal solution was found, however constraints which were relaxed were violated.

FEASIBLE 

Only a feasible solution was found, optimality was not proven.

INFEASIBLE 

A solution could not be found.

Definition at line 158 of file routing_lp_scheduling.h.

◆ FileFormat

Todo
(user): Move this set_cover_reader
Enumerator
EMPTY 
ORLIB 
RAIL 
FIMI 
PROTO 
PROTO_BIN 
TXT 

Definition at line 157 of file set_cover_solve.cc.

◆ FirstSolutionStrategy_Value

Enumerator
FirstSolutionStrategy_Value_UNSET 
FirstSolutionStrategy_Value_AUTOMATIC 
FirstSolutionStrategy_Value_PATH_CHEAPEST_ARC 
FirstSolutionStrategy_Value_PATH_MOST_CONSTRAINED_ARC 
FirstSolutionStrategy_Value_EVALUATOR_STRATEGY 
FirstSolutionStrategy_Value_SAVINGS 
FirstSolutionStrategy_Value_PARALLEL_SAVINGS 
FirstSolutionStrategy_Value_SWEEP 
FirstSolutionStrategy_Value_CHRISTOFIDES 
FirstSolutionStrategy_Value_ALL_UNPERFORMED 
FirstSolutionStrategy_Value_BEST_INSERTION 
FirstSolutionStrategy_Value_PARALLEL_CHEAPEST_INSERTION 
FirstSolutionStrategy_Value_SEQUENTIAL_CHEAPEST_INSERTION 
FirstSolutionStrategy_Value_LOCAL_CHEAPEST_INSERTION 
FirstSolutionStrategy_Value_LOCAL_CHEAPEST_COST_INSERTION 
FirstSolutionStrategy_Value_GLOBAL_CHEAPEST_ARC 
FirstSolutionStrategy_Value_LOCAL_CHEAPEST_ARC 
FirstSolutionStrategy_Value_FIRST_UNBOUND_MIN_VALUE 
FirstSolutionStrategy_Value_FirstSolutionStrategy_Value_INT_MIN_SENTINEL_DO_NOT_USE_ 
FirstSolutionStrategy_Value_FirstSolutionStrategy_Value_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 92 of file routing_enums.pb.h.

◆ FlowModelProto_ProblemType

Enumerator
FlowModelProto_ProblemType_LINEAR_SUM_ASSIGNMENT 
FlowModelProto_ProblemType_MAX_FLOW 
FlowModelProto_ProblemType_MIN_COST_FLOW 

Definition at line 81 of file flow_problem.pb.h.

◆ GScipCallbackResult

Equivalent to type_result.h in SCIP.

Enumerator
kDidNotRun 
kDelayed 
kDidNotFind 
kFeasible 
kInfeasible 
kUnbounded 
kCutOff 
kSeparated 
kNewRound 

The method added a cutting plane and a new separation round should immediately start.

kReducedDomain 
kConstraintAdded 
kConstraintChanged 
kBranched 
kSolveLp 
kFoundSolution 
kSuspend 

The method interrupted its execution, but can continue if needed.

kSuccess 
kDelayNode 

The processing of the branch-and-bound node should stopped and continued later.

Definition at line 23 of file gscip_callback_result.h.

◆ GScipMessageType

Scip message handlers have three methods to log messages. This enum enables using the same function for all three types of messages.

Enumerator
kInfoMessage 
kDialogMessage 
kWarningMessage 

Definition at line 28 of file gscip_message_handler.h.

◆ GScipOutput_Status

Enumerator
GScipOutput_Status_UNKNOWN 
GScipOutput_Status_USER_INTERRUPT 
GScipOutput_Status_NODE_LIMIT 
GScipOutput_Status_TOTAL_NODE_LIMIT 
GScipOutput_Status_STALL_NODE_LIMIT 
GScipOutput_Status_TIME_LIMIT 
GScipOutput_Status_MEM_LIMIT 
GScipOutput_Status_GAP_LIMIT 
GScipOutput_Status_SOL_LIMIT 
GScipOutput_Status_BEST_SOL_LIMIT 
GScipOutput_Status_RESTART_LIMIT 
GScipOutput_Status_OPTIMAL 
GScipOutput_Status_INFEASIBLE 
GScipOutput_Status_UNBOUNDED 
GScipOutput_Status_INF_OR_UNBD 
GScipOutput_Status_TERMINATE 
GScipOutput_Status_INVALID_SOLVER_PARAMETERS 
GScipOutput_Status_GScipOutput_Status_INT_MIN_SENTINEL_DO_NOT_USE_ 
GScipOutput_Status_GScipOutput_Status_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 201 of file gscip.pb.h.

◆ GScipParameters_Emphasis

Enumerator
GScipParameters_Emphasis_DEFAULT_EMPHASIS 
GScipParameters_Emphasis_COUNTER 
GScipParameters_Emphasis_CP_SOLVER 
GScipParameters_Emphasis_EASY_CIP 
GScipParameters_Emphasis_FEASIBILITY 
GScipParameters_Emphasis_HARD_LP 
GScipParameters_Emphasis_OPTIMALITY 
GScipParameters_Emphasis_PHASE_FEAS 
GScipParameters_Emphasis_PHASE_IMPROVE 
GScipParameters_Emphasis_PHASE_PROOF 
GScipParameters_Emphasis_GScipParameters_Emphasis_INT_MIN_SENTINEL_DO_NOT_USE_ 
GScipParameters_Emphasis_GScipParameters_Emphasis_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 119 of file gscip.pb.h.

◆ GScipParameters_MetaParamValue

Enumerator
GScipParameters_MetaParamValue_DEFAULT_META_PARAM_VALUE 
GScipParameters_MetaParamValue_AGGRESSIVE 
GScipParameters_MetaParamValue_FAST 
GScipParameters_MetaParamValue_OFF 
GScipParameters_MetaParamValue_GScipParameters_MetaParamValue_INT_MIN_SENTINEL_DO_NOT_USE_ 
GScipParameters_MetaParamValue_GScipParameters_MetaParamValue_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 163 of file gscip.pb.h.

◆ LocalSearchMetaheuristic_Value

Enumerator
LocalSearchMetaheuristic_Value_UNSET 
LocalSearchMetaheuristic_Value_AUTOMATIC 
LocalSearchMetaheuristic_Value_GREEDY_DESCENT 
LocalSearchMetaheuristic_Value_GUIDED_LOCAL_SEARCH 
LocalSearchMetaheuristic_Value_SIMULATED_ANNEALING 
LocalSearchMetaheuristic_Value_TABU_SEARCH 
LocalSearchMetaheuristic_Value_GENERIC_TABU_SEARCH 
LocalSearchMetaheuristic_Value_LocalSearchMetaheuristic_Value_INT_MIN_SENTINEL_DO_NOT_USE_ 
LocalSearchMetaheuristic_Value_LocalSearchMetaheuristic_Value_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 144 of file routing_enums.pb.h.

◆ MPCallbackEvent

The current state of the solver when the callback is invoked.

For Gurobi, similar to the int 'where' in the Gurobi callback API. See http://www.gurobi.com/documentation/8.0/refman/callback_codes.html for details.

Enumerator
kUnknown 
kPolling 

For regaining control of the main thread in single threaded applications, not for interacting with the solver.

kPresolve 

The solver is currently running presolve.

kSimplex 

The solver is currently running the simplex method.

kMip 

The solver is in the MIP loop (called periodically before starting a new node). Useful to early termination.

kMipSolution 

Called every time a new MIP incumbent is found.

kMipNode 

Called once per pass of the cut loop inside each MIP node.

kBarrier 

Called in each iterate of IPM/barrier method.

kMessage 

The solver is about to log out a message, use this callback to capture it.

kMultiObj 

The solver is in multi-objective optimization.

Definition at line 34 of file linear_solver_callback.h.

◆ MPModelProto_Annotation_TargetType

Enumerator
MPModelProto_Annotation_TargetType_VARIABLE_DEFAULT 
MPModelProto_Annotation_TargetType_CONSTRAINT 
MPModelProto_Annotation_TargetType_GENERAL_CONSTRAINT 

Definition at line 214 of file linear_solver.pb.h.

◆ MPModelRequest_SolverType

Enumerator
MPModelRequest_SolverType_CLP_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_GLOP_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_GLPK_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_GUROBI_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_XPRESS_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_CPLEX_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_HIGHS_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_SCIP_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_GLPK_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_CBC_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_GUROBI_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_XPRESS_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_CPLEX_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_HIGHS_MIXED_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_BOP_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_SAT_INTEGER_PROGRAMMING 
MPModelRequest_SolverType_PDLP_LINEAR_PROGRAMMING 
MPModelRequest_SolverType_KNAPSACK_MIXED_INTEGER_PROGRAMMING 

Definition at line 281 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues

Enumerator
MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_UNSPECIFIED 
MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_DUAL 
MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_PRIMAL 
MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_BARRIER 

Definition at line 247 of file linear_solver.pb.h.

◆ MPSolverResponseStatus

Enumerator
MPSOLVER_OPTIMAL 
MPSOLVER_FEASIBLE 
MPSOLVER_INFEASIBLE 
MPSOLVER_UNBOUNDED 
MPSOLVER_ABNORMAL 
MPSOLVER_NOT_SOLVED 
MPSOLVER_MODEL_IS_VALID 
MPSOLVER_CANCELLED_BY_USER 
MPSOLVER_UNKNOWN_STATUS 
MPSOLVER_MODEL_INVALID 
MPSOLVER_MODEL_INVALID_SOLUTION_HINT 
MPSOLVER_MODEL_INVALID_SOLVER_PARAMETERS 
MPSOLVER_SOLVER_TYPE_UNAVAILABLE 
MPSOLVER_INCOMPATIBLE_OPTIONS 

Definition at line 324 of file linear_solver.pb.h.

◆ MPSosConstraint_Type

Enumerator
MPSosConstraint_Type_SOS1_DEFAULT 
MPSosConstraint_Type_SOS2 

Definition at line 182 of file linear_solver.pb.h.

◆ OptionalBoolean

Enumerator
BOOL_UNSPECIFIED 
BOOL_FALSE 
BOOL_TRUE 
OptionalBoolean_INT_MIN_SENTINEL_DO_NOT_USE_ 
OptionalBoolean_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 66 of file optional_boolean.pb.h.

◆ PerturbationStrategy_Value

Enumerator
PerturbationStrategy_Value_UNSET 
PerturbationStrategy_Value_RUIN_AND_RECREATE 
PerturbationStrategy_Value_PerturbationStrategy_Value_INT_MIN_SENTINEL_DO_NOT_USE_ 
PerturbationStrategy_Value_PerturbationStrategy_Value_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 168 of file routing_ils.pb.h.

◆ ProtoWriteFormat

Specifies how the proto should be formatted when writing it to a file. kCanonicalJson converts field names to lower camel-case.

Enumerator
kProtoText 
kProtoBinary 
kJson 
kCanonicalJson 

Definition at line 61 of file file_util.h.

◆ RoundingLockDirection

Advanced use only. Indicates that if a variable moves in this direction, it can cause a constraint violation. kBoth is the safest option and always valid, but it is the least flexible for SCIP.

Enumerator
kUp 
kDown 
kBoth 

Definition at line 109 of file gscip_constraint_handler.h.

◆ RoutingSearchParameters_InsertionSortingProperty

Enumerator
RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_UNSPECIFIED 
RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_ALLOWED_VEHICLES 
RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_PENALTY 
RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_PENALTY_OVER_ALLOWED_VEHICLES_RATIO 
RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_HIGHEST_AVG_ARC_COST_TO_VEHICLE_START_ENDS 
RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_LOWEST_AVG_ARC_COST_TO_VEHICLE_START_ENDS 
RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_LOWEST_MIN_ARC_COST_TO_VEHICLE_START_ENDS 
RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_HIGHEST_DIMENSION_USAGE 
RoutingSearchParameters_InsertionSortingProperty_SORTING_PROPERTY_RANDOM 
RoutingSearchParameters_InsertionSortingProperty_RoutingSearchParameters_InsertionSortingProperty_INT_MIN_SENTINEL_DO_NOT_USE_ 
RoutingSearchParameters_InsertionSortingProperty_RoutingSearchParameters_InsertionSortingProperty_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 139 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_PairInsertionStrategy

Enumerator
RoutingSearchParameters_PairInsertionStrategy_AUTOMATIC 
RoutingSearchParameters_PairInsertionStrategy_BEST_PICKUP_THEN_BEST_DELIVERY 
RoutingSearchParameters_PairInsertionStrategy_BEST_PICKUP_DELIVERY_PAIR 
RoutingSearchParameters_PairInsertionStrategy_BEST_PICKUP_DELIVERY_PAIR_MULTITOUR 
RoutingSearchParameters_PairInsertionStrategy_RoutingSearchParameters_PairInsertionStrategy_INT_MIN_SENTINEL_DO_NOT_USE_ 
RoutingSearchParameters_PairInsertionStrategy_RoutingSearchParameters_PairInsertionStrategy_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 101 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_SchedulingSolver

Enumerator
RoutingSearchParameters_SchedulingSolver_SCHEDULING_UNSET 
RoutingSearchParameters_SchedulingSolver_SCHEDULING_GLOP 
RoutingSearchParameters_SchedulingSolver_SCHEDULING_CP_SAT 
RoutingSearchParameters_SchedulingSolver_RoutingSearchParameters_SchedulingSolver_INT_MIN_SENTINEL_DO_NOT_USE_ 
RoutingSearchParameters_SchedulingSolver_RoutingSearchParameters_SchedulingSolver_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 182 of file routing_parameters.pb.h.

◆ RoutingSearchStatus_Value

Enumerator
RoutingSearchStatus_Value_ROUTING_NOT_SOLVED 
RoutingSearchStatus_Value_ROUTING_SUCCESS 
RoutingSearchStatus_Value_ROUTING_PARTIAL_SUCCESS_LOCAL_OPTIMUM_NOT_REACHED 
RoutingSearchStatus_Value_ROUTING_FAIL 
RoutingSearchStatus_Value_ROUTING_FAIL_TIMEOUT 
RoutingSearchStatus_Value_ROUTING_INVALID 
RoutingSearchStatus_Value_ROUTING_INFEASIBLE 
RoutingSearchStatus_Value_ROUTING_OPTIMAL 
RoutingSearchStatus_Value_RoutingSearchStatus_Value_INT_MIN_SENTINEL_DO_NOT_USE_ 
RoutingSearchStatus_Value_RoutingSearchStatus_Value_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 185 of file routing_enums.pb.h.

◆ RuinCompositionStrategy_Value

Enumerator
RuinCompositionStrategy_Value_UNSET 
RuinCompositionStrategy_Value_RUN_ALL_SEQUENTIALLY 
RuinCompositionStrategy_Value_RUN_ALL_RANDOMLY 
RuinCompositionStrategy_Value_RUN_ONE_RANDOMLY 
RuinCompositionStrategy_Value_RuinCompositionStrategy_Value_INT_MIN_SENTINEL_DO_NOT_USE_ 
RuinCompositionStrategy_Value_RuinCompositionStrategy_Value_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 130 of file routing_ils.pb.h.

◆ ScipSeparationResult

Enumerator
kLazyConstraintAdded 
kCuttingPlaneAdded 
kDidNotFind 

Definition at line 95 of file scip_callback.cc.

◆ SetCoverMipSolver

enum class operations_research::SetCoverMipSolver : int
strong
Enumerator
SCIP 
SAT 
GUROBI 
GLOP 
PDLP 

Definition at line 25 of file set_cover_mip.h.

◆ SetCoverSolutionResponse_Status

Enumerator
SetCoverSolutionResponse_Status_UNDEFINED 
SetCoverSolutionResponse_Status_OPTIMAL 
SetCoverSolutionResponse_Status_FEASIBLE 
SetCoverSolutionResponse_Status_INFEASIBLE 
SetCoverSolutionResponse_Status_INVALID 
SetCoverSolutionResponse_Status_SetCoverSolutionResponse_Status_INT_MIN_SENTINEL_DO_NOT_USE_ 
SetCoverSolutionResponse_Status_SetCoverSolutionResponse_Status_INT_MAX_SENTINEL_DO_NOT_USE_ 

Definition at line 82 of file set_cover.pb.h.

◆ VarTypes

This enum is used internally to do dynamic typing on subclasses of integer variables.

Enumerator
UNSPECIFIED 
DOMAIN_INT_VAR 
BOOLEAN_VAR 
CONST_VAR 
VAR_ADD_CST 
VAR_TIMES_CST 
CST_SUB_VAR 
OPP_VAR 
TRACE_VAR 

Definition at line 131 of file constraint_solveri.h.

Function Documentation

◆ AbslHashValue() [1/2]

template<typename StrongIndexName, typename H>
H operations_research::AbslHashValue ( H h,
const StrongIndex< StrongIndexName > & i )

– ABSL HASHING SUPPORT --------------------------------------------------—

Definition at line 339 of file strong_integers.h.

◆ AbslHashValue() [2/2]

template<typename StrongIntegerName, typename H>
H operations_research::AbslHashValue ( H h,
const StrongInt64< StrongIntegerName > & i )

Definition at line 344 of file strong_integers.h.

◆ AbslParseFlag()

bool operations_research::AbslParseFlag ( const absl::string_view text,
MPSolver::OptimizationProblemType * solver_type,
std::string * error )

Definition at line 639 of file linear_solver.cc.

◆ AbslStringify() [1/2]

template<typename Sink, typename... T>
void operations_research::AbslStringify ( Sink & sink,
StrongIndex< T... > arg )

Definition at line 257 of file strong_integers.h.

◆ AbslStringify() [2/2]

template<typename Sink, typename... T>
void operations_research::AbslStringify ( Sink & sink,
StrongInt64< T... > arg )

Definition at line 268 of file strong_integers.h.

◆ AbslUnparseFlag()

std::string operations_research::AbslUnparseFlag ( MPSolver::OptimizationProblemType solver_type)
inline

Definition at line 1014 of file linear_solver.h.

◆ AcceptanceStrategy_Value_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::AcceptanceStrategy_Value_descriptor ( )

Definition at line 498 of file routing_ils.pb.cc.

◆ AcceptanceStrategy_Value_IsValid()

bool operations_research::AcceptanceStrategy_Value_IsValid ( int value)
inline

Definition at line 256 of file routing_ils.pb.h.

◆ AcceptanceStrategy_Value_Name() [1/2]

template<>
const ::std::string & operations_research::AcceptanceStrategy_Value_Name ( AcceptanceStrategy_Value value)
inline

Definition at line 269 of file routing_ils.pb.h.

◆ AcceptanceStrategy_Value_Name() [2/2]

template<typename T>
const ::std::string & operations_research::AcceptanceStrategy_Value_Name ( T value)

Definition at line 262 of file routing_ils.pb.h.

◆ AcceptanceStrategy_Value_Parse()

bool operations_research::AcceptanceStrategy_Value_Parse ( ::absl::string_view name,
AcceptanceStrategy_Value *PROTOBUF_NONNULL value )
inline

Definition at line 273 of file routing_ils.pb.h.

◆ AcceptDelta()

bool operations_research::AcceptDelta ( Search * search,
Assignment * delta,
Assignment * deltadelta )

Returns true if the search accepts the delta (actually checking this by calling AcceptDelta on the monitors of the search).

Definition at line 1380 of file constraint_solver.cc.

◆ AcceptNeighbor()

void operations_research::AcceptNeighbor ( Search * search)

Notifies the search that a neighbor has been accepted by local search.

Definition at line 1384 of file constraint_solver.cc.

◆ AcceptUncheckedNeighbor()

void operations_research::AcceptUncheckedNeighbor ( Search * search)

Definition at line 1386 of file constraint_solver.cc.

◆ AddCallbackConstraint()

template<typename ConstraintData>
void operations_research::AddCallbackConstraint ( SCIP * scip,
ScipConstraintHandler< ConstraintData > * handler,
const std::string & constraint_name,
const ConstraintData * constraint_data,
const ScipCallbackConstraintOptions & options )

constraint_data is not owned but held.

Definition at line 261 of file scip_callback.h.

◆ AddHadOverflow()

bool operations_research::AddHadOverflow ( int64_t x,
int64_t y,
int64_t sum )
inline

Helper function that returns true if an overflow has occurred in computing sum = x + y. sum is expected to be computed elsewhere.

Overflow cannot occur if operands have different signs. It can only occur if sign(x) == sign(y) and sign(sum) != sign(x), which is equivalent to: sign(x) != sign(sum) && sign(y) != sign(sum). This is captured when the expression below is negative.

Definition at line 98 of file saturated_arithmetic.h.

◆ addhint()

void operations_research::addhint ( const XPRSprob & mLp,
int length,
const double solval[],
const int colind[] )

The OR-Tools API does not allow setting a name for the solution passing NULL to XPRESS will have it generate a unique ID for the solution

Definition at line 192 of file xpress_interface.cc.

◆ AddIntoOverflow()

bool operations_research::AddIntoOverflow ( int64_t x,
int64_t * y )
inline

This avoid the need to convert to int64_t min/max and is about twice as fast if it corresponds to your use case.

Definition at line 304 of file saturated_arithmetic.h.

◆ AddOverflows()

bool operations_research::AddOverflows ( int64_t x,
int64_t y )
inline

A note on overflow treatment. kint64min and kint64max are treated as infinity. Thus if the computation overflows, the result is always kint64m(ax/in).

Note(user): this is actually wrong: when computing A-B, if A is kint64max and B is finite, then A-B won't be kint64max: overflows aren't sticky.

Todo
(user): consider making some operations overflow-sticky, some others not, but make an explicit choice throughout.

Definition at line 122 of file saturated_arithmetic.h.

◆ AlignDown()

template<size_t alignment_bytes, typename Value>
Value * operations_research::AlignDown ( Value * ptr)
inline

Returns the nearest smaller or equal address that is a multiple of alignment_bytes. When ptr is already aligned to alignment_bytes, returns it unchanged

Definition at line 56 of file aligned_memory.h.

◆ AlignedVectorSum()

float operations_research::AlignedVectorSum ( absl::Span< const float > values)
inline

Computes the sum of values, assuming that the first element of values is aligned to 16 bytes.

Definition at line 32 of file vector_sum.h.

◆ AlignUp()

template<size_t alignment_bytes, typename Value>
Value * operations_research::AlignUp ( Value * ptr)
inline

Functions for working with pointers and rounding them up and down to a given alignment. Returns the nearest greater or equal address that is a multiple of alignment_bytes. When ptr is already aligned to alignment_bytes, returns it unchanged.

Definition at line 45 of file aligned_memory.h.

◆ AppendDimensionCumulFilters()

void operations_research::AppendDimensionCumulFilters ( const std::vector< RoutingDimension * > & dimensions,
const RoutingSearchParameters & parameters,
bool filter_objective_cost,
bool use_chain_cumul_filter,
std::vector< LocalSearchFilterManager::FilterEvent > * filters )

Filter priority depth increases with complexity of filtering.

  • Dimensions without any cumul-related costs or constraints will have a ChainCumulFilter, lowest priority depth.
  • Dimensions with cumul costs or constraints, but no global span cost and/or precedences will have a PathCumulFilter.
  • Dimensions with a global span cost coefficient and/or precedences will have a global LP filter.
Note
We always add the [Chain|Path]CumulFilter to filter each route's feasibility separately to try and cut bad decisions earlier in the search, but we don't propagate the computed cost if the LPCumulFilter is already doing it.

Definition at line 2349 of file routing_filters.cc.

◆ AppendLightWeightDimensionFilters()

void operations_research::AppendLightWeightDimensionFilters ( const PathState * path_state,
const std::vector< RoutingDimension * > & dimensions,
std::vector< LocalSearchFilterManager::FilterEvent > * filters )

Appends dimension-based filters to the given list of filters using a path state.

For every dimension that fits, add a DimensionChecker. Add a DimensionChecker for every dimension.

Fill path capacities and classes.

For each class, retrieve the demands of each node. Dimension store evaluators with a double indirection for compacity: vehicle -> vehicle_class -> evaluator_index. We replicate this in DimensionChecker, except we expand evaluator_index to an array of values for all nodes.

Fill node capacities.

Make the dimension checker and pass ownership to the filter.

Definition at line 2276 of file routing_filters.cc.

◆ AppendTasksFromIntervals()

void operations_research::AppendTasksFromIntervals ( const std::vector< IntervalVar * > & intervals,
DisjunctivePropagator::Tasks * tasks )

Definition at line 695 of file routing_breaks.cc.

◆ AppendTasksFromPath()

void operations_research::AppendTasksFromPath ( absl::Span< const int64_t > path,
const TravelBounds & travel_bounds,
const RoutingDimension & dimension,
DisjunctivePropagator::Tasks * tasks )

Add task associated to visit i. Visits start at Cumul(path[i]) - before_visit and end at Cumul(path[i]) + after_visit

Tasks from travels. A travel task starts at Cumul(path[i]) + pre_travel, last for FixedTransitVar(path[i]) - pre_travel - post_travel, and must end at the latest at Cumul(path[i+1]) - post_travel.

Definition at line 611 of file routing_breaks.cc.

◆ ApplyMipPresolveSteps()

glop::ProblemStatus operations_research::ApplyMipPresolveSteps ( const glop::GlopParameters & glop_params,
MPModelProto * model,
std::vector< std::unique_ptr< glop::Preprocessor > > * for_postsolve,
SolverLogger * logger )

Applies presolve steps to improve the MIP -> IP imperfect conversion. The stricter the domain of the variables, the more room we have for scaling the constraint to integers and prevent overflow. Similarly if we can remove singleton continuous variables, it is just good to do so.

Returns the presolve status which can currently be:

  • INIT for most cases were nothing was proven during this step.
  • PRIMAL_INFEASIBLE if the model was proven infeasible.
  • INFEASIBLE_OR_UNBOUNDED if the presolve couldn't distinguish between these two statuses.
  • ABNORMAL if an error occurred.
Todo
(user): General constraints are currently not supported.

We need to copy the hint because LinearProgramToMPModelProto() loose it.

Todo
(user): Remove this back and forth conversion. We could convert the LinearProgram directly to a CpModelProto, or we could have a custom implementation of these presolve steps.

These presolve might change the problem size.

Todo
(user): transform the hint instead of disabling presolve.
Todo
(user): Usually it is good to run the ImpliedFreePreprocessor before this one. However this seems to cause problem on atm20-100.mps. Moreover, for the conversion, it is better to have tight bounds even if the bound propagator is supposed to undo what this presolve would have done.

Finally, we make sure all domains contain zero.

Restore the hint, note that none of the presolve steps we run here change the number of variables in the model.

Definition at line 36 of file sat_solver_utils.cc.

◆ ApplyVerifiedMPModelDelta()

void operations_research::ApplyVerifiedMPModelDelta ( const MPModelDeltaProto & delta,
MPModelProto * model )

Applies the given model_delta to "model". Assumes that FindErrorInMPModelDeltaProto() found no error. For full error checking, please use ExtractValidMPModelOrPopulateResponseStatus() instead.

Apply the delta to the variables: first, resize the variable array.

Then, apply the variable overrides.

Apply the delta to the constraints: first, resize the constraint array.

Then, apply the constraint overrides.

Fast path for added constraints.

Special case: the override is neutralized.

Otherwise we have to apply the term overrides. We can't do that in less than O(baseline + override_ct) because the baseline doesn't have a lookup-friendly data structure. But we still try to do it as efficiently as possible. In particular, we only use O(override_ct) extra memory.

Add the term overrides which haven't been used: those are added terms.

Definition at line 983 of file model_validator.cc.

◆ AreAllBooleans()

bool operations_research::AreAllBooleans ( const std::vector< IntVar * > & vars)
inline

Definition at line 4310 of file constraint_solveri.h.

◆ AreAllBound()

bool operations_research::AreAllBound ( const std::vector< IntVar * > & vars)
inline

Definition at line 4301 of file constraint_solveri.h.

◆ AreAllBoundOrNull()

template<class T>
bool operations_research::AreAllBoundOrNull ( const std::vector< IntVar * > & vars,
const std::vector< T > & values )

Returns true if all the variables are assigned to a single value, or if their corresponding value is null.

Definition at line 4317 of file constraint_solveri.h.

◆ AreAllBoundTo()

bool operations_research::AreAllBoundTo ( const std::vector< IntVar * > & vars,
int64_t value )
inline

Returns true if all variables are assigned to 'value'.

Definition at line 4328 of file constraint_solveri.h.

◆ AreAllGreaterOrEqual()

template<class T>
bool operations_research::AreAllGreaterOrEqual ( const std::vector< T > & values,
const T & value )

Definition at line 4231 of file constraint_solveri.h.

◆ AreAllLessOrEqual()

template<class T>
bool operations_research::AreAllLessOrEqual ( const std::vector< T > & values,
const T & value )

Definition at line 4241 of file constraint_solveri.h.

◆ AreAllNegative()

template<class T>
bool operations_research::AreAllNegative ( const std::vector< T > & values)

Definition at line 4256 of file constraint_solveri.h.

◆ AreAllNull()

template<class T>
bool operations_research::AreAllNull ( const std::vector< T > & values)

Definition at line 4226 of file constraint_solveri.h.

◆ AreAllOnes()

template<class T>
bool operations_research::AreAllOnes ( const std::vector< T > & values)

Definition at line 4221 of file constraint_solveri.h.

◆ AreAllPositive()

template<class T>
bool operations_research::AreAllPositive ( const std::vector< T > & values)

Definition at line 4251 of file constraint_solveri.h.

◆ AreAllStrictlyNegative()

template<class T>
bool operations_research::AreAllStrictlyNegative ( const std::vector< T > & values)

Definition at line 4266 of file constraint_solveri.h.

◆ AreAllStrictlyPositive()

template<class T>
bool operations_research::AreAllStrictlyPositive ( const std::vector< T > & values)

Definition at line 4261 of file constraint_solveri.h.

◆ AreWithinAbsoluteOrRelativeTolerances()

template<typename FloatType>
bool operations_research::AreWithinAbsoluteOrRelativeTolerances ( FloatType x,
FloatType y,
FloatType relative_tolerance,
FloatType absolute_tolerance )

Tests whether x and y are close to one another using absolute and relative tolerances. Returns true if |x - y| <= a (with a being the absolute_tolerance). The above case is useful for values that are close to zero. Returns true if |x - y| <= max(x, y) * r. (with r being the relative tolerance.) The cases for infinities are treated separately to avoid generating NaNs.

Definition at line 131 of file fp_utils.h.

◆ AreWithinAbsoluteTolerance()

template<typename FloatType>
bool operations_research::AreWithinAbsoluteTolerance ( FloatType x,
FloatType y,
FloatType absolute_tolerance )

Tests whether x and y are close to one another using an absolute tolerance. Returns true if |x - y| <= a (with a being the absolute_tolerance). The cases for infinities are treated separately to avoid generating NaNs.

Definition at line 152 of file fp_utils.h.

◆ assign()

Select next search node to expand Select next item_i to operations_research::assign ( using primary propagator)
new

The following code defines needed classes for the KnapsackGenericSolver class which is the entry point to extend knapsack with new constraints such as conflicts between items.

Constraints are enforced using KnapsackPropagator objects, in the current code there is one propagator per dimension (KnapsackCapacityPropagator). One of those propagators, named primary propagator, is used to guide the search, i.e. decides which item should be assigned next. Roughly speaking the search algorithm is:

  • While not optimal

◆ AtMinOrMaxInt64()

bool operations_research::AtMinOrMaxInt64 ( int64_t x)
inline

Checks if x is equal to the min or the max value of an int64_t.

Definition at line 53 of file saturated_arithmetic.h.

◆ atoi32()

int32_t operations_research::atoi32 ( absl::string_view word)
inline

Convenience versions of the above that take a string argument.

Definition at line 56 of file strtoint.h.

◆ atoi64()

int64_t operations_research::atoi64 ( absl::string_view word)
inline

Definition at line 57 of file strtoint.h.

◆ AutomaticFirstSolutionStrategy()

operations_research::FirstSolutionStrategy::Value operations_research::AutomaticFirstSolutionStrategy ( bool has_pickup_deliveries,
bool has_node_precedences,
bool has_single_vehicle_node )
  • Models with pickup/deliveries or node precedences are best handled by PARALLEL_CHEAPEST_INSERTION.
  • As of January 2018, models with single nodes and at least one node with only one allowed vehicle are better solved by PATH_MOST_CONSTRAINED_ARC.
  • In all other cases, PATH_CHEAPEST_ARC is used.
    Todo
    (user): Make this smarter.

Returns the best value for the automatic first solution strategy, based on the given model parameters.

Definition at line 371 of file routing_search.cc.

◆ BasisStatusString()

std::string operations_research::BasisStatusString ( const int stat)

Formats a linear constraint or variable basis status (GLP_BS,...).

Definition at line 50 of file glpk_formatters.cc.

◆ begin()

ClosedInterval::Iterator operations_research::begin ( ClosedInterval interval)
inline

begin()/end() are required for iteration over ClosedInterval in a range for loop.

Definition at line 732 of file sorted_interval_list.h.

◆ Benchmarks()

void operations_research::Benchmarks ( )

Definition at line 536 of file set_cover_solve.cc.

◆ BenchmarksTable()

std::vector< BenchmarksTableRow > operations_research::BenchmarksTable ( )

This creates a vector of tuples, where each tuple contains the directory name, the vector of files and the file format. It is assumed that the scp* files are in BENCHMARKS_DIR/scp-orlib, the rail files are in BENCHMARKS_DIR/scp-rail, etc., with BENCHMARKS_DIR being the directory specified by the –benchmarks_dir flag. Use a macro to be able to compute the size of the array at compile time.

Definition at line 495 of file set_cover_solve.cc.

◆ BinarySearch()

template<class Point, bool check_bounds = DEBUG_MODE>
Point operations_research::BinarySearch ( Point x_true,
Point x_false,
std::function< bool(Point)> f )

Finds a point in [x_true, x_false) where f changes from true to false. If check_bounds is true, it will CHECK that f(x_true) = true and f(x_false) = false.

EXAMPLE: ///< Finds the value x in [0,Pi/2] such that cos(x)=2sin(x): BinarySearch<double>(/*x_true=*‍/0.0, /*x_false=*‍/M_PI/2, [](double x) { return cos(x) >= 2*sin(x); });

MONOTONIC FUNCTIONS: Suppose f is a monotonic boolean function. See below for the NON-MONOTONIC case.

If x_true < x_false, this returns X such that:

  • x_true < X < x_false,
  • f((x_true, X]) = true (i.e. for all x in (x_true, X], f(x) = true),
  • f((X, x_false)) = false (i.e. for all x in (X, x_false), f(x) = false) or this returns x_true if such an X does not exist.

If x_true > x_false, this function returns X such that:

  • x_false < X < x_true
  • f((x_false, X)) = false
  • f([X, x_true)) = true or this return x_true if such an X does not exist.

Also note that 'Point' may be floating-point types: the function will still converge when the midpoint can't be distinguished from one of the limits, which will always happen. You can use other types than numerical types, too. absl::Duration is naturally supported.

OVERFLOWS and NON-NUMERICAL TYPES: If your points may be subject to overflow (e.g. ((kint32max-1) + (kint32max))/2 will overflow an int32_t), or they don't support doing (x+y)/2, you can specialize BinarySearchMidpoint() to suit your needs. See the examples in the unit test.

NON-MONOTONIC FUNCTIONS: If f isn't monotonic, the binary search will still run with it typical complexity, and finish. The Point X that it returns will be a "local" inflexion point, meaning that the smallest possible move of that point X to a point X' (in the x_true->x_false direction deduced from the arguments) would make f(X') return false. EXAMPLES:

  • If Point=int32_t, then the returned X verifies f(X) = true and f(X') = false with X' = X + (x_true < x_false ? 1 : -1).
  • If Point=double, ditto with X' = X * (1 + (x_true < x_false ? ε : -ε)), where ε = std::numeric_limits<double>::epsilon().

Note also that even if f() is non-deterministic, i.e. f(X) can sometimes return true and sometimes false for the same X, then the binary search will still finish, but it's hard to say anything about the returned X.

NOTE(user): If your "Point" type doesn't support the + or the /2 operations, we could imagine using the same trick as IsNanGeneric() to make BinarySearch() work for your use case.

Definition at line 219 of file binary_search.h.

◆ BinarySearchMidpoint()

template<class Point>
Point operations_research::BinarySearchMidpoint ( Point x,
Point y )

Used by BinarySearch(). This is just (x+y)/2, with some DCHECKs to catch overflows. You should override (i.e. specialize) it if you risk getting overflows or need something more complicated than (x+y)/2. See examples in the unit test.

For integers using two's complement (all compilers in practice up to c++17, and all compilers in theory starting from c++20), we can use a trick from Hacker's delight. See e.g. https://lemire.me/blog/2022/12/06/fast-midpoint-between-two-integers-without-overflow/

For integers of the same sign, avoid overflows with a simple trick.

Definition at line 188 of file binary_search.h.

◆ BipartiteMinimumVertexCover()

std::vector< bool > operations_research::BipartiteMinimumVertexCover ( const std::vector< std::vector< int > > & left_to_right_arcs,
int num_right )

This method computes a minimum vertex cover for the bipartite graph.

If we define num_left=left_to_right_arcs.size(), the "left" nodes are integers in [0, num_left), and the "right" nodes are integers in [num_left, num_left + num_right).

Returns a vector of size num_left+num_right, such that element #l is true if it is part of the minimum vertex cover and false if it is part of the maximum independent set (one is the complement of the other).

This algorithm first uses the maximum flow to find a maximum matching. Then it uses the same method outlined in the proof of Konig's theorem to transform the maximum matching into a minimum vertex cover.

More concretely, it uses a DFS starting with unmatched nodes and alternating matched/unmatched edges to find a minimum vertex cover.

We do a DFS starting with unmatched nodes and alternating matched/unmatched edges.

Definition at line 23 of file minimum_vertex_cover.cc.

◆ BitCount32()

uint32_t operations_research::BitCount32 ( uint32_t n)
inline

Definition at line 56 of file bitset.h.

◆ BitCount64()

uint64_t operations_research::BitCount64 ( uint64_t n)
inline

Returns the number of bits set in n.

Definition at line 45 of file bitset.h.

◆ BitCountRange32()

uint32_t operations_research::BitCountRange32 ( const uint32_t * bitset,
uint32_t start,
uint32_t end )

◆ BitCountRange64()

uint64_t operations_research::BitCountRange64 ( const uint64_t * bitset,
uint64_t start,
uint64_t end )

Returns the number of bits set in bitset between positions start and end.

◆ BitLength32()

uint32_t operations_research::BitLength32 ( uint32_t size)
inline

Definition at line 342 of file bitset.h.

◆ BitLength64()

uint64_t operations_research::BitLength64 ( uint64_t size)
inline

Returns the number of words needed to store size bits.

Definition at line 341 of file bitset.h.

◆ BitOffset32()

uint32_t operations_research::BitOffset32 ( uint32_t pos)
inline

Definition at line 338 of file bitset.h.

◆ BitOffset64()

uint64_t operations_research::BitOffset64 ( uint64_t pos)
inline

Returns the word number corresponding to bit number pos.

Definition at line 337 of file bitset.h.

◆ BitPos32()

uint32_t operations_research::BitPos32 ( uint32_t pos)
inline

Definition at line 334 of file bitset.h.

◆ BitPos64()

uint32_t operations_research::BitPos64 ( uint64_t pos)
inline

Bit operators used to manipulates bitsets.

--— Bitset operators --— Bitset: array of uint32_t/uint64_t words Returns the bit number in the word computed by BitOffsetXX, corresponding to the bit at position pos in the bitset.

Note
'& 63' is faster than '% 64'
Todo
(user): rename BitPos and BitOffset to something more understandable.

Definition at line 333 of file bitset.h.

◆ BitShift32()

uint32_t operations_research::BitShift32 ( uint32_t v)
inline

Definition at line 346 of file bitset.h.

◆ BitShift64()

uint64_t operations_research::BitShift64 ( uint64_t v)
inline

Returns the bit number in the bitset of the first bit of word number v.

Definition at line 345 of file bitset.h.

◆ BuildBopInterface()

MPSolverInterface * operations_research::BuildBopInterface ( MPSolver *const solver)

Register BOP in the global linear solver factory.

--— Solver --—

Definition at line 391 of file bop_interface.cc.

◆ BuildCBCInterface()

MPSolverInterface * operations_research::BuildCBCInterface ( MPSolver *const solver)

Definition at line 533 of file cbc_interface.cc.

◆ BuildCLPInterface()

MPSolverInterface * operations_research::BuildCLPInterface ( MPSolver *const solver)

Definition at line 625 of file clp_interface.cc.

◆ BuildCplexInterface()

MPSolverInterface * operations_research::BuildCplexInterface ( bool mip,
MPSolver *const solver )

Definition at line 1286 of file cplex_interface.cc.

◆ BuildDemonProfiler()

DemonProfiler * operations_research::BuildDemonProfiler ( Solver * solver)
extern

Definition at line 445 of file demon_profiler.cc.

◆ BuildDurationExpr()

IntExpr * operations_research::BuildDurationExpr ( IntervalVar * var)

Definition at line 171 of file sched_expr.cc.

◆ BuildEndExpr()

IntExpr * operations_research::BuildEndExpr ( IntervalVar * var)

Definition at line 181 of file sched_expr.cc.

◆ BuildEulerianPath()

template<typename Graph>
std::vector< typename Graph::NodeIndex > operations_research::BuildEulerianPath ( const Graph & graph,
bool assume_connectivity = true )

Builds an Eulerian path/trail on an undirected graph. This function works only on Reverse graphs (cf. ortools/graph/graph.h). Returns an empty tour if a tour cannot be built.

Definition at line 141 of file eulerian_path.h.

◆ BuildEulerianPathFromNode()

template<typename NodeIndex, typename Graph>
std::vector< NodeIndex > operations_research::BuildEulerianPathFromNode ( const Graph & graph,
NodeIndex root )

Builds an Eulerian path/trail on an undirected graph starting from node root. Supposes the graph is connected and is eulerian or semi-eulerian. This is an implementation of Hierholzer's algorithm. If m is the number of edges in the graph and n the number of nodes, time and memory complexity is O(n + m).

Definition at line 78 of file eulerian_path.h.

◆ BuildEulerianTour()

template<typename Graph>
std::vector< typename Graph::NodeIndex > operations_research::BuildEulerianTour ( const Graph & graph,
bool assume_connectivity = true )

Same as above but without specifying a start/end root node (node 0 is taken as default root).

Definition at line 131 of file eulerian_path.h.

◆ BuildEulerianTourFromNode()

template<typename NodeIndex, typename Graph>
std::vector< NodeIndex > operations_research::BuildEulerianTourFromNode ( const Graph & graph,
NodeIndex root,
bool assume_connectivity = true )

Builds an Eulerian tour/circuit/cycle starting and ending at node root on an undirected graph. This function works only on Reverse graphs (cf. ortools/graph/graph.h). Returns an empty tour if either root is invalid or if a tour cannot be built.

Definition at line 119 of file eulerian_path.h.

◆ BuildGLOPInterface()

MPSolverInterface * operations_research::BuildGLOPInterface ( MPSolver *const solver)

Register GLOP in the global linear solver factory.

Definition at line 441 of file glop_interface.cc.

◆ BuildGLPKInterface()

MPSolverInterface * operations_research::BuildGLPKInterface ( bool mip,
MPSolver *const solver )

Definition at line 964 of file glpk_interface.cc.

◆ BuildGurobiInterface()

MPSolverInterface * operations_research::BuildGurobiInterface ( bool mip,
MPSolver *const solver )

Definition at line 1403 of file gurobi_interface.cc.

◆ BuildHighsInterface()

MPSolverInterface * operations_research::BuildHighsInterface ( bool mip,
MPSolver *const solver )

Register PDLP in the global linear solver factory.

Definition at line 293 of file highs_interface.cc.

◆ BuildKnapsackInterface()

MPSolverInterface * operations_research::BuildKnapsackInterface ( MPSolver *const solver)

Register Knapsack solver in the global linear solver factory.

Definition at line 362 of file knapsack_interface.cc.

◆ BuildKruskalMinimumSpanningTree()

template<typename Graph, typename ArcComparator>
std::vector< typename Graph::ArcIndex > operations_research::BuildKruskalMinimumSpanningTree ( const Graph & graph,
const ArcComparator & arc_comparator )

Version taking an arc comparator to sort graph arcs. Usage: ListGraph<int, int> graph(...); const auto arc_cost = [&graph](int arc) { return f(graph.Tail(arc), graph.Head(arc)); }; std::vector<int> mst = BuildKruskalMinimumSpanningTree( graph, [&arc_cost](int a, int b) { return arc_cost(a) < arc_cost(b); });

Definition at line 88 of file minimum_spanning_tree.h.

◆ BuildKruskalMinimumSpanningTreeFromSortedArcs()

template<typename Graph>
std::vector< typename Graph::ArcIndex > operations_research::BuildKruskalMinimumSpanningTreeFromSortedArcs ( const Graph & graph,
absl::Span< const typename Graph::ArcIndex > sorted_arcs )

Implementation of Kruskal's mininumum spanning tree algorithm (c.f. https://en.wikipedia.org/wiki/Kruskal%27s_algorithm). Returns the index of the arcs appearing in the tree; will return a forest if the graph is disconnected. Nodes without any arcs will be ignored. Each arc of the graph is interpreted as an undirected arc. Complexity of the algorithm is O(E * log(E)) where E is the number of arcs in the graph. Memory usage is O(E * log(E)).

Todo
(user): Add a global Minimum Spanning Tree API automatically switching between Prim and Kruskal depending on problem size.

Version taking sorted graph arcs. Allows somewhat incremental recomputation of minimum spanning trees as most of the processing time is spent sorting arcs. Usage: ListGraph<int, int> graph(...); std::vector<int> sorted_arcs = ...; std::vector<int> mst = BuildKruskalMinimumSpanningTreeFromSortedArcs( graph, sorted_arcs);

Definition at line 49 of file minimum_spanning_tree.h.

◆ BuildLineGraph()

template<typename GraphType>
bool operations_research::BuildLineGraph ( const GraphType & graph,
GraphType *const line_graph )

Builds a directed line graph for graph (see "directed line graph" in http://en.wikipedia.org/wiki/Line_graph). Arcs of the original graph become nodes and the new graph contains only nodes created from arcs in the original graph (we use the notation (a->b) for these new nodes); the index of the node (a->b) in the new graph is exactly the same as the index of the arc a->b in the original graph. An arc from node (a->b) to node (c->d) in the new graph is added if and only if b == c in the original graph. This method expects that line_graph is an empty graph (it has no nodes and no arcs). Returns false on an error.

Sizing then filling.

Definition at line 33 of file line_graph.h.

◆ BuildLocalSearchMonitorPrimary()

LocalSearchMonitor * operations_research::BuildLocalSearchMonitorPrimary ( Solver * s)
extern

Definition at line 3228 of file constraint_solver.cc.

◆ BuildLocalSearchProfiler()

LocalSearchProfiler * operations_research::BuildLocalSearchProfiler ( Solver * solver)
extern

Definition at line 3749 of file local_search.cc.

◆ BuildModelCache()

ModelCache * operations_research::BuildModelCache ( Solver * solver)
extern

Definition at line 846 of file model_cache.cc.

◆ BuildPdlpInterface()

MPSolverInterface * operations_research::BuildPdlpInterface ( MPSolver *const solver)
extern

Register PDLP in the global linear solver factory.

Definition at line 314 of file pdlp_interface.cc.

◆ BuildPrimMinimumSpanningTree()

template<typename Graph, typename ArcValue>
std::vector< typename Graph::ArcIndex > operations_research::BuildPrimMinimumSpanningTree ( const Graph & graph,
const ArcValue & arc_value )

Implementation of Prim's mininumum spanning tree algorithm (c.f. https://en.wikipedia.org/wiki/Prim's_algorithm) on undirected connected graphs. Returns the index of the arcs appearing in the tree. Complexity of the algorithm is O(E * log(V)) where E is the number of arcs in the graph, V is the number of vertices. Memory usage is O(V) + memory taken by the graph. Usage: ListGraph<int, int> graph(...); const auto arc_cost = [&graph](int arc) -> int64_t { return f(graph.Tail(arc), graph.Head(arc)); }; std::vector<int> mst = BuildPrimMinimumSpanningTree(graph, arc_cost);

This struct represents entries in the adjustable priority queue which maintains active nodes (not added to the tree yet) in decreasing insertion cost order. AdjustablePriorityQueue requires the existence of the SetHeapIndex and GetHeapIndex methods.

In the typical case, NodeIndex is 4 bytes, so having fields in this order is optimal in terms of memory usage and cache locality across all values of sizeof(ArcValueType).

Definition at line 114 of file minimum_spanning_tree.h.

◆ BuildPrintTrace()

PropagationMonitor * operations_research::BuildPrintTrace ( Solver * s)
extern

Definition at line 877 of file trace.cc.

◆ BuildSafeDurationExpr()

IntExpr * operations_research::BuildSafeDurationExpr ( IntervalVar * var,
int64_t unperformed_value )

Definition at line 196 of file sched_expr.cc.

◆ BuildSafeEndExpr()

IntExpr * operations_research::BuildSafeEndExpr ( IntervalVar * var,
int64_t unperformed_value )

Definition at line 201 of file sched_expr.cc.

◆ BuildSafeStartExpr()

IntExpr * operations_research::BuildSafeStartExpr ( IntervalVar * var,
int64_t unperformed_value )

Definition at line 191 of file sched_expr.cc.

◆ BuildSatInterface()

MPSolverInterface * operations_research::BuildSatInterface ( MPSolver *const solver)
extern

Register Sat in the global linear solver factory.

Definition at line 275 of file sat_interface.cc.

◆ BuildSCIPInterface()

MPSolverInterface * operations_research::BuildSCIPInterface ( MPSolver *const solver)
extern

Definition at line 1168 of file scip_interface.cc.

◆ BuildStartExpr()

IntExpr * operations_research::BuildStartExpr ( IntervalVar * var)

--— Expression builders ---—

--— API --—

Generic code for start/end/duration expressions. This is not done in a superclass as this is not compatible with the current class hierarchy.

Definition at line 161 of file sched_expr.cc.

◆ BuildTrace()

PropagationMonitor * operations_research::BuildTrace ( Solver * s)
extern

Definition at line 3152 of file constraint_solver.cc.

◆ BuildXpressInterface()

MPSolverInterface * operations_research::BuildXpressInterface ( bool mip,
MPSolver *const solver )
extern

Definition at line 2095 of file xpress_interface.cc.

◆ CapAbs()

int64_t operations_research::CapAbs ( int64_t v)
inline

Definition at line 61 of file saturated_arithmetic.h.

◆ CapAdd()

int64_t operations_research::CapAdd ( int64_t x,
int64_t y )
inline

Definition at line 292 of file saturated_arithmetic.h.

◆ CapAddGeneric()

int64_t operations_research::CapAddGeneric ( int64_t x,
int64_t y )
inline

The following implementations are here for GCC because it does not compiled the built-ins correctly. The code is either too long without branches or contains jumps. These implementations are probably optimal on x86_64. Simple implementations which use the built-ins provided by both GCC and clang. clang compiles to very good code for both x86_64 and ARM. This is the preferred implementation in general. Generic implementations. They are very good for addition and subtraction, less so for multiplication.

Definition at line 233 of file saturated_arithmetic.h.

◆ CapAddTo()

void operations_research::CapAddTo ( int64_t x,
int64_t * y )
inline

Definition at line 315 of file saturated_arithmetic.h.

◆ CapOpp()

int64_t operations_research::CapOpp ( int64_t v)
inline

Note(user): -kint64min != kint64max, but kint64max == ~kint64min.

Definition at line 59 of file saturated_arithmetic.h.

◆ CapOrFloatAdd()

template<typename T>
T operations_research::CapOrFloatAdd ( T x,
T y )

A generic, safer version of CapAdd() where we don't silently convert double or int32_t to int64_t. When the inputs are floating-point, uses '+', else uses CapAdd() for int64_t, and a (slow-ish) int32_t version for int.

Definition at line 347 of file saturated_arithmetic.h.

◆ CapProd()

int64_t operations_research::CapProd ( int64_t x,
int64_t y )
inline

Definition at line 332 of file saturated_arithmetic.h.

◆ CapProdGeneric()

int64_t operations_research::CapProdGeneric ( int64_t x,
int64_t y )
inline

The generic algorithm computes a bound on the number of bits necessary to store the result. For this it uses the position of the most significant bits of each of the arguments. If the result needs at least 64 bits, then return a capped value. If the result needs at most 63 bits, then return the product. Otherwise, the result may use 63 or 64 bits: compute the product as a uint64_t, and cap it if necessary.

Let MSB(x) denote the most significant bit of x. We have: MSB(x) + MSB(y) <= MSB(x * y) <= MSB(x) + MSB(y) + 1

Catch a == 0 or b == 0 now, as MostSignificantBitPosition64(0) == 0.

Todo
(user): avoid this by writing function Log2(a) with Log2(0) == -1.

The corner case is when msb_sum == 62, i.e. at least 63 bits will be needed to store the product. The following product will never overflow on uint64_t, since msb_sum == 62.

The overflow cases are captured by one of the following conditions: (cap >= 0 && u_prod >= static_cast<uint64_t>(kint64max) or (cap < 0 && u_prod >= static_cast<uint64_t>(kint64min)). These can be optimized as follows (and if the condition is false, it is safe to compute x * y.

Definition at line 258 of file saturated_arithmetic.h.

◆ CapSub()

int64_t operations_research::CapSub ( int64_t x,
int64_t y )
inline

Definition at line 317 of file saturated_arithmetic.h.

◆ CapSubFrom()

void operations_research::CapSubFrom ( int64_t amount,
int64_t * target )
inline

Updates *target with CapSub(*target, amount).

Definition at line 328 of file saturated_arithmetic.h.

◆ CapSubGeneric()

int64_t operations_research::CapSubGeneric ( int64_t x,
int64_t y )
inline

Definition at line 238 of file saturated_arithmetic.h.

◆ CapWithSignOf()

int64_t operations_research::CapWithSignOf ( int64_t x)
inline

Returns kint64max if x >= 0 and kint64min if x < 0.

return kint64max if x >= 0 or kint64max + 1 (== kint64min) if x < 0.

Definition at line 143 of file saturated_arithmetic.h.

◆ CeilRatio()

int64_t operations_research::CeilRatio ( int64_t value,
int64_t positive_coeff )
Todo
(user): Use MathUtil::CeilOfRatio / FloorOfRatio instead.

Definition at line 106 of file sorted_interval_list.cc.

◆ CheckNodeIsValid()

template<class GraphType>
void operations_research::CheckNodeIsValid ( typename GraphType::NodeIndex node,
const GraphType & graph )

Definition at line 282 of file dag_shortest_path.h.

◆ ChooseMode()

BaseAssignVariables::Mode operations_research::ChooseMode ( Solver::IntValueStrategy val_str)

Definition at line 2132 of file search.cc.

◆ CleanVariableOnFail()

void operations_research::CleanVariableOnFail ( IntVar * var)
extern

---------------— Queue class ---------------—

--— API --—

Definition at line 6388 of file expressions.cc.

◆ ClearBit32()

void operations_research::ClearBit32 ( uint32_t *const bitset,
uint32_t pos )
inline

Definition at line 368 of file bitset.h.

◆ ClearBit64()

void operations_research::ClearBit64 ( uint64_t *const bitset,
uint64_t pos )
inline

Sets the bit pos to false in bitset.

Definition at line 365 of file bitset.h.

◆ ClearMostCoveredElements() [1/2]

std::vector< SubsetIndex > operations_research::ClearMostCoveredElements ( absl::Span< const SubsetIndex > focus,
BaseInt max_num_subsets,
SetCoverInvariant * inv )

Same as above, but clears the subset indices in focus.

This is the vector we will return.

Collect the sets which have at least one element whose coverage > 1, even if those sets are not removable.

Now intersect with focus: sampled_subsets = focus ⋂ impacted_subsets. NOTE(user): this might take too long.

Todo
(user):find another algorithm if necessary.

Actually sample sampled_subset.

Todo
(user): find another algorithm if necessary.

Testing has shown that sorting sampled_subsets is not necessary. Now, un-select the subset in sampled_subsets.

Definition at line 870 of file set_cover_heuristics.cc.

◆ ClearMostCoveredElements() [2/2]

std::vector< SubsetIndex > operations_research::ClearMostCoveredElements ( BaseInt num_subsets,
SetCoverInvariant * inv )

The consistency level is maintained up to kCostAndCoverage.

Clears the variables (subsets) that cover the most covered elements. This is capped by num_subsets. If the cap is reached, the subsets are chosen randomly. Returns the list of the chosen subset indices. This indices can then be used ax a focus.

Definition at line 864 of file set_cover_heuristics.cc.

◆ ClearRandomSubsets() [1/2]

std::vector< SubsetIndex > operations_research::ClearRandomSubsets ( absl::Span< const SubsetIndex > focus,
BaseInt num_subsets_to_choose,
SetCoverInvariant * inv )

Same as above, but clears the subset indices in focus.

previous iteration.

connected_subset may have been deselected in a previous iteration.

Note
num_deselected may exceed num_subsets_to_choose by more than 1.

Definition at line 830 of file set_cover_heuristics.cc.

◆ ClearRandomSubsets() [2/2]

std::vector< SubsetIndex > operations_research::ClearRandomSubsets ( BaseInt num_subsets,
SetCoverInvariant * inv )

The consistency level is maintained up to kCostAndCoverage.

Randomly clears a proportion num_subsets variables in the solution. Returns a list of subset indices to be potentially reused as a focus. Randomly clears at least num_subsets variables in the solution. There can be more than num_subsets variables cleared because the intersecting subsets are also removed from the solution. Returns a list of subset indices that can be reused as a focus.

Definition at line 825 of file set_cover_heuristics.cc.

◆ CompareKnapsackItemWithEfficiencyInDecreasingEfficiencyOrder()

bool operations_research::CompareKnapsackItemWithEfficiencyInDecreasingEfficiencyOrder ( const KnapsackItemWithEfficiency & item1,
const KnapsackItemWithEfficiency & item2 )

Comparator used to sort item in decreasing efficiency order.

Definition at line 732 of file knapsack_solver.cc.

◆ ComputeBestVehicleToResourceAssignment()

int64_t operations_research::ComputeBestVehicleToResourceAssignment ( absl::Span< const int > vehicles,
const util_intops::StrongVector< RoutingModel::ResourceClassIndex, std::vector< int > > & resource_indices_per_class,
const util_intops::StrongVector< RoutingModel::ResourceClassIndex, absl::flat_hash_set< int > > & ignored_resources_per_class,
std::function< const std::vector< int64_t > *(int)> vehicle_to_resource_class_assignment_costs,
std::vector< int > * resource_indices )

Finds the approximate (*) min-cost (i.e. best) assignment of all vehicles v ∈ 'vehicles' to resources, i.e. indices in [0..num_resources), where the costs of assigning a vehicle v to a resource r of class r_c is given by 'vehicle_to_resource_class_assignment_costs(v)[r_c]', unless the latter is empty in which case vehicle v does not need a resource.

Returns the cost of that optimal assignment, or -1 if it's infeasible. Moreover, if 'resource_indices' != nullptr, it assumes that its size is the global number of vehicles, and assigns its element #v with the resource r assigned to v, or -1 if none.

(*) COST SCALING: When the costs are so large that they could possibly yield int64_t overflow, this method returns a lower bound of the actual optimal cost, and the assignment output in 'resource_indices' may be suboptimal if that lower bound isn't tight (but it should be very close).

COMPLEXITY: in practice, should be roughly O(num_resource_classes * vehicles.size() + resource_indices->size()).

When returning infeasible, 'resource_indices' must be cleared, so we do it here preemptively.

Collect vehicle_to_resource_class_assignment_costs(v) for all v ∈ vehicles. Then detect trivial infeasibility cases, before doing the min-cost-flow:

  • There are not enough resources overall.
  • There is no resource assignable to a vehicle that needs one.

Catch infeasibility cases where ComputeVehicleToResourceClassAssignmentCosts() hasn't "properly" initialized the vehicle to resource class assignment costs (this can happen for instance in the ResourceGroupAssignmentFilter when routes are synchronized with an impossible first solution).

We may need to apply some cost scaling when using SimpleMinCostFlow. With our graph it seems having 4 * max_arc_cost * num_nodes ≤ kint64max is sufficient. To do that, we first find the maximum arc cost.

To avoid potential int64_t overflows, we slightly tweak the above formula. NOTE(user): SimpleMinCostFlow always adds a sink and source node (we probably shouldn't add a sink/source node ourselves in the graph).

We use a power of 2 for the cost scaling factor, to have clean (in)accuracy properties. Note also that we must round down the costs.

Then, we create the SimpleMinCostFlow and run the assignment algorithm. NOTE(user): We often don't create as many arcs as outlined below, especially when num_vehicles_to_assign < vehicles.size(). But since we want to eventually make this whole function incremental, we prefer sticking with the whole 'vehicles' set.

Used to store the arc indices, if we need to later recover the solution.

Add a source → vehicle arc to the min-cost-flow graph.

Add vehicle → resource-class arcs to the min-cost-flow graph.

Add resource-class->sink arcs to the flow. The capacity on these arcs is the number of available resources for the corresponding class.

Set the flow supply.

Solve the min-cost flow and return its cost.

Fill the resource indices corresponding to the min-cost assignment.

No resource needed for this vehicle.

Definition at line 3010 of file routing_lp_scheduling.cc.

◆ ComputeDagConnectivity()

std::vector< Bitset64< int64_t > > operations_research::ComputeDagConnectivity ( absl::Span< const std::pair< int, int > > arcs,
bool * error_was_cyclic,
std::vector< int > * error_cycle_out )

The algorithm is as follows:

  1. Sort the nodes of the graph topologically. If a cycle is detected, terminate
  2. Build the adjacency list for the graph, i.e., adj_list[i] is the list of nodes that can be directly reached from i.
  3. Create a 2d bool vector x where x[i][j] indicates there is a path from i to j, and for each arc in "arcs", set x[i][j] to true
  4. In reverse topological order (leaves first) for each node i, for each child j of i, for each node k reachable for j, set k to be reachable from i as well (x[i][k] = true for all k s.t. x[j][k] is true).

The running times of the steps are:

  1. O(num_arcs)
  2. O(num_arcs)
  3. O(num_nodes^2 + num_arcs)
  4. O(num_nodes*num_arcs) Thus the total run time is O(num_nodes^2 + num_nodes*num_arcs).

Implementation note: typically, step 4 will dominate. To speed up the inner loop, we use Bitset64, allowing use to merge 64 x[k][j] values at a time with the |= operator.

For graphs where num_arcs is o(num_nodes), a different data structure could be used in 3, but this isn't really the interesting case (and prevents |=).

A further improvement on this algorithm is possible, step four can run in time O(num_nodes*num_arcs_in_transitive_reduction), and as a by product, the transitive reduction can also be produced as output. For details, see "A REDUCT-AND_CLOSURE ALGORITHM FOR GRAPHS" (Alla Goralcikova and Vaclav Koubek 1979). The better typeset paper "AN IMPROVED ALGORITHM FOR TRANSITIVE CLOSURE ON ACYCLIC DIGRAPHS" (Klaus Simon 1988) gives a slight improvement on the result (less memory, same runtime).

Given a directed graph, as defined by the arc list "arcs", computes either:

  1. If the graph is acyclic, the matrix of values x, where x[i][j] indicates that there is a directed path from i to j.
  2. If the graph is cyclic, "error_cycle_out" is set to contain the cycle, and the return value is empty.

The algorithm runs in O(num_nodes^2 + num_nodes*num_arcs).

Inputs: arcs: each a in "arcs" is a directed edge from a.first to a.second. Must have a.first, a.second >= 0. The graph is assumed to have nodes {0,1,...,max_{a in arcs} max(a.first, a.second)}, or have no nodes if arcs is the empty list. error_was_cyclic: output arg, is set to true if a cycle is detected. error_cycle_out: output arg, if a cycle is detected, error_cycle_out is set to contain the nodes of the cycle in order.

Note
useful for computing the transitive closure of a binary relation, e.g. given the relation i < j for i,j in S that is transitive and some known values i < j, create a node for each i in S and an arc for each known relationship. Then any relationship implied by transitivity is given by the resulting matrix produced, or if the relation fails transitivity, a cycle proving this is produced.

Iterate over the nodes in reverse topological order.

NOTE(user): these two loops visit every arc in the graph, and each union is over a set of size given by the number of nodes. This gives the runtime in step 4 of O(num_nodes*num_arcs)

Definition at line 60 of file dag_connectivity.cc.

◆ ComputeDagConnectivityOrDie()

std::vector< Bitset64< int64_t > > operations_research::ComputeDagConnectivityOrDie ( absl::Span< const std::pair< int, int > > arcs)

Like above, but will CHECK fail if the digraph with arc list "arcs" contains a cycle.

Definition at line 111 of file dag_connectivity.cc.

◆ ComputeDeciles()

template<typename T>
std::vector< T > operations_research::ComputeDeciles ( std::vector< T > values)

Definition at line 660 of file set_cover_model.cc.

◆ ComputeFormVarLowerBound()

double operations_research::ComputeFormVarLowerBound ( glp_prob *const problem,
const int num_cstrs,
const int k )
inline

Returns the lower bound of the variable k of the computational form by calling either glp_get_row_lb() or glp_get_col_lb().

See ComputeFormVarStatus() for details about k.

Definition at line 118 of file glpk_computational_form.h.

◆ ComputeFormVarPrimalValue()

double operations_research::ComputeFormVarPrimalValue ( glp_prob *const problem,
const int num_cstrs,
const int k )
inline

Returns the primal value of the variable k of the computational form by calling either glp_get_row_prim() or glp_get_col_prim().

See ComputeFormVarStatus() for details about k.

Definition at line 108 of file glpk_computational_form.h.

◆ ComputeFormVarReducedCost()

double operations_research::ComputeFormVarReducedCost ( glp_prob *const problem,
const int num_cstrs,
const int k )
inline

Returns the reduced cost of the variable k of the computational form by calling either glp_get_row_dual() or glp_get_col_dual().

See ComputeFormVarStatus() for details about k.

Definition at line 98 of file glpk_computational_form.h.

◆ ComputeFormVarStatus()

int operations_research::ComputeFormVarStatus ( glp_prob *const problem,
const int num_cstrs,
const int k )
inline

Returns the status of the variable k of the computational form by calling either glp_get_row_stat() or glp_get_col_stat().

Here k is an index in the joint set of indices of variables and constraints in the computational form (see the comment at the top of this header for details):

  • 1 <= k <= num_cstrs: index of the k-th auxiliary variable in the general form (the variable associate with the k-th constraint).
  • num_cstrs + 1 <= k <= num_cstrs + num_vars: index of the (k-num_cstrs)-th structural variable in the general form.

Definition at line 88 of file glpk_computational_form.h.

◆ ComputeFormVarUpperBound()

double operations_research::ComputeFormVarUpperBound ( glp_prob *const problem,
const int num_cstrs,
const int k )
inline

Returns the upper bound of the variable k of the computational form by calling either glp_get_row_ub() or glp_get_col_ub().

See ComputeFormVarStatus() for details about k.

Definition at line 128 of file glpk_computational_form.h.

◆ ComputeGcdOfRoundedDoubles()

int64_t operations_research::ComputeGcdOfRoundedDoubles ( absl::Span< const double > x,
double scaling_factor )

Returns the Greatest Common Divisor of the numbers round(fabs(x[i] * scaling_factor)). The numbers 0 are ignored and if they are all zero then the result is 1. Note that round(fabs()) is the same as fabs(round()) since the numbers are rounded away from zero.

GCD(gcd, value) = GCD(value, gcd % value);

Definition at line 207 of file fp_utils.cc.

◆ ComputeMinimumWeightMatching()

template<typename WeightFunctionType, typename GraphType>
absl::StatusOr< std::vector< std::pair< typename GraphType::NodeIndex, typename GraphType::NodeIndex > > > operations_research::ComputeMinimumWeightMatching ( const GraphType & graph,
const WeightFunctionType & weight )

Computes a minimum weight perfect matching on an undirected graph.

Adding both arcs is redundant for MinCostPerfectMatching.

Definition at line 123 of file christofides.h.

◆ ComputeMinimumWeightMatchingWithMIP()

template<typename WeightFunctionType, typename GraphType>
absl::StatusOr< std::vector< std::pair< typename GraphType::NodeIndex, typename GraphType::NodeIndex > > > operations_research::ComputeMinimumWeightMatchingWithMIP ( const GraphType & graph,
const WeightFunctionType & weight )

Computes a minimum weight perfect matching on an undirected graph using a Mixed Integer Programming model.

Todo
(user): Handle infeasible cases if this algorithm is used outside of Christofides.

The model is composed of Boolean decision variables to select matching arcs and constraints ensuring that each node appears in exactly one selected arc. The objective is to minimize the sum of the weights of selected arcs. It is assumed the graph is symmetrical.

Creating arc-selection Boolean variable.

Creating matching constraint: for all node i, sum(j) arc(i,j) + sum(j) arc(j,i) = 1

Definition at line 159 of file christofides.h.

◆ ComputeOneToManyOnGraph()

template<class GraphType>
void operations_research::ComputeOneToManyOnGraph ( const GraphType *const graph,
const std::vector< PathDistance > *const arc_lengths,
typename GraphType::NodeIndex source,
const std::vector< typename GraphType::NodeIndex > *const destinations,
typename GenericPathContainer< GraphType >::Impl *const paths )

Computes shortest paths from node source to nodes in destinations using a binary heap-based Dijkstra algorithm.

Todo
(user): Investigate alternate implementation which wouldn't use AdjustablePriorityQueue.

Marking destination node. This is an optimization stopping the search when all destinations have been reached.

In this implementation the distance of a node to itself isn't necessarily 0. So we push successors of source in the queue instead of the source directly which will avoid marking the source.

Definition at line 624 of file shortest_paths.h.

◆ ComputeScalingErrors()

void operations_research::ComputeScalingErrors ( absl::Span< const double > input,
absl::Span< const double > lb,
absl::Span< const double > ub,
double scaling_factor,
double * max_relative_coeff_error,
double * max_scaled_sum_error )

This computes:

The max_relative_coeff_error, which is the maximum over all coeff of |round(factor * x[i]) / (factor * x[i]) - 1|.

The max_scaled_sum_error which is a bound on the maximum difference between the exact scaled sum and the rounded one. One needs to divide this by scaling_factor to have the maximum absolute error on the original sum.

Definition at line 175 of file fp_utils.cc.

◆ ComputeStats()

template<typename T>
SetCoverModel::Stats operations_research::ComputeStats ( std::vector< T > samples)

The first call to nth_element is O(n). The 2nd and 3rd calls are O(n / 2). Basically it's equivalent to running nth_element twice. One should be tempted to use a faster sorting algorithm like radix sort, it is not sure that we would gain a lot. There would be no gain in complexity whatsoever anyway. On top of that, this code is called at most one per problem, so it's not worth the effort.

Definition at line 635 of file set_cover_model.cc.

◆ ComputeVehicleEndChainStarts()

std::vector< int64_t > operations_research::ComputeVehicleEndChainStarts ( const RoutingModel & model)

Computes and returns the first node in the end chain of each vehicle in the model, based on the current bound NextVar values.

Find the chains of nodes (when nodes have their "Next" value bound in the current solution, it forms a link in a chain). Eventually, starts[end] will contain the index of the first node of the chain ending at node 'end' and ends[start] will be the last node of the chain starting at node 'start'. Values of starts[node] and ends[node] for other nodes is used for intermediary computations and do not necessarily reflect actual chain starts and ends.

Each node starts as a singleton chain.

Merge the sub-chain starting from 'node' and ending at 'current' with the existing sub-chain starting at 'current'.

Set the 'end_chain_starts' for every vehicle.

Definition at line 383 of file routing_search.cc.

◆ ComputeVehicleToResourceClassAssignmentCosts()

bool operations_research::ComputeVehicleToResourceClassAssignmentCosts ( int v,
double solve_duration_ratio,
const RoutingModel::ResourceGroup & resource_group,
const util_intops::StrongVector< RoutingModel::ResourceClassIndex, absl::flat_hash_set< int > > & ignored_resources_per_class,
const std::function< int64_t(int64_t)> & next_accessor,
const std::function< int64_t(int64_t, int64_t)> & transit_accessor,
bool optimize_vehicle_costs,
LocalDimensionCumulOptimizer * lp_optimizer,
LocalDimensionCumulOptimizer * mp_optimizer,
std::vector< int64_t > * assignment_costs,
std::vector< std::vector< int64_t > > * cumul_values,
std::vector< std::vector< int64_t > > * break_values )

Computes the vehicle-to-resource-class assignment costs for the given vehicle to all resource classes in the group, and sets these costs in 'assignment_costs' (if non-null). The latter is cleared and kept empty if the vehicle 'v' should not have a resource assigned to it. optimize_vehicle_costs indicates if the costs should be optimized or if we merely care about feasibility (cost of 0) and infeasibility (cost of -1) of the assignments. The cumul and break values corresponding to the assignment of each resource are also set in cumul_values and break_values, if non-null.

The model's time limit has been reached, stop everything.

NOTE(user): The resource class computation should allow us to catch all incompatibility reasons between vehicles and resources. If the following DCHECK fails, the resource classes should be adapted accordingly.

Couldn't assign any resource to this vehicle.

We already used the mp optimizer, so we don't need to recompute anything. If all assignment costs are negative, it means no resource is feasible for this vehicle.

A timeout was reached during optimization.

Definition at line 2861 of file routing_lp_scheduling.cc.

◆ ConstrainedShortestPathsOnDag()

PathWithLength operations_research::ConstrainedShortestPathsOnDag ( int num_nodes,
absl::Span< const ArcWithLengthAndResources > arcs_with_length_and_resources,
int source,
int destination,
const std::vector< double > & max_resources )

Returns {+inf, {}, {}} if there is no path of finite length from the source to the destination. Dies if arcs_with_length_and_resources has a cycle.

Definition at line 40 of file dag_constrained_shortest_path.cc.

◆ ConstraintHandlerResultPriority()

int operations_research::ConstraintHandlerResultPriority ( GScipCallbackResult result,
ConstraintHandlerCallbackType callback_type )

In callbacks, SCIP requires the first SCIP_RESULT in a priority list be returned when multiple results are applicable. This is a unified order of the priorities extracted from type_cons.h. The higher the result, the higher priority it is.

Larger number indicates higher priority in what should be returned.

In type_cons.h, callback results are consistently ordered across all constraint handler callback methods except that SCIP_SOLVELP (kSolveLp) takes higher priority than SCIP_BRANCHED (kBranched) in CONSENFOLP, and the reverse is true for CONSENFORELAX and CONSENFOLP.

kConstraintChanged, kFoundSolution, and kSuspend are not used in constraint handlers.

Definition at line 251 of file gscip_constraint_handler.cc.

◆ ConstraintSolverParameters_TrailCompression_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::ConstraintSolverParameters_TrailCompression_descriptor ( )

Definition at line 205 of file solver_parameters.pb.cc.

◆ ConstraintSolverParameters_TrailCompression_IsValid()

bool operations_research::ConstraintSolverParameters_TrailCompression_IsValid ( int value)
inline

Definition at line 87 of file solver_parameters.pb.h.

◆ ConstraintSolverParameters_TrailCompression_Name() [1/2]

template<>
const ::std::string & operations_research::ConstraintSolverParameters_TrailCompression_Name ( ConstraintSolverParameters_TrailCompression value)
inline

Definition at line 100 of file solver_parameters.pb.h.

◆ ConstraintSolverParameters_TrailCompression_Name() [2/2]

template<typename T>
const ::std::string & operations_research::ConstraintSolverParameters_TrailCompression_Name ( T value)

Definition at line 93 of file solver_parameters.pb.h.

◆ ConstraintSolverParameters_TrailCompression_Parse()

bool operations_research::ConstraintSolverParameters_TrailCompression_Parse ( ::absl::string_view name,
ConstraintSolverParameters_TrailCompression *PROTOBUF_NONNULL value )
inline

Definition at line 104 of file solver_parameters.pb.h.

◆ ConstraintToString()

std::string operations_research::ConstraintToString ( const sat::ConstraintProto & constraint,
const sat::CpModelProto & model_,
bool show_enforcement = true )

Enforcement literal.

Definition at line 3255 of file routing_lp_scheduling.cc.

◆ ConvertDimacsToFlowModel()

bool operations_research::ConvertDimacsToFlowModel ( absl::string_view file,
FlowModelProto * flow_model )

Note(user): Going from Dimacs to flow adds an extra copy, but for now we don't really care of the Dimacs file reading performance. Returns true if the file was converted correctly.

Definition at line 111 of file solve_flow_model.cc.

◆ ConvertFlowModelToDimacs()

void operations_research::ConvertFlowModelToDimacs ( const FlowModelProto & flow_model,
std::string * dimacs )

See http://lpsolve.sourceforge.net/5.5/DIMACS_mcf.htm for the dimacs file format of a min cost flow problem.

Todo
(user): This currently only works for min cost flow problem.

We need to compute the num_nodes from the nodes appearing in the arcs.

Problem size and type.

Nodes.

Arcs.

Definition at line 66 of file solve_flow_model.cc.

◆ ConvertGScipCallbackResult()

SCIP_RESULT operations_research::ConvertGScipCallbackResult ( const GScipCallbackResult result)

Definition at line 20 of file gscip_callback_result.cc.

◆ ConvertStatusOrMPSolutionResponse()

MPSolutionResponse operations_research::ConvertStatusOrMPSolutionResponse ( bool log_error,
absl::StatusOr< MPSolutionResponse > response )
inline

Some SolveWithProto() returns a StatusOr<MPModelResponse>, this utility just convert bad absl::StatusOr to a proper error in MPModelResponse.

Todo
(user): All SolveWithProto() should just fill the appropriate response instead.

Definition at line 37 of file proto_utils.h.

◆ ConvexMinimum() [1/2]

template<class Point, class Value>
std::pair< Point, Value > operations_research::ConvexMinimum ( absl::Span< const Point > sorted_points,
std::function< Value(Point)> f )

Returns the minimum of a convex function on a discrete set of sorted points. It is an error to call this with an empty set of points.

We assume the function is "unimodal" with potentially more than one minimum. That is strictly decreasing, then have a minimum that can have many points, and then is strictly increasing. In this case if we have two points with exactly the same value, one of the minimum is always between the two. We will only return one of the minimum.

Note
if we allow for non strictly decreasing/increasing, then you have corner cases where one need to check all points to find the minimum. For instance, if the function is constant except at one point where it is lower.

The usual algorithm to optimize such a function is a ternary search. However here we assume calls to f() are expensive, and we try to minimize those. So we use a slightly different algorithm than: https://en.wikipedia.org/wiki/Ternary_search

Todo
(user): Some relevant optimizations:
  • Abort early if we know a lower bound on the min.
  • Seed with a starting point if we know one.
  • We technically do not need the points to be sorted and can use linear-time median computation to speed this up.
Todo
(user): replace std::function by absl::FunctionRef here and in BinarySearch().

Definition at line 324 of file binary_search.h.

◆ ConvexMinimum() [2/2]

template<class Point, class Value>
std::pair< Point, Value > operations_research::ConvexMinimum ( bool is_to_the_right,
std::pair< Point, Value > current_min,
absl::Span< const Point > sorted_points,
std::function< Value(Point)> f )

Internal part of ConvexMinimum() that can also be used directly in some situation when we already know some value of f(). This assumes that we already have a current_min candidate that is either before or after all the points in sorted_points.

Definition at line 333 of file binary_search.h.

◆ CoolingScheduleStrategy_Value_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::CoolingScheduleStrategy_Value_descriptor ( )

Definition at line 492 of file routing_ils.pb.cc.

◆ CoolingScheduleStrategy_Value_IsValid()

bool operations_research::CoolingScheduleStrategy_Value_IsValid ( int value)
inline

Definition at line 219 of file routing_ils.pb.h.

◆ CoolingScheduleStrategy_Value_Name() [1/2]

template<>
const ::std::string & operations_research::CoolingScheduleStrategy_Value_Name ( CoolingScheduleStrategy_Value value)
inline

Definition at line 232 of file routing_ils.pb.h.

◆ CoolingScheduleStrategy_Value_Name() [2/2]

template<typename T>
const ::std::string & operations_research::CoolingScheduleStrategy_Value_Name ( T value)

Definition at line 225 of file routing_ils.pb.h.

◆ CoolingScheduleStrategy_Value_Parse()

bool operations_research::CoolingScheduleStrategy_Value_Parse ( ::absl::string_view name,
CoolingScheduleStrategy_Value *PROTOBUF_NONNULL value )
inline

Definition at line 236 of file routing_ils.pb.h.

◆ CountTriangles()

std::vector< int > operations_research::CountTriangles ( const ::util::StaticGraph< int, int > & graph,
int max_degree )

HELPER FUNCTIONS: PUBLIC FOR UNIT TESTING ONLY.

Returns, for each node A, the number of pairs of nodes (B, C) such that arcs A->B, A->C and B->C exist. Skips nodes with degree > max_degree (this allows to remain linear in the number of nodes, but gives partial results). The complexity is O(num_nodes * max_degree²).

DIFFERENTIATION: In unit test CollisionImpliesIsomorphismInPractice, this metric differentiated 33 of the 34 non-isomorphic collisions found across 200K graphs: only one remained.

Example graph differentiated by this metric, but not by LocalBfsFprint(): ,-1-3-. ,-1-3-. 0 | | 5 and 0 X 5 ‘-2-3-’ ‘-2-4-’

Definition at line 57 of file find_graph_symmetries.cc.

◆ CourseSchedulingResultStatus_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::CourseSchedulingResultStatus_descriptor ( )

Definition at line 448 of file course_scheduling.pb.cc.

◆ CourseSchedulingResultStatus_IsValid()

bool operations_research::CourseSchedulingResultStatus_IsValid ( int value)
inline

Definition at line 120 of file course_scheduling.pb.h.

◆ CourseSchedulingResultStatus_Name() [1/2]

template<>
const ::std::string & operations_research::CourseSchedulingResultStatus_Name ( CourseSchedulingResultStatus value)
inline

Definition at line 133 of file course_scheduling.pb.h.

◆ CourseSchedulingResultStatus_Name() [2/2]

template<typename T>
const ::std::string & operations_research::CourseSchedulingResultStatus_Name ( T value)

Definition at line 126 of file course_scheduling.pb.h.

◆ CourseSchedulingResultStatus_Parse()

bool operations_research::CourseSchedulingResultStatus_Parse ( ::absl::string_view name,
CourseSchedulingResultStatus *PROTOBUF_NONNULL value )
inline

Definition at line 137 of file course_scheduling.pb.h.

◆ CoverArcsByCliques()

void operations_research::CoverArcsByCliques ( std::function< bool(int, int)> graph,
int node_count,
std::function< bool(const std::vector< int > &)> callback )

Covers the maximum number of arcs of the graph with cliques. The graph is described by the graph callback. graph->Run(i, j) indicates if there is an arc between i and j. This function takes ownership of 'callback' and deletes it after it has run. It calls 'callback' upon each clique. It ignores cliques of size 1.

Definition at line 244 of file cliques.cc.

◆ CpRandomSeed()

int64_t operations_research::CpRandomSeed ( )
inline

Definition at line 183 of file constraint_solver.h.

◆ CropMultiLineString()

std::string operations_research::CropMultiLineString ( const std::string & s,
int max_line_length,
int max_num_lines )

Crops a multi-line string horizontally and vertically, as needed. Skipped lines (to spare vertical space) are replaced by "... [42 LINES CROPPED] ..." and non-skipped but cropped lines (to spare horizontal space) are replaced by "%prefix% ..[35 CHARS CROPPED].. %suffix%" where prefix% and suffix% are equally-sized (possibly off-by-one) substrings of the line, to fit in the required width.

Warning
The code is intended to be used for debugging and visual aid. While it shouldn't crash, it makes a few shortcuts and can violate the requirements (eg. some lines may be longer than max_line_length).

We ignore the terminating newline for line accounting, but we do output it back in the end.

There's a corner case for max_num_lines=0. See the unit test.

We only fill the special line mentioning the skipped lines after we're done with the horizontal crops, in the loop below.

Definition at line 25 of file string_util.cc.

◆ DefaultGScipConstraintOptions()

const GScipConstraintOptions & operations_research::DefaultGScipConstraintOptions ( )

Definition at line 292 of file gscip.cc.

◆ DefaultGScipVariableOptions()

const GScipVariableOptions & operations_research::DefaultGScipVariableOptions ( )

Definition at line 287 of file gscip.cc.

◆ DefaultPhaseStatString()

std::string operations_research::DefaultPhaseStatString ( DecisionBuilder * db)

-------— API -------—

Definition at line 1121 of file default_search.cc.

◆ DefaultRoutingModelParameters()

RoutingModelParameters operations_research::DefaultRoutingModelParameters ( )

Definition at line 44 of file routing_parameters.cc.

◆ DefaultRoutingSearchParameters()

RoutingSearchParameters operations_research::DefaultRoutingSearchParameters ( )

static

Definition at line 242 of file routing_parameters.cc.

◆ DefaultSecondaryRoutingSearchParameters()

RoutingSearchParameters operations_research::DefaultSecondaryRoutingSearchParameters ( )

Definition at line 248 of file routing_parameters.cc.

◆ DEFINE_INT_TYPE() [1/6]

operations_research::DEFINE_INT_TYPE ( RoutingCostClassIndex ,
int  )

◆ DEFINE_INT_TYPE() [2/6]

operations_research::DEFINE_INT_TYPE ( RoutingDimensionIndex ,
int  )

◆ DEFINE_INT_TYPE() [3/6]

operations_research::DEFINE_INT_TYPE ( RoutingDisjunctionIndex ,
int  )

◆ DEFINE_INT_TYPE() [4/6]

operations_research::DEFINE_INT_TYPE ( RoutingNodeIndex ,
int  )

Defining common types used in the routing library outside the main RoutingModel class has several purposes: 1) It allows some small libraries to avoid a dependency on routing.{h,cc}, eg. routing_neighborhoods.h. 2) It allows an easier wrapping via SWIG, which can have issues with intra-class types. Users that depend on routing.{h,cc} should just use the RoutingModel:: equivalent, eg. RoutingModel::NodeIndex.

◆ DEFINE_INT_TYPE() [5/6]

operations_research::DEFINE_INT_TYPE ( RoutingResourceClassIndex ,
int  )

◆ DEFINE_INT_TYPE() [6/6]

operations_research::DEFINE_INT_TYPE ( RoutingVehicleClassIndex ,
int  )

◆ DEFINE_STRONG_INDEX_TYPE() [1/2]

operations_research::DEFINE_STRONG_INDEX_TYPE ( LeafIndex )

◆ DEFINE_STRONG_INDEX_TYPE() [2/2]

operations_research::DEFINE_STRONG_INDEX_TYPE ( TreeNodeIndex )

◆ DEFINE_STRONG_INT_TYPE() [1/7]

operations_research::DEFINE_STRONG_INT_TYPE ( CapacityTermIndex ,
BaseInt  )

Term index in a capacity constraint.

◆ DEFINE_STRONG_INT_TYPE() [2/7]

operations_research::DEFINE_STRONG_INT_TYPE ( ColumnEntryIndex ,
BaseInt  )

Position in a vector. The vector may either represent a column, i.e. a subset with all its elements, or a row, i,e. the list of subsets which contain a given element.

◆ DEFINE_STRONG_INT_TYPE() [3/7]

operations_research::DEFINE_STRONG_INT_TYPE ( ElementIndex ,
BaseInt  )

Element index.

◆ DEFINE_STRONG_INT_TYPE() [4/7]

operations_research::DEFINE_STRONG_INT_TYPE ( FullElementIndex ,
BaseInt  )

◆ DEFINE_STRONG_INT_TYPE() [5/7]

operations_research::DEFINE_STRONG_INT_TYPE ( FullSubsetIndex ,
BaseInt  )

In the CFT algorithm, indices from different models are frequently used, and mixing them can lead to errors. To prevent such mistakes, strong-typed wrappers are employed. There are three available approaches for handling these indices:

  1. Full-model strong-typed indices + {Subset,Element}Index for the core model
  2. Core-model strong-typed indices + {Subset,Element}Index for the full model
  3. Define new strong-typed indices both full-model and core-model Introducing a new set of strong-typed indices, however, can lead to a cascade of code duplication (or template proliferation). It also requires additional "view" boilerplate to properly handle the different types, increasing complexity. Currently, the simplest approach is to define only full-model indices while reusing the original strong types for the core model. The main challenge arises in FullToCoreModel, where a "filtered" full-model must be handled. In such cases, static casts are employed to manage the type conversions effectively.

◆ DEFINE_STRONG_INT_TYPE() [6/7]

operations_research::DEFINE_STRONG_INT_TYPE ( RowEntryIndex ,
BaseInt  )

◆ DEFINE_STRONG_INT_TYPE() [7/7]

operations_research::DEFINE_STRONG_INT_TYPE ( SubsetIndex ,
BaseInt  )

We make heavy use of strong typing to avoid obvious mistakes. Subset index.

◆ DefragmentRanges()

template<typename T>
void operations_research::DefragmentRanges ( std::vector< T > & mutable_input,
CommittableArray< IndexRange > & ranges,
std::vector< T > & temp_container )

Given unchanged committable ranges representing ranges of indices in input, copies the corresponding elements of input to contiguous ranges of temp_container, swaps temp_container with input, and updates the committable ranges to represent the new ranges in output.

Definition at line 158 of file routing_filter_committables.h.

◆ DeleteDemonProfiler()

void operations_research::DeleteDemonProfiler ( DemonProfiler * monitor)
extern

Definition at line 453 of file demon_profiler.cc.

◆ DeleteLocalSearchProfiler()

void operations_research::DeleteLocalSearchProfiler ( LocalSearchProfiler * monitor)
extern

Definition at line 3756 of file local_search.cc.

◆ DemonProfilerAddFakeRun()

void operations_research::DemonProfilerAddFakeRun ( DemonProfiler *const monitor,
Demon *const demon,
int64_t start_time,
int64_t end_time,
bool is_fail )

Definition at line 470 of file demon_profiler.cc.

◆ DemonProfilerBeginInitialPropagation()

void operations_research::DemonProfilerBeginInitialPropagation ( DemonProfiler *const monitor,
Constraint *const constraint )

Definition at line 488 of file demon_profiler.cc.

◆ DemonProfilerEndInitialPropagation()

void operations_research::DemonProfilerEndInitialPropagation ( DemonProfiler *const monitor,
Constraint *const constraint )

Definition at line 493 of file demon_profiler.cc.

◆ DemonProfilerExportInformation()

void operations_research::DemonProfilerExportInformation ( DemonProfiler *const monitor,
const Constraint *const constraint,
int64_t *const fails,
int64_t *const initial_propagation_runtime,
int64_t *const demon_invocations,
int64_t *const total_demon_runtime,
int *const demon_count )

Definition at line 476 of file demon_profiler.cc.

◆ DisableAllCutsExceptUserDefined()

void operations_research::DisableAllCutsExceptUserDefined ( GScipParameters * parameters)

Turns off all SCIP separators.

The only way in SCIP's C API to disable all cuts except user-defined ones is to disable each individual cut. This may change if SCIP gets updated; the list below is for SCIP 7.0.1. See https://scip.zib.de/doc/html/group__SEPARATORS.php for a list of all cuts.

Definition at line 147 of file gscip_parameters.cc.

◆ DisableAllLocalSearchOperators()

void operations_research::DisableAllLocalSearchOperators ( RoutingSearchParameters::LocalSearchNeighborhoodOperators * operators)

Definition at line 47 of file routing_parameters_utils.cc.

◆ DisplayPlan() [1/2]

void operations_research::DisplayPlan ( const operations_research::RoutingIndexManager & manager,
const operations_research::RoutingModel & routing,
const operations_research::Assignment & plan,
bool use_same_vehicle_costs,
int64_t max_nodes_per_group,
int64_t same_vehicle_cost,
absl::Span< const std::string > dimension_names )

Route plan displayer.

Todo
(user): Move the display code to the routing library.

◆ DisplayPlan() [2/2]

void operations_research::DisplayPlan ( const RoutingIndexManager & manager,
const RoutingModel & routing,
const operations_research::Assignment & plan,
bool use_same_vehicle_costs,
int64_t max_nodes_per_group,
int64_t same_vehicle_cost,
absl::Span< const std::string > dimension_names )

Display plan cost.

Display dropped orders.

Display actual output for each vehicle.

Definition at line 165 of file cvrptw_lib.cc.

◆ DomainToString()

std::string operations_research::DomainToString ( const ::google::protobuf::RepeatedField< int64_t > * domain)

Definition at line 3201 of file routing_lp_scheduling.cc.

◆ DropAllEvents()

SCIP_RETCODE operations_research::DropAllEvents ( GScipEventHandler & handler)

Calls SCIPdropEvent() for all events in caught_events_ and clear this collection.

This is not a member function since it needs to be visible to the SCIP Exit callback function.

Definition at line 133 of file gscip_event_handler.cc.

◆ EmptyOrGurobiLicenseWarning()

testing::Matcher< std::string > operations_research::EmptyOrGurobiLicenseWarning ( )

Returns a matcher that either matches an empty string or the logs printed to stdout by Gurobi when a license is about to expire.

Definition at line 23 of file gurobi_stdout_matchers.cc.

◆ EmptyOrGurobiLicenseWarningIfGurobi()

testing::Matcher< std::string > operations_research::EmptyOrGurobiLicenseWarningIfGurobi ( bool is_gurobi)

Returns either a matcher for the empty string when is_gurobi is false or the result of EmptyOrGurobiLicenseWarning() when true.

This is a convenience function for generic tests shared between Gurobi and other solvers.

Definition at line 30 of file gurobi_stdout_matchers.cc.

◆ ENABLE_EXPLICIT_STRONG_TYPE_CAST() [1/4]

operations_research::ENABLE_EXPLICIT_STRONG_TYPE_CAST ( ElementIndex ,
FullElementIndex  )

◆ ENABLE_EXPLICIT_STRONG_TYPE_CAST() [2/4]

operations_research::ENABLE_EXPLICIT_STRONG_TYPE_CAST ( FullElementIndex ,
ElementIndex  )

◆ ENABLE_EXPLICIT_STRONG_TYPE_CAST() [3/4]

operations_research::ENABLE_EXPLICIT_STRONG_TYPE_CAST ( FullSubsetIndex ,
SubsetIndex  )

◆ ENABLE_EXPLICIT_STRONG_TYPE_CAST() [4/4]

operations_research::ENABLE_EXPLICIT_STRONG_TYPE_CAST ( SubsetIndex ,
FullSubsetIndex  )

◆ EncodeParametersAsString()

template<typename P>
std::string operations_research::EncodeParametersAsString ( const P & parameters)

Returns a string that should be used in MPModelRequest's solver_specific_parameters field to encode the glop parameters.

The returned string's content depends on the version of the proto library that is linked in the binary.

By default it will contain the textual representation of the input proto. But when the proto-lite is used, it will contain the binary stream of the proto instead since it is not possible to build the textual representation in that case.

This function will test if the proto-lite is used and expect a binary stream when it is the case. So in order for your code to be portable, you should always use this function to set the specific parameters.

Proto-lite disables some features of protobufs and messages inherit from MessageLite directly instead of inheriting from Message (which is itself a specialization of MessageLite). See https://protobuf.dev/reference/cpp/cpp-generated/#message for details.

Here we use SerializeToString() instead of SerializeAsString() since the later ignores errors and returns an empty string instead (which can be a valid value when no fields are set).

Definition at line 71 of file proto_utils.h.

◆ end()

ClosedInterval::Iterator operations_research::end ( ClosedInterval interval)
inline

Definition at line 735 of file sorted_interval_list.h.

◆ ExchangeAndMakeActive()

LocalSearchOperator * operations_research::ExchangeAndMakeActive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class )

--— ExchangeAndMakeActive --—

ExchangeAndMakeActive exchanges two nodes and inserts an inactive node. Possible neighbors for paths 0 -> 2 -> 4, 1 -> 3 -> 6 and 5 inactive are: 0 -> 3 -> 4, 1 -> 5 -> 2 -> 6 0 -> 3 -> 5 -> 4, 1 -> 2 -> 6 0 -> 5 -> 3 -> 4, 1 -> 2 -> 6 0 -> 3 -> 4, 1 -> 2 -> 5 -> 6

Warning this operator creates a very large neighborhood, with O(m*n^3) neighbors (n: number of active nodes, m: number of non active nodes). It should be used with only a small number of non active nodes.

Todo
(user): Add support for neighbors which would make this operator more usable.

Definition at line 899 of file local_search.cc.

◆ ExchangePathStartEndsAndMakeActive()

LocalSearchOperator * operations_research::ExchangePathStartEndsAndMakeActive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class )

--— ExchangePathEndsAndMakeActive --—

An operator which exchanges the first and last nodes of two paths and makes a node active. Possible neighbors for paths 0 -> 1 -> 2 -> 7, 6 -> 3 -> 4 -> 8 and 5 inactive are: 0 -> 5 -> 3 -> 4 -> 7, 6 -> 1 -> 2 -> 8 0 -> 3 -> 4 -> 7, 6 -> 1 -> 5 -> 2 -> 8 0 -> 3 -> 4 -> 7, 6 -> 1 -> 2 -> 5 -> 8 0 -> 3 -> 5 -> 4 -> 7, 6 -> 1 -> 2 -> 8 0 -> 3 -> 4 -> 5 -> 7, 6 -> 1 -> 2 -> 8

This neighborhood is an artificially reduced version of ExchangeAndMakeActiveOperator. It can still be used to opportunistically insert inactive nodes.

Definition at line 946 of file local_search.cc.

◆ ExportModelAsLpFormat()

absl::StatusOr< std::string > operations_research::ExportModelAsLpFormat ( const MPModelProto & model,
const MPModelExportOptions & options = MPModelExportOptions() )

Outputs the current model (variables, constraints, objective) as a string encoded in the so-called "CPLEX LP file format" as generated by SCIP. The LP file format is easily readable by a human.

Returns false if some error has occurred during execution. The validity of names is automatically checked. If a variable name or a constraint name is invalid or non-existent, a new valid name is automatically generated.

If 'obfuscated' is true, the variable and constraint names of proto_ are not used. Variable and constraint names of the form "V12345" and "C12345" are used instead.

For more information about the different LP file formats: http://lpsolve.sourceforge.net/5.5/lp-format.htm The following give a reasonable idea of the CPLEX LP file format: http://lpsolve.sourceforge.net/5.5/CPLEX-format.htm https://www.ibm.com/docs/en/icos/12.8.0.0?topic=cplex-lp-file-format-algebraic-representation http://www.gurobi.com/documentation/5.1/reference-manual/node871

Definition at line 224 of file model_exporter.cc.

◆ ExportModelAsMpsFormat()

absl::StatusOr< std::string > operations_research::ExportModelAsMpsFormat ( const MPModelProto & model,
const MPModelExportOptions & options = MPModelExportOptions() )

Outputs the current model (variables, constraints, objective) as a string encoded in MPS file format, using the "free" MPS format.

Returns false if some error has occurred during execution. Models with maximization objectives trigger an error, because MPS can encode only minimization problems.

The validity of names is automatically checked. If a variable name or a constraint name is invalid or non-existent, a new valid name is automatically generated.

Name validity and obfuscation works exactly as in ExportModelAsLpFormat().

For more information about the MPS format: http://en.wikipedia.org/wiki/MPS_(format) A close-to-original description coming from OSL: http://tinyurl.com/mps-format-by-osl A recent description from CPLEX: http://tinyurl.com/mps-format-by-cplex CPLEX extensions: http://tinyurl.com/mps-extensions-by-cplex Gurobi's description: http://www.gurobi.com/documentation/5.1/reference-manual/node869

Definition at line 241 of file model_exporter.cc.

◆ ExtractValidMPModelOrPopulateResponseStatus()

std::optional< LazyMutableCopy< MPModelProto > > operations_research::ExtractValidMPModelOrPopulateResponseStatus ( const MPModelRequest & request,
MPSolutionResponse * response )

If the model is valid and non-empty, returns it (possibly after extracting the model_delta). If invalid or empty, updates response and returns null.

Definition at line 687 of file model_validator.cc.

◆ fast_ilogb()

int operations_research::fast_ilogb ( double value)
inline

Definition at line 256 of file fp_utils.h.

◆ fast_scalbn()

double operations_research::fast_scalbn ( double value,
int exponent )
inline

Definition at line 257 of file fp_utils.h.

◆ fasthash64()

uint64_t operations_research::fasthash64 ( const void * buf,
size_t len,
uint64_t seed )

Definition at line 36 of file hash.cc.

◆ FillDimensionValuesFromRoutingDimension()

bool operations_research::FillDimensionValuesFromRoutingDimension ( int path,
int64_t capacity,
int64_t span_upper_bound,
absl::Span< const DimensionValues::Interval > cumul_of_node,
absl::Span< const DimensionValues::Interval > slack_of_node,
absl::AnyInvocable< int64_t(int64_t, int64_t) const > evaluator,
DimensionValues & dimension_values )

Given a DimensionValues whose path has changed nodes, fills the travels, travel_sums, transits, cumuls, and span of the new path. This only sets the initial values at each node, and does not propagate the transit constraint cumul[i+1] = cumul[i] + transits[i]. Returns false if some cumul.min exceeds the capacity, or if the sum of travels exceeds the span_upper_bound.

Copy cumul min/max data from cumul variables.

Extract travel data.

Todo
(user): refine this logic to avoid more calls, using PathState chains to find chains in the middle of the path, and vehicle travel class to reuse chains from different vehicles.

Reuse committed travels to avoid calling evaluator. Split [0, num_nodes) into [0, i), [i, j), [j, num_nodes), so that:

  • nodes[r] == cnodes[r] for r in [0, i)
  • nodes[r] == cnodes[r + delta] for r in [j, num_nodes) with delta = num_cnodes - num_nodes.

Extract transit data, fill partial travel sums.

Definition at line 1108 of file routing_filters.cc.

◆ FillPathEvaluation()

void operations_research::FillPathEvaluation ( absl::Span< const int64_t > path,
const RoutingModel::TransitCallback2 & evaluator,
std::vector< int64_t > * values )
Todo
(user): Apply -pointer-following.

Definition at line 6745 of file routing.cc.

◆ FillPrePostVisitValues()

void operations_research::FillPrePostVisitValues ( int path,
const DimensionValues & dimension_values,
absl::AnyInvocable< int64_t(int64_t, int64_t) const > pre_travel_evaluator,
absl::AnyInvocable< int64_t(int64_t, int64_t) const > post_travel_evaluator,
PrePostVisitValues & visit_values )

Fills pre- and post-visits of a path, using pre/post-travel evaluators.

Note
The visit at node A uses time interval [cumul(A) - previsit(A), cumul(A) + postvisit(A)). The pre-travel of travel A->B is the post-visit of A, and the post-travel of travel A->B is the pre-visit of B.
Todo

(user): when PathCumulFilter uses a PathState, replace dimension_values by a PathState.

(user): use committed values as a cache to avoid calling evaluators.

Definition at line 1188 of file routing_filters.cc.

◆ FillTravelBoundsOfVehicle()

void operations_research::FillTravelBoundsOfVehicle ( int vehicle,
absl::Span< const int64_t > path,
const RoutingDimension & dimension,
TravelBounds * travel_bounds )

Fill path and min/max/pre/post travel bounds.

Definition at line 666 of file routing_breaks.cc.

◆ FillValues()

void operations_research::FillValues ( const std::vector< IntVar * > & vars,
std::vector< int64_t > *const values )
inline

Definition at line 4357 of file constraint_solveri.h.

◆ FindCliques()

void operations_research::FindCliques ( std::function< bool(int, int)> graph,
int node_count,
std::function< bool(const std::vector< int > &)> callback )

This method implements the 'version2' of the Bron-Kerbosch algorithm to find all maximal cliques in a undirected graph.

Finds all maximal cliques, even of size 1, in the graph described by the graph callback. graph->Run(i, j) indicates if there is an arc between i and j. This function takes ownership of 'callback' and deletes it after it has run. If 'callback' returns true, then the search for cliques stops.

Definition at line 230 of file cliques.cc.

◆ FindErrorInMPModelDeltaProto()

std::string operations_research::FindErrorInMPModelDeltaProto ( const MPModelDeltaProto & delta,
const MPModelProto & model )

Like FindErrorInMPModelProto, but for a MPModelDeltaProto applied to a given baseline model (assumed valid, eg. FindErrorInMPModelProto(model)=""). Works in O(|model_delta|) + O(num_vars in model), but the latter term has a very small constant factor.

Validate delta variables.

NOTE(user): It is OK for the override proto to be empty, i.e. be a non-override.

Now we "officially" add the new variables to "num_vars".

Validate delta constraints. We can avoid going over the full var_index/coefficient of the original constraint, since the overrides are self-sufficient (i.e. the override var_index/coefficients are valid iff they would be valid in a standalone, new constraint). So we use a partial proto merger to avoid those in the baseline constraint.

NOTE(user): We don't need to do the merging of var_index/coefficient: that part of the merged constraint will be valid iff the override is valid as a standalone var_index/coefficient map. So we simply validate a reduced version of the actual "merged" constraint, by removing the var_index/coefficient of the baseline. Benefit: the complexity is O(|constraint override|) even if the baseline constraint was huge.

Definition at line 842 of file model_validator.cc.

◆ FindErrorInMPModelForScip()

std::string operations_research::FindErrorInMPModelForScip ( const MPModelProto & model,
SCIP * scip )

Returns "" iff the model seems valid for SCIP, else returns a human-readable error message. Assumes that FindErrorInMPModelProto(model) found no error.

Definition at line 594 of file scip_proto_solver.cc.

◆ FindErrorInMPModelProto()

std::string operations_research::FindErrorInMPModelProto ( const MPModelProto & model,
double abs_value_threshold = 0.0,
bool accept_trivially_infeasible_bounds = false )

Returns an empty string iff the model is valid and not trivially infeasible. Otherwise, returns a description of the first error or trivial infeasibility variable or constraint bound encountered.

abs_value_threshold is the (exclusive) limit for the abs value of constraint coefficients, objective coefficients, etc. If unspecified, or 0, it defaults to FLAGS_model_validator_infinity.

NOTE(user): the code of this method (and the client code too!) is considerably simplified by this string-based, simple API. If clients require it, we could add a formal error status enum.

NOTE(user): Empty models are considered fine by this function, although it is not clear whether MPSolver::Solve() will always respond in the same way, depending on the solvers.

Validate variables.

Validate constraints.

Constraint protos can be huge, theoretically. So we guard against that.

Validate general constraints.

Validate objectives.

Validate the solution hint.

Validate the annotations.

Parameters
accept_trivially_infeasible_boundsIf false, variable and constraint bounds like [lb=1.2, ub=0.7] yield an error, and also integer variable bounds like [0.7, 0.8].

Definition at line 558 of file model_validator.cc.

◆ FindErrorInRoutingSearchParameters()

std::string operations_research::FindErrorInRoutingSearchParameters ( const RoutingSearchParameters & search_parameters)

Returns an empty std::string if the routing search parameters are valid, and a non-empty, human readable error description if they're not.

Definition at line 441 of file routing_parameters.cc.

◆ FindErrorsInRoutingSearchParameters()

std::vector< std::string > operations_research::FindErrorsInRoutingSearchParameters ( const RoutingSearchParameters & search_parameters)

Returns a list of std::string describing the errors in the routing search parameters. Returns an empty vector if the parameters are valid.

Check that all local search operators are set to either BOOL_TRUE or BOOL_FALSE (and not BOOL_UNSPECIFIED). Do that only in non-portable mode, since it needs proto reflection etc.

Definition at line 448 of file routing_parameters.cc.

◆ FindFeasibilityErrorInSolutionHint()

std::string operations_research::FindFeasibilityErrorInSolutionHint ( const MPModelProto & model,
double tolerance )
Todo
(user): Add a general FindFeasibilityErrorInSolution() and factor out the common code.

Returns an empty string if the solution hint given in the model is a feasible solution. Otherwise, returns a description of the first reason for infeasibility.

This function can be useful for debugging/checking that the given solution hint is feasible when it is expected to be the case. The feasibility is checked up to the given tolerance using the ::operations_research::IsLowerWithinTolerance() function.

First, we validate the solution hint.

Special error message for the empty case.

To be feasible, the hint must not be partial.

All the values must be exactly in the variable bounds.

All the constraints must be satisfiable.

Definition at line 781 of file model_validator.cc.

◆ FindMostExpensiveArcsOnRoute()

bool operations_research::FindMostExpensiveArcsOnRoute ( int num_arcs,
int64_t start,
const std::function< int64_t(int64_t)> & next_accessor,
const std::function< bool(int64_t)> & is_end,
const std::function< int64_t(int64_t, int64_t, int64_t)> & arc_cost_for_route_start,
std::vector< std::pair< int64_t, int > > * most_expensive_arc_starts_and_ranks,
std::pair< int, int > * first_expensive_arc_indices )

Returns false if the route starting with 'start' is empty. Otherwise sets most_expensive_arc_starts_and_ranks and first_expensive_arc_indices according to the most expensive chains on the route, and returns true.

Empty route.

Note
The negative ranks are so that for a given cost, lower ranks are given higher priority.

Definition at line 121 of file routing_utils.cc.

◆ FirstSolutionStrategy_Value_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::FirstSolutionStrategy_Value_descriptor ( )

Definition at line 153 of file routing_enums.pb.cc.

◆ FirstSolutionStrategy_Value_IsValid()

bool operations_research::FirstSolutionStrategy_Value_IsValid ( int value)
inline

Definition at line 122 of file routing_enums.pb.h.

◆ FirstSolutionStrategy_Value_Name() [1/2]

template<>
const ::std::string & operations_research::FirstSolutionStrategy_Value_Name ( FirstSolutionStrategy_Value value)
inline

Definition at line 135 of file routing_enums.pb.h.

◆ FirstSolutionStrategy_Value_Name() [2/2]

template<typename T>
const ::std::string & operations_research::FirstSolutionStrategy_Value_Name ( T value)

Definition at line 128 of file routing_enums.pb.h.

◆ FirstSolutionStrategy_Value_Parse()

bool operations_research::FirstSolutionStrategy_Value_Parse ( ::absl::string_view name,
FirstSolutionStrategy_Value *PROTOBUF_NONNULL value )
inline

Definition at line 139 of file routing_enums.pb.h.

◆ FixFlagsAndEnvironmentForSwig()

void operations_research::FixFlagsAndEnvironmentForSwig ( )

Definition at line 28 of file logging.cc.

◆ FloorRatio()

int64_t operations_research::FloorRatio ( int64_t value,
int64_t positive_coeff )

Definition at line 113 of file sorted_interval_list.cc.

◆ FlowModelProto_ProblemType_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::FlowModelProto_ProblemType_descriptor ( )

Definition at line 191 of file flow_problem.pb.cc.

◆ FlowModelProto_ProblemType_IsValid()

bool operations_research::FlowModelProto_ProblemType_IsValid ( int value)
inline

Definition at line 92 of file flow_problem.pb.h.

◆ FlowModelProto_ProblemType_Name() [1/2]

template<>
const ::std::string & operations_research::FlowModelProto_ProblemType_Name ( FlowModelProto_ProblemType value)
inline

Definition at line 105 of file flow_problem.pb.h.

◆ FlowModelProto_ProblemType_Name() [2/2]

template<typename T>
const ::std::string & operations_research::FlowModelProto_ProblemType_Name ( T value)

Definition at line 98 of file flow_problem.pb.h.

◆ FlowModelProto_ProblemType_Parse()

bool operations_research::FlowModelProto_ProblemType_Parse ( ::absl::string_view name,
FlowModelProto_ProblemType *PROTOBUF_NONNULL value )
inline

Definition at line 109 of file flow_problem.pb.h.

◆ FullProtocolMessageAsString()

std::string operations_research::FullProtocolMessageAsString ( const google::protobuf::Message & message,
int indent_level )

Prints a proto2 message as a string, it behaves like TextFormat::Print() but also prints the default values of unset fields which is useful for printing parameters.

Definition at line 60 of file proto_tools.cc.

◆ GetBestScalingOfDoublesToInt64() [1/2]

double operations_research::GetBestScalingOfDoublesToInt64 ( absl::Span< const double > input,
absl::Span< const double > lb,
absl::Span< const double > ub,
int64_t max_absolute_sum )

Returns the scaling factor like above with the extra conditions:

  • The sum over i of min(0, round(factor * x[i])) >= -max_sum.
  • The sum over i of max(0, round(factor * x[i])) <= max_sum. For any possible values of the x[i] such that x[i] is in [lb[i], ub[i]].

Definition at line 184 of file fp_utils.cc.

◆ GetBestScalingOfDoublesToInt64() [2/2]

void operations_research::GetBestScalingOfDoublesToInt64 ( absl::Span< const double > input,
int64_t max_absolute_sum,
double * scaling_factor,
double * max_relative_coeff_error )

Given an array of doubles, this computes a positive scaling factor such that the scaled doubles can then be rounded to integers with little or no loss of precision, and so that the L1 norm of these integers is <= max_sum. More precisely, the following formulas will hold (x[i] is input[i], for brevity):

  • For all i, |round(factor * x[i]) / factor - x[i]| <= error * |x[i]|
  • The sum over i of |round(factor * x[i])| <= max_sum.

The algorithm tries to minimize "error" (which is the relative error for one coefficient). Note however than in really broken cases, the error might be infinity and the factor zero.

Note on the algorithm:

  • It only uses factors of the form 2^n (i.e. ldexp(1.0, n)) for simplicity.
  • The error will be zero in many practical instances. For example, if x contains only integers with low magnitude; or if x contains doubles whose exponents cover a small range.
  • It chooses the factor as high as possible under the given constraints, as a result the numbers produced may be large. To balance this, we recommend to divide the scaled integers by their gcd() which will result in no loss of precision and will help in many practical cases.

    Todo
    (user): incorporate the gcd computation here? The issue is that I am not sure if I just do factor /= gcd that round(x * factor) will be the same.

Definition at line 195 of file fp_utils.cc.

◆ GetGurobiEnv()

absl::StatusOr< GRBenv * > operations_research::GetGurobiEnv ( )

Definition at line 455 of file environment.cc.

◆ getitcnt()

int operations_research::getitcnt ( const XPRSprob & mLp)

Definition at line 172 of file xpress_interface.cc.

◆ GetLocalCheapestInsertionSortingProperties()

std::vector< RoutingSearchParameters::InsertionSortingProperty > operations_research::GetLocalCheapestInsertionSortingProperties ( absl::Span< const int > lci_insertion_sorting_properties)

Takes RoutingSearchParameters::local_cheapest_insertion_sorting_properties in input and returns the ordered list of properties that is used to sort nodes when performing a local cheapest insertion first heuristic.

For historical reasons if no insertion order is specified, we fallback to selecting nodes with the least number of allowed vehicles first, then the ones with the highest penalty.

Definition at line 24 of file routing_parameters_utils.cc.

◆ getMapDoubleControls()

std::map< std::string, int > & operations_research::getMapDoubleControls ( )
static

Definition at line 509 of file xpress_interface.cc.

◆ getMapInt64Controls()

std::map< std::string, int > & operations_research::getMapInt64Controls ( )
static

Definition at line 831 of file xpress_interface.cc.

◆ getMapIntControls()

std::map< std::string, int > & operations_research::getMapIntControls ( )
static

Definition at line 594 of file xpress_interface.cc.

◆ getMapStringControls()

std::map< std::string, int > & operations_research::getMapStringControls ( )
static

Definition at line 494 of file xpress_interface.cc.

◆ GetMPModelOrPopulateResponse()

std::optional< LazyMutableCopy< MPModelProto > > operations_research::GetMPModelOrPopulateResponse ( LazyMutableCopy< MPModelRequest > & request,
MPSolutionResponse * response )

Same as ExtractValidMPModelOrPopulateResponseStatus() but if we already have ownership of the request, do not do any copy even when needed. Note that the MPModelProto in the request will be cleared in this case.

Extract the baseline model.

Note
we move it out of the request if we have ownership.

NOTE(user): This library needs to be portable, so we can't include file/base/helpers.h; see ../port/file.h.

Validate the baseline model.

If the baseline is valid and we have a model delta, validate the delta, then apply it.

Deal with errors.

Definition at line 693 of file model_validator.cc.

◆ getnodecnt()

int operations_research::getnodecnt ( const XPRSprob & mLp)

Definition at line 178 of file xpress_interface.cc.

◆ getnumcols()

int operations_research::getnumcols ( const XPRSprob & mLp)

Definition at line 160 of file xpress_interface.cc.

◆ getnumrows()

int operations_research::getnumrows ( const XPRSprob & mLp)

Definition at line 166 of file xpress_interface.cc.

◆ GetProcessMemoryUsage()

int64_t operations_research::GetProcessMemoryUsage ( )

GetProcessMemoryUsage.

Returns the memory usage of the process.

Definition at line 91 of file sysinfo.cc.

◆ GetSeed()

int32_t operations_research::GetSeed ( bool deterministic)

Random seed generator.

Definition at line 40 of file cvrptw_lib.cc.

◆ GetSimulatedAnnealingTemperatures()

std::pair< double, double > operations_research::GetSimulatedAnnealingTemperatures ( const RoutingModel & model,
const SimulatedAnnealingParameters & sa_params,
std::mt19937 * rnd )

Returns initial and final simulated annealing temperatures according to the given simulated annealing input parameters.

In the unlikely case there are no vehicles (i.e., we will end up with an "all unperformed" solution), we simply return 0.0 as initial and final temperatures.

Definition at line 1132 of file routing_ils.cc.

◆ getSolverVersion()

std::string operations_research::getSolverVersion ( XPRSprob const & prob)

XPRS_VERSION gives the version number as MAJOR*100 + RELEASE. It does not include the build number.

Definition at line 46 of file xpress_interface.cc.

◆ GlopSolveProto()

MPSolutionResponse operations_research::GlopSolveProto ( LazyMutableCopy< MPModelRequest > request,
std::atomic< bool > * interrupt_solve = nullptr,
std::function< void(const std::string &)> logging_callback = nullptr )

Solve the input LP model with the GLOP solver.

If possible, std::move the request into this function call to avoid a copy.

If you need to change the solver parameters, please use the EncodeParametersAsString() function to set the solver_specific_parameters field.

The optional interrupt_solve can be used to interrupt the solve early. It must only be set to true, never reset to false. It is also used internally by the solver that will set it to true for its own internal logic. As a consequence the caller should ignore the stored value and should not use the same atomic for different concurrent calls.

The optional logging_callback will be called when the GLOP parameter log_search_progress is set to true. Passing a callback will disable the default logging to INFO. Note though that by default the GLOP parameter log_to_stdout is true so even with a callback, the logs will appear on stdout too unless log_to_stdout is set to false. The enable_internal_solver_output in the request will act as the GLOP parameter log_search_progress.

Todo
(user): We do not support all the parameters here. In particular the logs before the solver is called will not be appended to the response. Fix that, and remove code duplication for the logger config. One way should be to not touch/configure anything if the logger is already created while calling SolveCpModel() and call a common config function from here or from inside Solve()?

Set it now so that it can be overwritten by the solver specific parameters.

See EncodeParametersAsString() documentation.

Model validation and delta handling.

Convert and clear the request and mp_model as it is no longer needed.

TimeLimit and interrupt solve.

Solve and set response status.

Fill in solution.

Definition at line 107 of file glop_proto_solver.cc.

◆ GlopSolverVersion()

std::string operations_research::GlopSolverVersion ( )

Returns a string that describes the version of the GLOP solver.

Definition at line 234 of file glop_proto_solver.cc.

◆ GlopToMPSolverConstraintStatus()

MPSolver::BasisStatus operations_research::GlopToMPSolverConstraintStatus ( glop::ConstraintStatus s)

Definition at line 91 of file glop_utils.cc.

◆ GlopToMPSolverResultStatus()

MPSolver::ResultStatus operations_research::GlopToMPSolverResultStatus ( glop::ProblemStatus s)

Note(user): MPSolver does not have the equivalent of INFEASIBLE_OR_UNBOUNDED however UNBOUNDED is almost never relevant in applications, so we decided to report this status as INFEASIBLE since it should almost always be the case. Historically, we where reporting ABNORMAL, but that was more confusing than helpful.

Todo
(user): We could argue that it is infeasible to find the optimal of an unbounded problem. So it might just be simpler to completely get rid of the MpSolver::UNBOUNDED status that seems to never be used programmatically.

Definition at line 18 of file glop_utils.cc.

◆ GlopToMPSolverVariableStatus()

MPSolver::BasisStatus operations_research::GlopToMPSolverVariableStatus ( glop::VariableStatus s)

Definition at line 57 of file glop_utils.cc.

◆ GLPKGatherInformationCallback()

void operations_research::GLPKGatherInformationCallback ( glp_tree * tree,
void * info )

Function to be called in the GLPK callback.

The best bound and the number of nodes change only when GLPK branches, generates cuts or finds an integer solution.

Get total number of nodes

Get best bound

Definition at line 63 of file glpk_interface.cc.

◆ GraphIsSymmetric()

template<class Graph>
bool util::GraphIsSymmetric ( const Graph & graph)

Create a reverse copy of the graph.

Compare the graph to its reverse, one adjacency list at a time.

Definition at line 228 of file util.h.

◆ GScipAddQuadraticObjectiveTerm()

absl::Status operations_research::GScipAddQuadraticObjectiveTerm ( GScip * gscip,
std::vector< SCIP_Var * > quadratic_variables1,
std::vector< SCIP_Var * > quadratic_variables2,
std::vector< double > quadratic_coefficients,
absl::string_view name = "" )
Warning
DO NOT CHANGE THE OBJECTIVE DIRECTION AFTER CALLING THIS METHOD.

This is implemented by modeling the quadratic term with an an inequality constraint and a single extra variable, which is then added to the objective. The inequality will be in the wrong direction if you change the objective direction after calling this method.

maximize z z <= Q(x, y) => 0 <= Q(x, y) - z <= inf

minimize z z >= Q(x, y) => 0 >= Q(x, y) - z >= -inf

Definition at line 150 of file gscip_ext.cc.

◆ GScipCatchCtrlC()

bool operations_research::GScipCatchCtrlC ( const GScipParameters & parameters)

Returns the misc/catchctrlc property; true if not set (the default SCIP behavior).

Definition at line 136 of file gscip_parameters.cc.

◆ GScipCatchCtrlCSet()

bool operations_research::GScipCatchCtrlCSet ( const GScipParameters & parameters)

Returns true when the misc/catchctrlc property is set.

Definition at line 143 of file gscip_parameters.cc.

◆ GScipCreateAbs()

absl::Status operations_research::GScipCreateAbs ( GScip * gscip,
SCIP_Var * x,
SCIP_Var * abs_x,
absl::string_view name = "" )

Adds the constraint y = abs(x). May create auxiliary variables. Supports unbounded x.

Definition at line 76 of file gscip_ext.cc.

◆ GScipCreateIndicatorRange()

absl::Status operations_research::GScipCreateIndicatorRange ( GScip * gscip,
const GScipIndicatorRangeConstraint & indicator_range,
absl::string_view name,
const GScipConstraintOptions & options )

Supports unbounded variables in indicator_range.range.variables.

want z -> lb <= a * x <=> z -> -lb >= -a * x

Definition at line 180 of file gscip_ext.cc.

◆ GScipCreateMaximum()

absl::Status operations_research::GScipCreateMaximum ( GScip * gscip,
const GScipLinearExpr & resultant,
absl::Span< const GScipLinearExpr > terms,
absl::string_view name = "" )

Adds the constraint resultant = maximum(terms). Supports unbounded variables in terms.

Todo
(user): it may be better to write this in terms of the disjuntive constraint, we need to support disjunctions in gscip.h to do this.

z_i in {0,1}, indicates if y = x_i

x_i <= y z_i => y <= x_i \sum_i z_i == 1

x_i <= y

z_i => y <= x_i

sum_i z_i = 1.

Definition at line 83 of file gscip_ext.cc.

◆ GScipCreateMinimum()

absl::Status operations_research::GScipCreateMinimum ( GScip * gscip,
const GScipLinearExpr & resultant,
absl::Span< const GScipLinearExpr > terms,
absl::string_view name = "" )

Adds the constraint resultant = minimum(terms). Supports unbounded variables in terms.

Definition at line 139 of file gscip_ext.cc.

◆ GScipDifference()

GScipLinearExpr operations_research::GScipDifference ( GScipLinearExpr left,
const GScipLinearExpr & right )

Returns left - right.

Definition at line 44 of file gscip_ext.cc.

◆ GScipLe()

GScipLinearRange operations_research::GScipLe ( const GScipLinearExpr left,
const GScipLinearExpr & right )

Returns the range -inf <= left.terms - right.terms <= right.offset - left.offset

Definition at line 63 of file gscip_ext.cc.

◆ GScipLogLevel()

int operations_research::GScipLogLevel ( const GScipParameters & parameters)

Definition at line 88 of file gscip_parameters.cc.

◆ GScipLogLevelSet()

bool operations_research::GScipLogLevelSet ( const GScipParameters & parameters)

Definition at line 93 of file gscip_parameters.cc.

◆ GScipMaxNumThreads()

int operations_research::GScipMaxNumThreads ( const GScipParameters & parameters)

Returns 1 if the number of threads it not specified.

Definition at line 70 of file gscip_parameters.cc.

◆ GScipMaxNumThreadsSet()

bool operations_research::GScipMaxNumThreadsSet ( const GScipParameters & parameters)

Definition at line 77 of file gscip_parameters.cc.

◆ GScipNegate()

GScipLinearExpr operations_research::GScipNegate ( GScipLinearExpr expr)

Returns -expr.

Definition at line 53 of file gscip_ext.cc.

◆ GScipOutput_Status_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::GScipOutput_Status_descriptor ( )

Definition at line 489 of file gscip.pb.cc.

◆ GScipOutput_Status_IsValid()

bool operations_research::GScipOutput_Status_IsValid ( int value)
inline

Definition at line 230 of file gscip.pb.h.

◆ GScipOutput_Status_Name() [1/2]

template<>
const ::std::string & operations_research::GScipOutput_Status_Name ( GScipOutput_Status value)
inline

Definition at line 243 of file gscip.pb.h.

◆ GScipOutput_Status_Name() [2/2]

template<typename T>
const ::std::string & operations_research::GScipOutput_Status_Name ( T value)

Definition at line 236 of file gscip.pb.h.

◆ GScipOutput_Status_Parse()

bool operations_research::GScipOutput_Status_Parse ( ::absl::string_view name,
GScipOutput_Status *PROTOBUF_NONNULL value )
inline

Definition at line 247 of file gscip.pb.h.

◆ GScipOutputEnabled()

bool operations_research::GScipOutputEnabled ( const GScipParameters & parameters)

Checks if the log level is equal to zero.

Definition at line 104 of file gscip_parameters.cc.

◆ GScipOutputEnabledSet()

bool operations_research::GScipOutputEnabledSet ( const GScipParameters & parameters)

Definition at line 109 of file gscip_parameters.cc.

◆ GScipParameters_Emphasis_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::GScipParameters_Emphasis_descriptor ( )

Definition at line 477 of file gscip.pb.cc.

◆ GScipParameters_Emphasis_IsValid()

bool operations_research::GScipParameters_Emphasis_IsValid ( int value)
inline

Definition at line 141 of file gscip.pb.h.

◆ GScipParameters_Emphasis_Name() [1/2]

template<>
const ::std::string & operations_research::GScipParameters_Emphasis_Name ( GScipParameters_Emphasis value)
inline

Definition at line 154 of file gscip.pb.h.

◆ GScipParameters_Emphasis_Name() [2/2]

template<typename T>
const ::std::string & operations_research::GScipParameters_Emphasis_Name ( T value)

Definition at line 147 of file gscip.pb.h.

◆ GScipParameters_Emphasis_Parse()

bool operations_research::GScipParameters_Emphasis_Parse ( ::absl::string_view name,
GScipParameters_Emphasis *PROTOBUF_NONNULL value )
inline

Definition at line 158 of file gscip.pb.h.

◆ GScipParameters_MetaParamValue_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::GScipParameters_MetaParamValue_descriptor ( )

Definition at line 483 of file gscip.pb.cc.

◆ GScipParameters_MetaParamValue_IsValid()

bool operations_research::GScipParameters_MetaParamValue_IsValid ( int value)
inline

Definition at line 179 of file gscip.pb.h.

◆ GScipParameters_MetaParamValue_Name() [1/2]

template<>
const ::std::string & operations_research::GScipParameters_MetaParamValue_Name ( GScipParameters_MetaParamValue value)
inline

Definition at line 192 of file gscip.pb.h.

◆ GScipParameters_MetaParamValue_Name() [2/2]

template<typename T>
const ::std::string & operations_research::GScipParameters_MetaParamValue_Name ( T value)

Definition at line 185 of file gscip.pb.h.

◆ GScipParameters_MetaParamValue_Parse()

bool operations_research::GScipParameters_MetaParamValue_Parse ( ::absl::string_view name,
GScipParameters_MetaParamValue *PROTOBUF_NONNULL value )
inline

Definition at line 196 of file gscip.pb.h.

◆ GScipRandomSeed()

int operations_research::GScipRandomSeed ( const GScipParameters & parameters)

Returns -1 if unset.

Definition at line 119 of file gscip_parameters.cc.

◆ GScipRandomSeedSet()

bool operations_research::GScipRandomSeedSet ( const GScipParameters & parameters)

Definition at line 126 of file gscip_parameters.cc.

◆ GScipSetCatchCtrlC()

void operations_research::GScipSetCatchCtrlC ( const bool catch_ctrl_c,
GScipParameters *const parameters )

Sets the misc/catchctrlc property.

Definition at line 130 of file gscip_parameters.cc.

◆ GScipSetLogLevel()

void operations_research::GScipSetLogLevel ( GScipParameters * parameters,
int log_level )

log_level must be in [0, 5], where 0 is none, 5 is most verbose, and the default is 4. CHECK fails on bad log_level. Default level displays standard search logs.

Definition at line 81 of file gscip_parameters.cc.

◆ GScipSetMaxNumThreads()

void operations_research::GScipSetMaxNumThreads ( int num_threads,
GScipParameters * parameters )

CHECK fails if num_threads < 1.

Definition at line 64 of file gscip_parameters.cc.

◆ GScipSetOutputEnabled()

void operations_research::GScipSetOutputEnabled ( GScipParameters * parameters,
bool output_enabled )

Sets the log level to 4 if enabled, 0 if disabled (see above).

Definition at line 97 of file gscip_parameters.cc.

◆ GScipSetRandomSeed()

void operations_research::GScipSetRandomSeed ( GScipParameters * parameters,
int random_seed )

Sets an initial seed (shift) for all pseudo-random number generators used within SCIP. Valid values are [0:INT_MAX] i.e. [0:2^31-1]. If an invalid value is passed, 0 would be stored instead.

Definition at line 113 of file gscip_parameters.cc.

◆ GScipSetTimeLimit()

void operations_research::GScipSetTimeLimit ( absl::Duration time_limit,
GScipParameters * parameters )

Definition at line 36 of file gscip_parameters.cc.

◆ GScipTimeLimit()

absl::Duration operations_research::GScipTimeLimit ( const GScipParameters & parameters)

Definition at line 45 of file gscip_parameters.cc.

◆ GScipTimeLimitSet()

bool operations_research::GScipTimeLimitSet ( const GScipParameters & parameters)

Definition at line 60 of file gscip_parameters.cc.

◆ GurobiDynamicLibraryPotentialPaths()

std::vector< std::string > operations_research::GurobiDynamicLibraryPotentialPaths ( )

Look for libraries pointed by GUROBI_HOME first.

Search for canonical places.

Definition at line 347 of file environment.cc.

◆ GurobiIsCorrectlyInstalled()

bool operations_research::GurobiIsCorrectlyInstalled ( )

This returns true if the Gurobi shared library is properly loaded (otherwise, tries to find it and load it) and if a Gurobi license can be obtained (it does that by trying to grab a license and then release it).

Definition at line 33 of file environment.cc.

◆ GurobiParamInfoForLogging()

std::string operations_research::GurobiParamInfoForLogging ( GRBenv * grb,
bool one_liner_output = false )

Returns a human-readable listing of all gurobi parameters that are set to non-default values, and their current value in the given environment. If all parameters are at their default value, returns the empty string. To produce a one-liner string, use one_liner_output=true.

This ensure that strcmp does not go beyond the end of the char array.

Definition at line 27 of file gurobi_util.cc.

◆ GurobiSolveProto()

absl::StatusOr< MPSolutionResponse > operations_research::GurobiSolveProto ( LazyMutableCopy< MPModelRequest > request,
GRBenv * gurobi_env = nullptr )

Solves the input request.

By default this function creates a new primary Gurobi environment, but an existing one can be passed as parameter. This can be useful with single-use Gurobi licenses since it is not possible to create a second environment if one already exists with those licenses.

Please note though that the provided environment should not be actively used by another thread at the same time.

We set gurobi_env to point to a new environment if no existing one is provided. We must make sure that we free this environment when we exit this function.

gurobi_env references ther GRBenv argument.

Set solution hints if any.

Using GRBaddrangeconstr for constraints that don't require it adds a slack which is not always removed by presolve.

If the presolve deletes all variables, there's no best bound.

NOTE, GurobiSolveProto() is exposed to external clients via MPSolver API, which assumes the solution values of integer variables are rounded to integer values.

Definition at line 275 of file gurobi_proto_solver.cc.

◆ Hash1() [1/7]

uint64_t operations_research::Hash1 ( const std::vector< int64_t > & ptrs)
inline

Definition at line 278 of file constraint_solveri.h.

◆ Hash1() [2/7]

template<class T>
uint64_t operations_research::Hash1 ( const std::vector< T * > & ptrs)

Definition at line 268 of file constraint_solveri.h.

◆ Hash1() [3/7]

uint64_t operations_research::Hash1 ( int value)
inline

Definition at line 256 of file constraint_solveri.h.

◆ Hash1() [4/7]

uint64_t operations_research::Hash1 ( int64_t value)
inline

Definition at line 252 of file constraint_solveri.h.

◆ Hash1() [5/7]

uint64_t operations_research::Hash1 ( uint32_t value)
inline

Definition at line 241 of file constraint_solveri.h.

◆ Hash1() [6/7]

uint64_t operations_research::Hash1 ( uint64_t value)
inline

Hash functions

Todo
(user): use murmurhash.

value = (value << 21) - value - 1;

value * 265

value * 21

Definition at line 230 of file constraint_solveri.h.

◆ Hash1() [7/7]

uint64_t operations_research::Hash1 ( void *const ptr)
inline

Definition at line 258 of file constraint_solveri.h.

◆ HighsSolveProto()

absl::StatusOr< MPSolutionResponse > operations_research::HighsSolveProto ( LazyMutableCopy< MPModelRequest > request)

Solve the input MIP model with the HIGHS solver.

Set model name.

Mark integrality.

Objective coefficients.

Variable names.

Hints.

Constraint names.

Logging.

Todo
(user): report feasible status.

Definition at line 48 of file highs_proto_solver.cc.

◆ IncrementalSort() [1/2]

template<class Iterator, class Compare = std::less<value_type_t<Iterator>>>
void operations_research::IncrementalSort ( int max_comparisons,
Iterator begin,
Iterator end,
Compare comp = Compare{},
bool is_stable = false )

Sorts the elements in the range [begin, end) in ascending order using the comp predicate. The order of equal elements is guaranteed to be preserved only if is_stable is true.

This function performs well if the elements in the range [begin, end) are almost sorted.

The algorithm operates as follows: 1) Check that the range [begin, end) is already sorted by performing a single iteration of bubble-sort. 2) Try to sort the range with insertion sort. Insertion sort will stop if it uses the comp predicate more than max_comparisons. Note that the algorithm may actually use the comp predicate more than max_comparisons in order to complete its current insertion. 3) If insertion sort exceeds the maximum number of comparisons, the range is sorted using std::stable_sort if is_stable is true or std::sort otherwise.

The first two steps of this algorithm are inspired by the ones recommended in Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.

Ranges of at most one element are already sorted.

Perform a single iteration of bubble-sort to place the smallest unsorted element to its correct position.

We know that the elements in the range [begin, last_sorted) are the smallest elements of [begin, end) and are sorted.

Stop if insertion sort was able to sort the range.

Definition at line 46 of file sort.h.

◆ IncrementalSort() [2/2]

template<class Iterator, class Compare = std::less<value_type_t<Iterator>>>
void operations_research::IncrementalSort ( Iterator begin,
Iterator end,
Compare comp = Compare{},
bool is_stable = false )

Sorts the elements in the range [begin, end) in ascending order using the comp predicate. The order of equal elements is guaranteed to be preserved only if is_stable is true.

This function performs well if the elements in the range [begin, end) are almost sorted.

Definition at line 129 of file sort.h.

◆ IndexRange()

template<class Index>
operations_research::IndexRange ( Index a,
Index b ) -> IndexRange< Index >

Additional deduction guide.

◆ initXpressEnv()

bool operations_research::initXpressEnv ( bool verbose,
int xpress_oem_license_key )

! init XPRESS environment.

if not an OEM key

XPRSbanner informs about Xpress version, options and error messages

if OEM key

get the license error message

Definition at line 286 of file environment.cc.

◆ InputContainsNan()

bool operations_research::InputContainsNan ( absl::Span< const std::vector< double > > input)

Definition at line 643 of file hungarian.cc.

◆ InsertionSort()

template<class Iterator, class Compare = std::less<value_type_t<Iterator>>>
void operations_research::InsertionSort ( Iterator begin,
Iterator end,
Compare comp = Compare{} )

Sorts the elements in the range [begin, end) in ascending order using the comp predicate. The order of equal elements is guaranteed to be preserved.

This function performs well if the elements in the range [begin, end) are almost sorted.

This algorithm is inspired by the ones recommended in Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.

Ranges of at most one element are already sorted.

Perform a single iteration of bubble-sort to place the smallest unsorted element to its correct position.

We know that the elements in the range [begin, last_sorted) are the smallest elements of [begin, end) and are sorted.

Definition at line 95 of file sort.h.

◆ InsertOrUpdateEntry()

template<class NodeIndex, NodeIndex kNilNode>
bool operations_research::InsertOrUpdateEntry ( PathDistance distance,
NodeEntry< NodeIndex, kNilNode > * entry,
AdjustablePriorityQueue< NodeEntry< NodeIndex, kNilNode > > * priority_queue )

Updates an entry with the given distance if it's shorter, and then inserts it in the priority queue (or updates it if it's there already), if needed. Returns true if the entry was modified, false otherwise.

If one wants to use int64_t for either priority or NodeIndex, one should consider using packed ints (putting the two bools with heap_index, for example) in order to stay at 16 bytes instead of 24.

Definition at line 596 of file shortest_paths.h.

◆ InstallDemonProfiler()

void operations_research::InstallDemonProfiler ( DemonProfiler * monitor)
extern

--— Forward Declarations and Profiling Support --—

--— Exported Functions --—

Definition at line 443 of file demon_profiler.cc.

◆ InstallLocalSearchProfiler()

void operations_research::InstallLocalSearchProfiler ( LocalSearchProfiler * monitor)
extern

Definition at line 3745 of file local_search.cc.

◆ Int64ToStr()

std::string operations_research::Int64ToStr ( int64_t number)

Definition at line 3195 of file routing_lp_scheduling.cc.

◆ InternalSaveBooleanVarValue()

void operations_research::InternalSaveBooleanVarValue ( Solver *const solver,
IntVar *const var )

Definition at line 965 of file constraint_solver.cc.

◆ Interpolate()

template<typename FloatType>
FloatType operations_research::Interpolate ( FloatType x,
FloatType y,
FloatType alpha )
inline

Returns alpha * x + (1 - alpha) * y.

Definition at line 252 of file fp_utils.h.

◆ interruptXPRESS()

void operations_research::interruptXPRESS ( XPRSprob & xprsProb,
CUSTOM_INTERRUPT_REASON reason )

Reason values below 1000 are reserved by XPRESS

Definition at line 203 of file xpress_interface.cc.

◆ IntervalDown32()

uint32_t operations_research::IntervalDown32 ( uint32_t s)
inline

Definition at line 319 of file bitset.h.

◆ IntervalDown64()

uint64_t operations_research::IntervalDown64 ( uint64_t s)
inline

Returns a word with the s most significant bits unset.

Definition at line 314 of file bitset.h.

◆ IntervalsAreSortedAndNonAdjacent()

bool operations_research::IntervalsAreSortedAndNonAdjacent ( absl::Span< const ClosedInterval > intervals)

Returns true iff we have:

  • The intervals appear in increasing order.
  • for all i: intervals[i].start <= intervals[i].end (should always be true, by construction, but bad intervals can in practice escape detection in opt mode).
  • for all i but the last: intervals[i].end + 1 < intervals[i+1].start

First test make sure that intervals[i - 1].end + 1 will not overflow.

Definition at line 41 of file sorted_interval_list.cc.

◆ IntervalUp32()

uint32_t operations_research::IntervalUp32 ( uint32_t s)
inline

Definition at line 308 of file bitset.h.

◆ IntervalUp64()

uint64_t operations_research::IntervalUp64 ( uint64_t s)
inline

Returns a word with s least significant bits unset.

Definition at line 303 of file bitset.h.

◆ IsAligned()

template<size_t alignment_bytes, typename Value>
bool operations_research::IsAligned ( Value * ptr)
inline

Returns true when ptr is aligned to alignment_bytes bytes.

Definition at line 64 of file aligned_memory.h.

◆ IsArrayBoolean()

template<class T>
bool operations_research::IsArrayBoolean ( const std::vector< T > & values)

Definition at line 4211 of file constraint_solveri.h.

◆ IsArrayConstant()

template<class T>
bool operations_research::IsArrayConstant ( const std::vector< T > & values,
const T & value )

Definition at line 4201 of file constraint_solveri.h.

◆ IsArrayInRange()

template<class T>
bool operations_research::IsArrayInRange ( const std::vector< IntVar * > & vars,
T range_min,
T range_max )

Definition at line 4291 of file constraint_solveri.h.

◆ IsBitSet32()

bool operations_research::IsBitSet32 ( const uint32_t *const bitset,
uint32_t pos )
inline

Definition at line 352 of file bitset.h.

◆ IsBitSet64()

bool operations_research::IsBitSet64 ( const uint64_t *const bitset,
uint64_t pos )
inline

Returns true if the bit pos is set in bitset.

Definition at line 349 of file bitset.h.

◆ IsEmptyRange32()

bool operations_research::IsEmptyRange32 ( const uint32_t * bitset,
uint32_t start,
uint32_t end )

◆ IsEmptyRange64()

bool operations_research::IsEmptyRange64 ( const uint64_t * bitset,
uint64_t start,
uint64_t end )

Returns true if no bits are set in bitset between start and end.

◆ IsEulerianGraph()

template<typename Graph>
bool operations_research::IsEulerianGraph ( const Graph & graph,
bool assume_connectivity = true )

Returns true if a graph is Eulerian, aka all its nodes are of even degree.

Definition at line 45 of file eulerian_path.h.

◆ IsIncreasing()

template<class T>
bool operations_research::IsIncreasing ( const std::vector< T > & values)

Definition at line 4281 of file constraint_solveri.h.

◆ IsIncreasingContiguous()

template<class T>
bool operations_research::IsIncreasingContiguous ( const std::vector< T > & values)

Definition at line 4271 of file constraint_solveri.h.

◆ IsIntegerWithinTolerance()

template<typename FloatType>
bool operations_research::IsIntegerWithinTolerance ( FloatType x,
FloatType tolerance )
inline

Returns true if x is within tolerance of any integer. Always returns false for x equal to +/- infinity.

Definition at line 173 of file fp_utils.h.

◆ IsPositiveOrNegativeInfinity()

template<typename FloatType>
bool operations_research::IsPositiveOrNegativeInfinity ( FloatType x)
inline

Definition at line 118 of file fp_utils.h.

◆ IsSemiEulerianGraph()

template<typename NodeIndex, typename Graph>
bool operations_research::IsSemiEulerianGraph ( const Graph & graph,
std::vector< NodeIndex > * odd_nodes,
bool assume_connectivity = true )

Returns true if a graph is Semi-Eulerian, aka at most two of its nodes are of odd degree. odd_nodes is filled with odd nodes of the graph.

Definition at line 59 of file eulerian_path.h.

◆ IsSmallerWithinTolerance()

template<typename FloatType>
bool operations_research::IsSmallerWithinTolerance ( FloatType x,
FloatType y,
FloatType tolerance )

Returns true if x is less than y or slighlty greater than y with the given absolute or relative tolerance.

Definition at line 164 of file fp_utils.h.

◆ IterableContainer()

template<typename T>
operations_research::IterableContainer ( const T & data_source) -> IterableContainer< T >

Additional deduction guide.

◆ JoinDebugString()

template<class T>
std::string operations_research::JoinDebugString ( const std::vector< T > & v,
absl::string_view separator )

Join v[i].DebugString().

Converts a vector into a string by calling the given method (or simply getting the given string member), on all elements, and concatenating the obtained strings with the given separator.

Definition at line 40 of file string_array.h.

◆ JoinDebugStringPtr()

template<class T>
std::string operations_research::JoinDebugStringPtr ( const std::vector< T > & v,
absl::string_view separator )

Join v[i]->DebugString().

Definition at line 47 of file string_array.h.

◆ JoinNameFieldPtr()

template<class T>
std::string operations_research::JoinNameFieldPtr ( const std::vector< T > & v,
absl::string_view separator )

Join v[i]->name.

Definition at line 60 of file string_array.h.

◆ JoinNamePtr()

template<class T>
std::string operations_research::JoinNamePtr ( const std::vector< T > & v,
absl::string_view separator )

Join v[i]->name().

Definition at line 54 of file string_array.h.

◆ kNotFound()

SubsetIndex operations_research::kNotFound ( - 1)
constexpr

◆ KShortestPathsOnDag()

std::vector< PathWithLength > operations_research::KShortestPathsOnDag ( int num_nodes,
absl::Span< const ArcWithLength > arcs_with_length,
int source,
int destination,
int path_count )

Returns the k-shortest paths by increasing length. Returns fewer than k paths if there are fewer than k paths from the source to the destination. Returns {{+inf, {}, {}}} if there is no path of finite length from the source to the destination. Dies if arcs_with_length has a cycle.

Definition at line 105 of file dag_shortest_path.cc.

◆ LeastSignificantBitPosition32() [1/2]

int operations_research::LeastSignificantBitPosition32 ( const uint32_t * bitset,
uint32_t start,
uint32_t end )

◆ LeastSignificantBitPosition32() [2/2]

int operations_research::LeastSignificantBitPosition32 ( uint32_t n)
inline

Definition at line 185 of file bitset.h.

◆ LeastSignificantBitPosition32DeBruijn()

int operations_research::LeastSignificantBitPosition32DeBruijn ( uint32_t n)
inline

Definition at line 147 of file bitset.h.

◆ LeastSignificantBitPosition32Default()

int operations_research::LeastSignificantBitPosition32Default ( uint32_t n)
inline

Definition at line 156 of file bitset.h.

◆ LeastSignificantBitPosition64() [1/2]

int64_t operations_research::LeastSignificantBitPosition64 ( const uint64_t * bitset,
uint64_t start,
uint64_t end )

Returns the first bit set in bitset between start and max_bit.

◆ LeastSignificantBitPosition64() [2/2]

int operations_research::LeastSignificantBitPosition64 ( uint64_t n)
inline

Definition at line 130 of file bitset.h.

◆ LeastSignificantBitPosition64DeBruijn()

int operations_research::LeastSignificantBitPosition64DeBruijn ( uint64_t n)
inline

initialized by 'kTab[(kSeq << i) >> 58] = i

Definition at line 84 of file bitset.h.

◆ LeastSignificantBitPosition64Default()

int operations_research::LeastSignificantBitPosition64Default ( uint64_t n)
inline

Definition at line 96 of file bitset.h.

◆ LeastSignificantBitWord32()

uint32_t operations_research::LeastSignificantBitWord32 ( uint32_t n)
inline

Definition at line 67 of file bitset.h.

◆ LeastSignificantBitWord64()

uint64_t operations_research::LeastSignificantBitWord64 ( uint64_t n)
inline

Returns a word with only the least significant bit of n set.

Definition at line 66 of file bitset.h.

◆ LegacyScipSetSolverSpecificParameters()

absl::Status operations_research::LegacyScipSetSolverSpecificParameters ( absl::string_view parameters,
SCIP * scip )

Definition at line 35 of file legacy_scip_params.cc.

◆ LinearConstraintIsViolated()

bool operations_research::LinearConstraintIsViolated ( const ScipConstraintHandlerContext & context,
const LinearRange & constraint )

Definition at line 101 of file scip_callback.cc.

◆ LinkVarExpr()

void operations_research::LinkVarExpr ( Solver * s,
IntExpr * expr,
IntVar * var )

--— IntExprElement --—

-------— BaseIntExpr ------—

Definition at line 7458 of file expressions.cc.

◆ LoadGurobiDynamicLibrary()

absl::Status operations_research::LoadGurobiDynamicLibrary ( std::vector< absl::string_view > potential_paths)

clang-format off Force the loading of the gurobi dynamic library. It returns true if the library was successfully loaded. This method can only be called once. Successive calls are no-op.

Note
it does not check if a token license can be grabbed.

Definition at line 420 of file environment.cc.

◆ LoadGurobiFunctions()

void operations_research::LoadGurobiFunctions ( DynamicLibrary * gurobi_dynamic_library)

This was generated with the parse_header.py script. See the comment at the top of the script.

This is the 'assign' section.

Definition at line 234 of file environment.cc.

◆ LoadXpressDynamicLibrary()

absl::Status operations_research::LoadXpressDynamicLibrary ( std::string & xpresspath)

Force the loading of the xpress dynamic library. It returns true if the library was successfully loaded. This method can only be called once. Successive calls are no-op.

Note
it does not check if a token license can be grabbed.

Definition at line 244 of file environment.cc.

◆ LoadXpressFunctions()

void operations_research::LoadXpressFunctions ( DynamicLibrary * xpress_dynamic_library)

clang-format on NOLINTEND(google3-runtime-global-variables) NOLINTEND(whitespace/line_length)

This was generated with the parse_header_xpress.py script. See the comment at the top of the script.

This is the 'assign' section. NOLINTBEGIN(whitespace/line_length) clang-format off

clang-format on NOLINTEND(whitespace/line_length)

Definition at line 117 of file environment.cc.

◆ LocalBfs()

void operations_research::LocalBfs ( const ::util::StaticGraph< int, int > & graph,
int source,
int stop_after_num_nodes,
std::vector< int > * visited,
std::vector< int > * num_within_radius,
std::vector< bool > * tmp_mask )

Runs a Breadth-First-Search locally: it stops when we settled the given number of nodes, though it will finish the current radius. visited will contain either the full connected components, or all the nodes with distance ≤ R+1 from the source, where R is the radius where we stopped. num_within_radius contains the increasing number of nodes within distance 0, 1, .., R+1 of the source.

We already know all the nodes at the next distance.

Clean up 'tmp_mask' sparsely.

If we explored the whole connected component, num_within_radius contains a spurious entry: remove it.

Parameters
tmp_maskFor performance, the user provides us with an already- allocated bitmask of size graph.num_nodes() with all values set to "false", which we'll restore in the same state upon return.

Definition at line 78 of file find_graph_symmetries.cc.

◆ LocalOptimumReached()

bool operations_research::LocalOptimumReached ( Search * search)

Returns true if a local optimum has been reached and cannot be improved.

Utility methods to ensure the communication between local search and the search.

Definition at line 1378 of file constraint_solver.cc.

◆ LocalSearchMetaheuristic_Value_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::LocalSearchMetaheuristic_Value_descriptor ( )

Definition at line 159 of file routing_enums.pb.cc.

◆ LocalSearchMetaheuristic_Value_IsValid()

bool operations_research::LocalSearchMetaheuristic_Value_IsValid ( int value)
inline

Definition at line 163 of file routing_enums.pb.h.

◆ LocalSearchMetaheuristic_Value_Name() [1/2]

template<>
const ::std::string & operations_research::LocalSearchMetaheuristic_Value_Name ( LocalSearchMetaheuristic_Value value)
inline

Definition at line 176 of file routing_enums.pb.h.

◆ LocalSearchMetaheuristic_Value_Name() [2/2]

template<typename T>
const ::std::string & operations_research::LocalSearchMetaheuristic_Value_Name ( T value)

Definition at line 169 of file routing_enums.pb.h.

◆ LocalSearchMetaheuristic_Value_Parse()

bool operations_research::LocalSearchMetaheuristic_Value_Parse ( ::absl::string_view name,
LocalSearchMetaheuristic_Value *PROTOBUF_NONNULL value )
inline

Definition at line 180 of file routing_enums.pb.h.

◆ log_full_license_error()

void operations_research::log_full_license_error ( int code,
const std::string & xpress_lib_dir )

Definition at line 366 of file environment.cc.

◆ log_message_about_XPRSinit_argument()

void operations_research::log_message_about_XPRSinit_argument ( )

Definition at line 377 of file environment.cc.

◆ LogCostAndTiming() [1/2]

void operations_research::LogCostAndTiming ( const absl::string_view problem_name,
absl::string_view alg_name,
const SetCoverInvariant & inv,
int64_t run_time )

Definition at line 141 of file set_cover_solve.cc.

◆ LogCostAndTiming() [2/2]

void operations_research::LogCostAndTiming ( const SetCoverSolutionGenerator & generator)

Definition at line 149 of file set_cover_solve.cc.

◆ LogStats()

void operations_research::LogStats ( const SetCoverModel & model)

Lines start with a comma to make it easy to copy-paste the output to a spreadsheet as CSV.

Definition at line 117 of file set_cover_solve.cc.

◆ MakeActive() [1/2]

LocalSearchOperator * operations_research::MakeActive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
NeighborAccessor get_incoming_neighbors,
NeighborAccessor get_outgoing_neighbors )

Definition at line 817 of file local_search.cc.

◆ MakeActive() [2/2]

LocalSearchOperator * operations_research::MakeActive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::function< const std::vector< int > &(int, int)> get_incoming_neighbors = nullptr,
std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors = nullptr )

--— MakeActive --—

MakeActive inserts an inactive node into a path. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are: 1 -> 5 -> 2 -> 3 -> 4 1 -> 2 -> 5 -> 3 -> 4 1 -> 2 -> 3 -> 5 -> 4

◆ MakeActiveAndRelocate()

LocalSearchOperator * operations_research::MakeActiveAndRelocate ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class )

--— MakeActiveAndRelocate --—

MakeActiveAndRelocate makes a node active next to a node being relocated. Possible neighbor for paths 0 -> 4, 1 -> 2 -> 5 and 3 inactive is: 0 -> 3 -> 2 -> 4, 1 -> 5.

Definition at line 989 of file local_search.cc.

◆ MakeActiveNodeGroupFilter()

IntVarLocalSearchFilter * operations_research::MakeActiveNodeGroupFilter ( const RoutingModel & routing_model)

Returns a filter ensuring that all nodes in a same activity group have the same activity.

Definition at line 312 of file routing_filters.cc.

◆ MakeAllUnperformed()

DecisionBuilder * operations_research::MakeAllUnperformed ( RoutingModel * model)

Returns a DecisionBuilder making all nodes unperformed.

Definition at line 5453 of file routing_search.cc.

◆ MakeBareIntToIntFunction()

RangeIntToIntFunction * operations_research::MakeBareIntToIntFunction ( std::function< int64_t(int64_t)> f)

A copy of f is going to be stored in the returned object, so its closure should remain intact as long as the returned object is being used.

Definition at line 225 of file range_query_function.cc.

◆ MakeBinCapacities()

std::unique_ptr< BinCapacities > operations_research::MakeBinCapacities ( const std::vector< RoutingDimension * > & dimensions,
const PathsMetadata & paths_metadata )

If the dimension is not unary, skip.

If the dimension has no constant-signed transit evaluator, skip.

For each vehicle, if the sign of its evaluator is constant, set a transit evaluator to pass to BinCapacities.

Vehicle load changes monotonically along the route. If transit signs are >= 0, the min load is at start, the max at end. If transit signs are <= 0, the max load is at start, the min at end. The encoding into BinCapacities associates a bin dimension with this routing dimension, with bin capacity = vehicle capacity - min load, and bin item size = abs(transit(node)).

Definition at line 5404 of file routing.cc.

◆ MakeCachedIntToIntFunction()

RangeIntToIntFunction * operations_research::MakeCachedIntToIntFunction ( const std::function< int64_t(int64_t)> & f,
int64_t domain_start,
int64_t domain_end )

It is assumed that f is defined over the interval [domain_start, domain_end). The function scans f once and it is safe to destroy f and its closure after MakeCachedIntToIntFunction returns.

Definition at line 230 of file range_query_function.cc.

◆ MakeCachedRangeMinMaxIndexFunction()

RangeMinMaxIndexFunction * operations_research::MakeCachedRangeMinMaxIndexFunction ( const std::function< int64_t(int64_t)> & f,
int64_t domain_start,
int64_t domain_end )

It is safe to destroy the first argument and its closure after MakeCachedRangeMinMaxIndexFunction returns.

Definition at line 236 of file range_query_function.cc.

◆ MakeChainInactive()

LocalSearchOperator * operations_research::MakeChainInactive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class )

--— MakeChainInactive --—

Operator which makes a "chain" of path nodes inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are first and last nodes of the path) are: 1 -> 3 -> 4 with 2 inactive 1 -> 2 -> 4 with 3 inactive 1 -> 4 with 2 and 3 inactive

Definition at line 1121 of file local_search.cc.

◆ MakeConstraintDemon0()

template<class T>
Demon * operations_research::MakeConstraintDemon0 ( Solver *const s,
T *const ct,
void(T::* method )(),
const std::string & name )

Definition at line 535 of file constraint_solveri.h.

◆ MakeConstraintDemon1()

template<class T, class P>
Demon * operations_research::MakeConstraintDemon1 ( Solver *const s,
T *const ct,
void(T::* method )(P),
const std::string & name,
P param1 )

Definition at line 576 of file constraint_solveri.h.

◆ MakeConstraintDemon2()

template<class T, class P, class Q>
Demon * operations_research::MakeConstraintDemon2 ( Solver *const s,
T *const ct,
void(T::* method )(P, Q),
const std::string & name,
P param1,
Q param2 )

Definition at line 614 of file constraint_solveri.h.

◆ MakeConstraintDemon3()

template<class T, class P, class Q, class R>
Demon * operations_research::MakeConstraintDemon3 ( Solver *const s,
T *const ct,
void(T::* method )(P, Q, R),
const std::string & name,
P param1,
Q param2,
R param3 )

Definition at line 657 of file constraint_solveri.h.

◆ MakeCPFeasibilityFilter()

IntVarLocalSearchFilter * operations_research::MakeCPFeasibilityFilter ( RoutingModel * routing_model)

Returns a filter checking the current solution using CP propagation.

Definition at line 3487 of file routing_filters.cc.

◆ MakeCross() [1/2]

LocalSearchOperator * operations_research::MakeCross ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
NeighborAccessor get_incoming_neighbors,
NeighborAccessor get_outgoing_neighbors )

Definition at line 716 of file local_search.cc.

◆ MakeCross() [2/2]

LocalSearchOperator * operations_research::MakeCross ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::function< const std::vector< int > &(int, int)> get_incoming_neighbors = nullptr,
std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors = nullptr )

--— Cross --—

Cross echanges the starting chains of 2 paths, including exchanging the whole paths. First and last nodes are not moved. Possible neighbors for the paths 1 -> 2 -> 3 -> 4 -> 5 and 6 -> 7 -> 8 (where (1, 5) and (6, 8) are first and last nodes of the paths and can therefore not be moved): 1 -> 7 -> 3 -> 4 -> 5 6 -> 2 -> 8 1 -> 7 -> 4 -> 5 6 -> 2 -> 3 -> 8 1 -> 7 -> 5 6 -> 2 -> 3 -> 4 -> 8

◆ MakeCumulBoundsPropagatorFilter()

IntVarLocalSearchFilter * operations_research::MakeCumulBoundsPropagatorFilter ( const RoutingDimension & dimension)

Returns a filter handling dimension cumul bounds.

Definition at line 2796 of file routing_filters.cc.

◆ MakeDelayedConstraintDemon0()

template<class T>
Demon * operations_research::MakeDelayedConstraintDemon0 ( Solver *const s,
T *const ct,
void(T::* method )(),
const std::string & name )

Definition at line 697 of file constraint_solveri.h.

◆ MakeDelayedConstraintDemon1()

template<class T, class P>
Demon * operations_research::MakeDelayedConstraintDemon1 ( Solver *const s,
T *const ct,
void(T::* method )(P),
const std::string & name,
P param1 )

Definition at line 733 of file constraint_solveri.h.

◆ MakeDelayedConstraintDemon2()

template<class T, class P, class Q>
Demon * operations_research::MakeDelayedConstraintDemon2 ( Solver *const s,
T *const ct,
void(T::* method )(P, Q),
const std::string & name,
P param1,
Q param2 )

Definition at line 777 of file constraint_solveri.h.

◆ MakeDifferentFromValues()

Constraint * operations_research::MakeDifferentFromValues ( Solver * solver,
IntVar * var,
std::vector< int64_t > values )

Definition at line 60 of file routing_constraints.cc.

◆ MakeDimensionFilter()

LocalSearchFilter * operations_research::MakeDimensionFilter ( Solver * solver,
std::unique_ptr< DimensionChecker > checker,
absl::string_view dimension_name )

Make a filter that translates solver events to the input checker's interface. Since DimensionChecker has a PathState, the filter returned by this must be synchronized to the corresponding PathStateFilter:

  • Relax() must be called after the PathStateFilter's.
  • Accept() must be called after.
  • Synchronize() must be called before.
  • Revert() must be called before.

Definition at line 4225 of file routing_filters.cc.

◆ MakeExchange() [1/2]

LocalSearchOperator * operations_research::MakeExchange ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
NeighborAccessor get_incoming_neighbors,
NeighborAccessor get_outgoing_neighbors )

Definition at line 600 of file local_search.cc.

◆ MakeExchange() [2/2]

LocalSearchOperator * operations_research::MakeExchange ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::function< const std::vector< int > &(int, int)> get_incoming_neighbors = nullptr,
std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors = nullptr )

--— Exchange --—

Exchanges the positions of two nodes. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5 (where (1, 5) are first and last nodes of the path and can therefore not be moved): 1 -> 3 -> 2 -> 4 -> 5 1 -> 4 -> 3 -> 2 -> 5 1 -> 2 -> 4 -> 3 -> 5

◆ MakeExchangeSubtrip() [1/2]

LocalSearchOperator * operations_research::MakeExchangeSubtrip ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
absl::Span< const PickupDeliveryPair > pairs )

Definition at line 1841 of file routing_neighborhoods.cc.

◆ MakeExchangeSubtrip() [2/2]

LocalSearchOperator * operations_research::MakeExchangeSubtrip ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::function< const std::vector< int > &(int, int)> get_incoming_neighbors,
std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors,
absl::Span< const PickupDeliveryPair > pairs )

Definition at line 1822 of file routing_neighborhoods.cc.

◆ MakeExtendedSwapActive()

LocalSearchOperator * operations_research::MakeExtendedSwapActive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class )

--— ExtendedSwapActive --—

ExtendedSwapActive makes an inactive node active and an active one inactive. It is similar to SwapActiveOperator excepts that it tries to insert the inactive node in all possible positions instead of just the position of the node made inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are: 1 -> 5 -> 3 -> 4 & 2 inactive 1 -> 3 -> 5 -> 4 & 2 inactive 1 -> 5 -> 2 -> 4 & 3 inactive 1 -> 2 -> 5 -> 4 & 3 inactive

Definition at line 1295 of file local_search.cc.

◆ MakeGlobalLPCumulFilter()

IntVarLocalSearchFilter * operations_research::MakeGlobalLPCumulFilter ( GlobalDimensionCumulOptimizer * lp_optimizer,
GlobalDimensionCumulOptimizer * mp_optimizer,
bool filter_objective_cost )

Returns a filter checking global linear constraints and costs.

Definition at line 2953 of file routing_filters.cc.

◆ MakeGroupPairAndRelocate() [1/2]

LocalSearchOperator * operations_research::MakeGroupPairAndRelocate ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
const std::vector< PickupDeliveryPair > & pairs )

Definition at line 679 of file routing_neighborhoods.cc.

◆ MakeGroupPairAndRelocate() [2/2]

LocalSearchOperator * operations_research::MakeGroupPairAndRelocate ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::function< const std::vector< int > &(int, int)> get_incoming_neighbors,
std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors,
const std::vector< PickupDeliveryPair > & pairs )

Definition at line 659 of file routing_neighborhoods.cc.

◆ MakeHamiltonianPathSolver()

template<typename CostType, typename CostFunction>
HamiltonianPathSolver< CostType, CostFunction > operations_research::MakeHamiltonianPathSolver ( int num_nodes,
CostFunction cost )

Utility function to simplify building a HamiltonianPathSolver from a functor.

Definition at line 604 of file hamiltonian_path.h.

◆ MakeInactive()

LocalSearchOperator * operations_research::MakeInactive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class )

--— MakeInactive --—

MakeInactive makes path nodes inactive. Possible neighbors for the path 1 -> 2 -> 3 -> 4 (where 1 and 4 are first and last nodes of the path) are: 1 -> 3 -> 4 & 2 inactive 1 -> 2 -> 4 & 3 inactive

Definition at line 1021 of file local_search.cc.

◆ MakeIndexPairSwapActive()

LocalSearchOperator * operations_research::MakeIndexPairSwapActive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
const std::vector< PickupDeliveryPair > & pairs )

Definition at line 1285 of file routing_neighborhoods.cc.

◆ MakeLightPairRelocate() [1/2]

LocalSearchOperator * operations_research::MakeLightPairRelocate ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
const std::vector< PickupDeliveryPair > & pairs,
std::function< bool(int64_t)> force_lifo )

Definition at line 807 of file routing_neighborhoods.cc.

◆ MakeLightPairRelocate() [2/2]

LocalSearchOperator * operations_research::MakeLightPairRelocate ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::function< const std::vector< int > &(int, int)> get_incoming_neighbors,
std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors,
const std::vector< PickupDeliveryPair > & pairs,
std::function< bool(int64_t)> force_lifo )

Definition at line 787 of file routing_neighborhoods.cc.

◆ MakeLightVehicleBreaksFilter()

LocalSearchFilter * operations_research::MakeLightVehicleBreaksFilter ( Solver * solver,
std::unique_ptr< LightVehicleBreaksChecker > checker,
absl::string_view dimension_name )

Definition at line 4354 of file routing_filters.cc.

◆ MakeLinKernighan()

LocalSearchOperator * operations_research::MakeLinKernighan ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
const Solver::IndexEvaluator3 & evaluator,
bool topt )

--— Lin-Kernighan --—

Definition at line 1790 of file local_search.cc.

◆ MakeMaxActiveVehiclesFilter()

IntVarLocalSearchFilter * operations_research::MakeMaxActiveVehiclesFilter ( const RoutingModel & routing_model)

Returns a filter ensuring that max active vehicles constraints are enforced.

Definition at line 219 of file routing_filters.cc.

◆ MakeNeighborAcceptanceCriterion()

std::unique_ptr< NeighborAcceptanceCriterion > operations_research::MakeNeighborAcceptanceCriterion ( const RoutingModel & model,
const RoutingSearchParameters & parameters,
std::mt19937 * rnd )

Returns a neighbor acceptance criterion based on the given parameters.

Definition at line 1116 of file routing_ils.cc.

◆ MakeNodeDisjunctionFilter()

IntVarLocalSearchFilter * operations_research::MakeNodeDisjunctionFilter ( const RoutingModel & routing_model,
bool filter_cost )

Returns a filter ensuring that node disjunction constraints are enforced.

Definition at line 469 of file routing_filters.cc.

◆ MakePairActive()

LocalSearchOperator * operations_research::MakePairActive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
const std::vector< PickupDeliveryPair > & pairs )

Definition at line 474 of file routing_neighborhoods.cc.

◆ MakePairExchange() [1/2]

LocalSearchOperator * operations_research::MakePairExchange ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
const std::vector< PickupDeliveryPair > & pairs )

Definition at line 939 of file routing_neighborhoods.cc.

◆ MakePairExchange() [2/2]

LocalSearchOperator * operations_research::MakePairExchange ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::function< const std::vector< int > &(int, int)> get_incoming_neighbors,
std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors,
const std::vector< PickupDeliveryPair > & pairs )

Definition at line 920 of file routing_neighborhoods.cc.

◆ MakePairExchangeRelocate()

LocalSearchOperator * operations_research::MakePairExchangeRelocate ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
const std::vector< PickupDeliveryPair > & pairs )

Definition at line 1099 of file routing_neighborhoods.cc.

◆ MakePairInactive()

LocalSearchOperator * operations_research::MakePairInactive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
const std::vector< PickupDeliveryPair > & pairs )

Definition at line 511 of file routing_neighborhoods.cc.

◆ MakePairNodeSwapActive()

template<bool swap_first>
LocalSearchOperator * operations_research::MakePairNodeSwapActive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
const std::vector< PickupDeliveryPair > & pairs )

Definition at line 791 of file routing_neighborhoods.h.

◆ MakePairRelocate()

LocalSearchOperator * operations_research::MakePairRelocate ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
const std::vector< PickupDeliveryPair > & pairs )

Definition at line 607 of file routing_neighborhoods.cc.

◆ MakePathCumulFilter()

IntVarLocalSearchFilter * operations_research::MakePathCumulFilter ( const RoutingDimension & dimension,
bool propagate_own_objective_value,
bool filter_objective_cost,
bool may_use_optimizers )

Returns a filter handling dimension costs and constraints.

Definition at line 2216 of file routing_filters.cc.

◆ MakePathEnergyCostFilter()

LocalSearchFilter * operations_research::MakePathEnergyCostFilter ( Solver * solver,
std::unique_ptr< PathEnergyCostChecker > checker,
absl::string_view dimension_name )

Definition at line 4807 of file routing_filters.cc.

◆ MakePathLns()

LocalSearchOperator * operations_research::MakePathLns ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
int number_of_chunks,
int chunk_size,
bool unactive_fragments )

--— Path-based Large Neighborhood Search --—

Breaks "number_of_chunks" chains of "chunk_size" arcs, and deactivate all inactive nodes if "unactive_fragments" is true. As a special case, if chunk_size=0, then we break full paths.

Definition at line 1876 of file local_search.cc.

◆ MakePathSpansAndTotalSlacks()

Constraint * operations_research::MakePathSpansAndTotalSlacks ( const RoutingDimension * dimension,
std::vector< IntVar * > spans,
std::vector< IntVar * > total_slacks )

For every vehicle of the routing model:

  • if total_slacks[vehicle] is not nullptr, constrains it to be the sum of slacks on that vehicle, that is, dimension->CumulVar(end) - dimension->CumulVar(start) - sum_{node in path of vehicle} dimension->FixedTransitVar(node).
  • if spans[vehicle] is not nullptr, constrains it to be dimension->CumulVar(end) - dimension->CumulVar(start) This does stronger propagation than a decomposition, and takes breaks into account.

Definition at line 632 of file routing_constraints.cc.

◆ MakePathStateFilter()

LocalSearchFilter * operations_research::MakePathStateFilter ( Solver * solver,
std::unique_ptr< PathState > path_state,
const std::vector< IntVar * > & nexts )

Make a filter that takes ownership of a PathState and synchronizes it with solver events. The solver represents a graph with array of variables 'nexts'. Solver events are embodied by Assignment* deltas, that are translated to node changes during Relax(), committed during Synchronize(), and reverted on Revert().

Definition at line 3912 of file routing_filters.cc.

◆ MakePerturbationDecisionBuilder()

DecisionBuilder * operations_research::MakePerturbationDecisionBuilder ( const RoutingSearchParameters & parameters,
RoutingModel * model,
std::mt19937 * rnd,
const Assignment * assignment,
std::function< bool()> stop_search,
LocalSearchFilterManager * filter_manager )

Returns a DecisionBuilder implementing a perturbation step of an Iterated Local Search approach.

Definition at line 1099 of file routing_ils.cc.

◆ MakePickupDeliveryFilter()

LocalSearchFilter * operations_research::MakePickupDeliveryFilter ( const RoutingModel & routing_model,
const PathState * path_state,
const std::vector< PickupDeliveryPair > & pairs,
const std::vector< RoutingModel::PickupAndDeliveryPolicy > & vehicle_policies )

Returns a filter enforcing pickup and delivery constraints for the given pair of nodes and given policies.

Definition at line 2665 of file routing_filters.cc.

◆ MakeRelocate() [1/2]

LocalSearchOperator * operations_research::MakeRelocate ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
NeighborAccessor get_incoming_neighbors,
NeighborAccessor get_outgoing_neighbors,
int64_t chain_length,
bool single_path,
const std::string & name )

Definition at line 537 of file local_search.cc.

◆ MakeRelocate() [2/2]

LocalSearchOperator * operations_research::MakeRelocate ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::function< const std::vector< int > &(int, int)> get_incoming_neighbors = nullptr,
std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors = nullptr,
int64_t chain_length = 1LL,
bool single_path = false,
const std::string & name = "Relocate" )

--— Relocate --—

Moves a sub-chain of a path to another position; the specified chain length is the fixed length of the chains being moved. When this length is 1 the operator simply moves a node to another position. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5, for a chain length of 2 (where (1, 5) are first and last nodes of the path and can therefore not be moved): 1 -> 4 -> 2 -> 3 -> 5 1 -> 3 -> 4 -> 2 -> 5 Using Relocate with chain lengths of 1, 2 and 3 together is equivalent to the OrOpt operator on a path. The OrOpt operator is a limited version of 3Opt (breaks 3 arcs on a path).

◆ MakeRelocateExpensiveChain()

LocalSearchOperator * operations_research::MakeRelocateExpensiveChain ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
int num_arcs_to_consider,
std::function< int64_t(int64_t, int64_t, int64_t)> arc_cost_for_path_start )

Definition at line 1417 of file routing_neighborhoods.cc.

◆ MakeRelocateNeighbors() [1/2]

LocalSearchOperator * operations_research::MakeRelocateNeighbors ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
RoutingTransitCallback2 arc_evaluator )

Definition at line 158 of file routing_neighborhoods.cc.

◆ MakeRelocateNeighbors() [2/2]

LocalSearchOperator * operations_research::MakeRelocateNeighbors ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::function< const std::vector< int > &(int, int)> get_incoming_neighbors,
std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors,
RoutingTransitCallback2 arc_evaluator )

Definition at line 139 of file routing_neighborhoods.cc.

◆ MakeRelocateSubtrip() [1/2]

LocalSearchOperator * operations_research::MakeRelocateSubtrip ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
absl::Span< const PickupDeliveryPair > pairs )

Definition at line 1611 of file routing_neighborhoods.cc.

◆ MakeRelocateSubtrip() [2/2]

LocalSearchOperator * operations_research::MakeRelocateSubtrip ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::function< const std::vector< int > &(int, int)> get_incoming_neighbors,
std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors,
absl::Span< const PickupDeliveryPair > pairs )

Definition at line 1592 of file routing_neighborhoods.cc.

◆ MakeResourceAssignmentFilter()

LocalSearchFilter * operations_research::MakeResourceAssignmentFilter ( LocalDimensionCumulOptimizer * optimizer,
LocalDimensionCumulOptimizer * mp_optimizer,
bool propagate_own_objective_value,
bool filter_objective_cost )

Returns a filter checking the feasibility and cost of the resource assignment.

Definition at line 3380 of file routing_filters.cc.

◆ MakeResourceConstraint()

Constraint * operations_research::MakeResourceConstraint ( const RoutingModel::ResourceGroup * resource_group,
const std::vector< IntVar * > * vehicle_resource_vars,
RoutingModel * model )

Definition at line 269 of file routing_constraints.cc.

◆ MakeRestoreDimensionValuesForUnchangedRoutes()

DecisionBuilder * operations_research::MakeRestoreDimensionValuesForUnchangedRoutes ( RoutingModel * model)

A decision builder that monitors solutions, and tries to fix dimension variables whose route did not change in the candidate solution. Dimension variables are Cumul, Slack and break variables of all dimensions. The user must make sure that those variables will be always be fixed at solution, typically by composing another DecisionBuilder after this one. If this DecisionBuilder returns a non-nullptr value at some node of the search tree, it will always return nullptr in the subtree of that node. Moreover, the decision will be a simultaneous assignment of the dimension variables of unchanged routes on the left branch, and an empty decision on the right branch.

Definition at line 890 of file routing_decision_builders.cc.

◆ MakeRouteConstraint()

Constraint * operations_research::MakeRouteConstraint ( RoutingModel * model,
std::vector< IntVar * > route_cost_vars,
std::function< std::optional< int64_t >(const std::vector< int64_t > &)> route_evaluator )

Definition at line 790 of file routing_constraints.cc.

◆ MakeRouteConstraintFilter()

IntVarLocalSearchFilter * operations_research::MakeRouteConstraintFilter ( const RoutingModel & routing_model)

Returns a filter tracking route constraints.

Definition at line 155 of file routing_filters.cc.

◆ MakeRuinAndRecreateDecisionBuilder()

DecisionBuilder * operations_research::MakeRuinAndRecreateDecisionBuilder ( const RoutingSearchParameters & parameters,
RoutingModel * model,
std::mt19937 * rnd,
const Assignment * assignment,
std::function< bool()> stop_search,
LocalSearchFilterManager * filter_manager )

Definition at line 1083 of file routing_ils.cc.

◆ MakeSetCumulsFromGlobalDimensionCosts()

DecisionBuilder * operations_research::MakeSetCumulsFromGlobalDimensionCosts ( Solver * solver,
GlobalDimensionCumulOptimizer * global_optimizer,
GlobalDimensionCumulOptimizer * global_mp_optimizer,
SearchMonitor * monitor,
bool optimize_and_pack,
std::vector< RoutingModel::RouteDimensionTravelInfo > dimension_travel_info_per_route )

Variant based on global optimizers, handling all routes together.

Definition at line 719 of file routing_decision_builders.cc.

◆ MakeSetCumulsFromLocalDimensionCosts()

DecisionBuilder * operations_research::MakeSetCumulsFromLocalDimensionCosts ( Solver * solver,
LocalDimensionCumulOptimizer * lp_optimizer,
LocalDimensionCumulOptimizer * mp_optimizer,
bool optimize_and_pack = false,
std::vector< RoutingModel::RouteDimensionTravelInfo > dimension_travel_info_per_route = {} )

Functions returning decision builders which try to instantiate dimension cumul variables using scheduling optimizers. Variant based on local optimizers, for which each route is handled separately.

Definition at line 542 of file routing_decision_builders.cc.

◆ MakeSetValuesFromTargets()

DecisionBuilder * operations_research::MakeSetValuesFromTargets ( Solver * solver,
std::vector< IntVar * > variables,
std::vector< int64_t > targets )

A decision builder which tries to assign values to variables as close as possible to target values first.

Definition at line 103 of file routing_decision_builders.cc.

◆ MakeSwapActive()

LocalSearchOperator * operations_research::MakeSwapActive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class )

--— SwapActive --—

SwapActive replaces an active node by an inactive one. Possible neighbors for the path 1 -> 2 -> 3 -> 4 with 5 inactive (where 1 and 4 are first and last nodes of the path) are: 1 -> 5 -> 3 -> 4 & 2 inactive 1 -> 2 -> 5 -> 4 & 3 inactive

Definition at line 1154 of file local_search.cc.

◆ MakeSwapActiveChain()

LocalSearchOperator * operations_research::MakeSwapActiveChain ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
int max_chain_size )

--— SwapActiveChain --—

Definition at line 1255 of file local_search.cc.

◆ MakeSwapActiveToShortestPath()

LocalSearchOperator * operations_research::MakeSwapActiveToShortestPath ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::vector< std::vector< int64_t > > alternative_sets,
RoutingTransitCallback2 arc_evaluator )

Definition at line 367 of file routing_neighborhoods.cc.

◆ MakeSweepDecisionBuilder()

DecisionBuilder * operations_research::MakeSweepDecisionBuilder ( RoutingModel * model,
bool check_assignment )

Returns a DecisionBuilder building a first solution based on the Sweep heuristic. Mostly suitable when cost is proportional to distance.

Definition at line 5419 of file routing_search.cc.

◆ MakeTSPLns()

LocalSearchOperator * operations_research::MakeTSPLns ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
Solver::IndexEvaluator3 evaluator,
int tsp_size )

TSP-base lns. Randomly merge consecutive nodes until n "meta"-nodes remain and solve the corresponding TSP. This can be seen as a large neighborhood search operator although decisions are taken with the operator. This is an "unlimited" neighborhood which must be stopped by search limits. To force diversification, the operator iteratively forces each node to serve as base of a meta-node.

Definition at line 1528 of file local_search.cc.

◆ MakeTSPOpt()

LocalSearchOperator * operations_research::MakeTSPOpt ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
Solver::IndexEvaluator3 evaluator,
int chain_length )

--— TSP-based operators --—

Sliding TSP operator Uses an exact dynamic programming algorithm to solve the TSP corresponding to path sub-chains. For a subchain 1 -> 2 -> 3 -> 4 -> 5 -> 6, solves the TSP on nodes A, 2, 3, 4, 5, where A is a merger of nodes 1 and 6 such that cost(A,i) = cost(1,i) and cost(i,A) = cost(i,6).

Definition at line 1374 of file local_search.cc.

◆ MakeTwoOpt() [1/2]

LocalSearchOperator * operations_research::MakeTwoOpt ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
NeighborAccessor get_incoming_neighbors,
NeighborAccessor get_outgoing_neighbors )

Definition at line 444 of file local_search.cc.

◆ MakeTwoOpt() [2/2]

LocalSearchOperator * operations_research::MakeTwoOpt ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::function< const std::vector< int > &(int, int)> get_incoming_neighbors = nullptr,
std::function< const std::vector< int > &(int, int)> get_outgoing_neighbors = nullptr )

--— 2Opt --—

Reverses a sub-chain of a path. It is called 2Opt because it breaks 2 arcs on the path; resulting paths are called 2-optimal. Possible neighbors for the path 1 -> 2 -> 3 -> 4 -> 5 (where (1, 5) are first and last nodes of the path and can therefore not be moved): 1 -> 3 -> 2 -> 4 -> 5 1 -> 4 -> 3 -> 2 -> 5 1 -> 2 -> 4 -> 3 -> 5

◆ MakeTwoOptWithShortestPath()

LocalSearchOperator * operations_research::MakeTwoOptWithShortestPath ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class,
std::vector< std::vector< int64_t > > alternative_sets,
RoutingTransitCallback2 arc_evaluator )

Definition at line 316 of file routing_neighborhoods.cc.

◆ MakeTypeRegulationsFilter()

IntVarLocalSearchFilter * operations_research::MakeTypeRegulationsFilter ( const RoutingModel & routing_model)

Returns a filter ensuring type regulation constraints are enforced.

Definition at line 984 of file routing_filters.cc.

◆ MakeVehicleAmortizedCostFilter()

IntVarLocalSearchFilter * operations_research::MakeVehicleAmortizedCostFilter ( const RoutingModel & routing_model)

Returns a filter computing vehicle amortized costs.

Definition at line 832 of file routing_filters.cc.

◆ MakeVehicleBreaksFilter()

IntVarLocalSearchFilter * operations_research::MakeVehicleBreaksFilter ( const RoutingModel & routing_model,
const RoutingDimension & dimension )

Definition at line 1083 of file routing_breaks.cc.

◆ MakeVehicleVarFilter()

LocalSearchFilter * operations_research::MakeVehicleVarFilter ( const RoutingModel & routing_model,
const PathState * path_state )

Returns a filter checking that vehicle variable domains are respected.

Definition at line 2735 of file routing_filters.cc.

◆ MaximizeLinearAssignment()

void operations_research::MaximizeLinearAssignment ( absl::Span< const std::vector< double > > cost,
absl::flat_hash_map< int, int > * direct_assignment,
absl::flat_hash_map< int, int > * reverse_assignment )

See IMPORTANT NOTE at the top of the file.

Definition at line 673 of file hungarian.cc.

◆ MaxVarArray()

int64_t operations_research::MaxVarArray ( const std::vector< IntVar * > & vars)
inline

The std::max<int64_t> is needed for compilation on MSVC.

Definition at line 4337 of file constraint_solveri.h.

◆ MemoryUsage()

std::string operations_research::MemoryUsage ( )

Returns the current thread's total memory usage in an human-readable string.

Definition at line 33 of file stats.cc.

◆ MergeConstraintHandlerResults()

GScipCallbackResult operations_research::MergeConstraintHandlerResults ( GScipCallbackResult result1,
GScipCallbackResult result2,
ConstraintHandlerCallbackType callback_type )

Returns the GScipCallbackResult with larger priority, see ConstraintHandlerResultPriority().

Definition at line 296 of file gscip_constraint_handler.cc.

◆ MergeMPConstraintProtoExceptTerms()

void operations_research::MergeMPConstraintProtoExceptTerms ( const MPConstraintProto & from,
MPConstraintProto * to )

Partially merges a MPConstraintProto onto another, skipping only the repeated fields "var_index" and "coefficients". This is used within FindErrorInMPModelDeltaProto. See the unit test MergeMPConstraintProtoExceptTermsTest that explains why we need this.

Definition at line 940 of file model_validator.cc.

◆ MinimizeLinearAssignment()

void operations_research::MinimizeLinearAssignment ( absl::Span< const std::vector< double > > cost,
absl::flat_hash_map< int, int > * direct_assignment,
absl::flat_hash_map< int, int > * reverse_assignment )

See IMPORTANT NOTE at the top of the file.

Definition at line 655 of file hungarian.cc.

◆ MinVarArray()

int64_t operations_research::MinVarArray ( const std::vector< IntVar * > & vars)
inline

The std::min<int64_t> is needed for compilation on MSVC.

Definition at line 4347 of file constraint_solveri.h.

◆ mix()

void operations_research::mix ( uint64_t & a,
uint64_t & b,
uint64_t & c )
inlinestatic

64 bit version.

Definition at line 29 of file hash.h.

◆ ModelProtoFromLpFormat()

absl::StatusOr< MPModelProto > operations_research::ModelProtoFromLpFormat ( absl::string_view model)

This calls ParseLp() under the hood. See below.

Definition at line 472 of file lp_parser.cc.

◆ MostSignificantBitPosition32() [1/2]

int operations_research::MostSignificantBitPosition32 ( const uint32_t * bitset,
uint32_t start,
uint32_t end )

◆ MostSignificantBitPosition32() [2/2]

int operations_research::MostSignificantBitPosition32 ( uint32_t n)
inline

Definition at line 276 of file bitset.h.

◆ MostSignificantBitPosition32Default()

int operations_research::MostSignificantBitPosition32Default ( uint32_t n)
inline

Definition at line 252 of file bitset.h.

◆ MostSignificantBitPosition64() [1/2]

int64_t operations_research::MostSignificantBitPosition64 ( const uint64_t * bitset,
uint64_t start,
uint64_t end )

Returns the last bit set in bitset between min_bit and start.

◆ MostSignificantBitPosition64() [2/2]

int operations_research::MostSignificantBitPosition64 ( uint64_t n)
inline

Definition at line 234 of file bitset.h.

◆ MostSignificantBitPosition64Default()

int operations_research::MostSignificantBitPosition64Default ( uint64_t n)
inline

Returns the most significant bit position in n.

Definition at line 206 of file bitset.h.

◆ MPModelProto_Annotation_TargetType_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::MPModelProto_Annotation_TargetType_descriptor ( )

Definition at line 1141 of file linear_solver.pb.cc.

◆ MPModelProto_Annotation_TargetType_IsValid()

bool operations_research::MPModelProto_Annotation_TargetType_IsValid ( int value)
inline

Definition at line 225 of file linear_solver.pb.h.

◆ MPModelProto_Annotation_TargetType_Name() [1/2]

template<>
const ::std::string & operations_research::MPModelProto_Annotation_TargetType_Name ( MPModelProto_Annotation_TargetType value)
inline

Definition at line 238 of file linear_solver.pb.h.

◆ MPModelProto_Annotation_TargetType_Name() [2/2]

template<typename T>
const ::std::string & operations_research::MPModelProto_Annotation_TargetType_Name ( T value)

Definition at line 231 of file linear_solver.pb.h.

◆ MPModelProto_Annotation_TargetType_Parse()

bool operations_research::MPModelProto_Annotation_TargetType_Parse ( ::absl::string_view name,
MPModelProto_Annotation_TargetType *PROTOBUF_NONNULL value )
inline

Definition at line 242 of file linear_solver.pb.h.

◆ MPModelRequest_SolverType_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::MPModelRequest_SolverType_descriptor ( )

Definition at line 1153 of file linear_solver.pb.cc.

◆ MPModelRequest_SolverType_IsValid()

bool operations_research::MPModelRequest_SolverType_IsValid ( int value)
inline

Definition at line 307 of file linear_solver.pb.h.

◆ MPModelRequest_SolverType_Name()

template<typename T>
const ::std::string & operations_research::MPModelRequest_SolverType_Name ( T value)

Definition at line 313 of file linear_solver.pb.h.

◆ MPModelRequest_SolverType_Parse()

bool operations_research::MPModelRequest_SolverType_Parse ( ::absl::string_view name,
MPModelRequest_SolverType *PROTOBUF_NONNULL value )
inline

Definition at line 319 of file linear_solver.pb.h.

◆ MPModelRequestLoggingInfo()

std::string operations_research::MPModelRequestLoggingInfo ( const MPModelRequest & request)

Gives some brief (a few lines, at most) human-readable information about the given request, suitable for debug logging.

Definition at line 48 of file solve_mp_model.cc.

◆ MPSolverCommonParameters_LPAlgorithmValues_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::MPSolverCommonParameters_LPAlgorithmValues_descriptor ( )

Definition at line 1147 of file linear_solver.pb.cc.

◆ MPSolverCommonParameters_LPAlgorithmValues_IsValid()

bool operations_research::MPSolverCommonParameters_LPAlgorithmValues_IsValid ( int value)
inline

Definition at line 259 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues_Name() [1/2]

template<>
const ::std::string & operations_research::MPSolverCommonParameters_LPAlgorithmValues_Name ( MPSolverCommonParameters_LPAlgorithmValues value)
inline

Definition at line 272 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues_Name() [2/2]

template<typename T>
const ::std::string & operations_research::MPSolverCommonParameters_LPAlgorithmValues_Name ( T value)

Definition at line 265 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues_Parse()

bool operations_research::MPSolverCommonParameters_LPAlgorithmValues_Parse ( ::absl::string_view name,
MPSolverCommonParameters_LPAlgorithmValues *PROTOBUF_NONNULL value )
inline

Definition at line 276 of file linear_solver.pb.h.

◆ MPSolverResponseStatus_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::MPSolverResponseStatus_descriptor ( )

Definition at line 1159 of file linear_solver.pb.cc.

◆ MPSolverResponseStatus_IsValid()

bool operations_research::MPSolverResponseStatus_IsValid ( int value)
inline

Definition at line 346 of file linear_solver.pb.h.

◆ MPSolverResponseStatus_Name()

template<typename T>
const ::std::string & operations_research::MPSolverResponseStatus_Name ( T value)

Definition at line 352 of file linear_solver.pb.h.

◆ MPSolverResponseStatus_Parse()

bool operations_research::MPSolverResponseStatus_Parse ( ::absl::string_view name,
MPSolverResponseStatus *PROTOBUF_NONNULL value )
inline

Definition at line 358 of file linear_solver.pb.h.

◆ MPSolverResponseStatusIsRpcError()

bool operations_research::MPSolverResponseStatusIsRpcError ( MPSolverResponseStatus status)

Whether the given MPSolverResponseStatus (of a solve) would yield an RPC error when happening on the linear solver stubby server, see ./linear_solver_service.proto.

Note
RPC errors forbid to carry a response to the client, who can only see the RPC error itself (error code + error message).

Cases that don't yield an RPC error when they happen on the server.

Cases that should never happen with the linear solver server. We prefer to consider those as "not RPC errors".

Cases that yield an RPC error when they happen on the server.

Definition at line 1922 of file linear_solver.cc.

◆ MPSolverToGlopConstraintStatus()

glop::ConstraintStatus operations_research::MPSolverToGlopConstraintStatus ( MPSolver::BasisStatus s)

Definition at line 108 of file glop_utils.cc.

◆ MPSolverToGlopVariableStatus()

glop::VariableStatus operations_research::MPSolverToGlopVariableStatus ( MPSolver::BasisStatus s)

Definition at line 74 of file glop_utils.cc.

◆ MPSolverToXpressBasisStatus()

int operations_research::MPSolverToXpressBasisStatus ( MPSolver::BasisStatus mpsolver_basis_status)
static

Transform MPSolver basis status to XPRESS status.

Definition at line 1264 of file xpress_interface.cc.

◆ MPSosConstraint_Type_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::MPSosConstraint_Type_descriptor ( )

Definition at line 1135 of file linear_solver.pb.cc.

◆ MPSosConstraint_Type_IsValid()

bool operations_research::MPSosConstraint_Type_IsValid ( int value)
inline

Definition at line 192 of file linear_solver.pb.h.

◆ MPSosConstraint_Type_Name() [1/2]

template<>
const ::std::string & operations_research::MPSosConstraint_Type_Name ( MPSosConstraint_Type value)
inline

Definition at line 205 of file linear_solver.pb.h.

◆ MPSosConstraint_Type_Name() [2/2]

template<typename T>
const ::std::string & operations_research::MPSosConstraint_Type_Name ( T value)

Definition at line 198 of file linear_solver.pb.h.

◆ MPSosConstraint_Type_Parse()

bool operations_research::MPSosConstraint_Type_Parse ( ::absl::string_view name,
MPSosConstraint_Type *PROTOBUF_NONNULL value )
inline

Definition at line 209 of file linear_solver.pb.h.

◆ MultiDijkstra()

template<class DistanceType, class Graph, class ArcLengthFunctor, class SettledNodeCallbackType>
std::vector< absl::flat_hash_map< int, DistanceAndParentArc< DistanceType > > > operations_research::MultiDijkstra ( const Graph & graph,
ArcLengthFunctor arc_length_functor,
const std::vector< std::vector< int > > & source_sets,
SettledNodeCallbackType settled_node_callback )

Runs multiple Dijkstra searches simultaneously on the same graph, in a single thread. All the Dijkstras share the same priority queue: their search radius will grow "simulatenously".

Moreover, each individual Dijkstra search can have several nodes as its "source", and the stopping criterion for each Dijkstra search is highly customizable: the user controls it via a "settled node callback", called every time a node is settled. See the API below.

The Dijkstra are sparse: the global space complexity will be linear in the number of search states explored. Ditto for the time complexity, with an additional logarithmic factor caused by the priority queue.

This class has many similarities with BoundedDijkstraWrapper from ./bounded_dijkstra.h but adds the overhead of tracking the source index for every search state, and of the sparse (but slower) node hash maps.

Arguments:

  • "graph": the graph. The Graph class must support the interface of ortools/graph/graph.h: OutgoingArcs(), Head(), Tail().
  • "arc_length_functor": we will call arc_length_functor(a) on every arc "a" explored, where "a" is cast to an int. It should return the arc's length, which is statically cast to DistanceType.
  • "source_sets" contains the sources. Each source is itself a set of nodes.
  • "settled_node_callback" will be called every time we settled a node, with 3 arguments (node, source index, distance of node from that source). If it returns true, the Dijkstra search from that source will stop.

Returns the list of Dijkstra search: for each source #s, the element #s of the returned vector will map every node explored in the Dijkstra from source #s to its distance and parent arc.

Initialize the return data structure and the priority queue.

Main Dijkstra loop.

Dijkstra optimization: ignore states that don't correspond to the optimal (such states have been preceded by better states in the queue order, without being deleted since priority_queue doesn't have erase()).

Definition at line 126 of file multi_dijkstra.h.

◆ NChooseK()

absl::StatusOr< int64_t > operations_research::NChooseK ( int64_t n,
int64_t k )

NOTE(user): If performance ever matters, we could simply precompute and store all (N choose K) that don't overflow, there aren't that many of them: only a few tens of thousands, after removing simple cases like k ≤ 5.

Returns the number of ways to choose k elements among n, ignoring the order, i.e., the binomial coefficient (n, k). This is like std::exp(MathUtil::LogCombinations(n, k)), but faster, with perfect accuracy, and returning an error iff the result would overflow an int64_t or if an argument is invalid (i.e., n < 0, k < 0). Returns 0 for k > n.

NOTE(user): If you need a variation of this, ask the authors: it's very easy to add. E.g., other int types, other behaviors (e.g., return std::numeric_limits<int64_t>::max() on overflow, etc).

Definition at line 142 of file n_choose_k.cc.

◆ NodePathImpliedBy()

template<typename GraphType>
std::vector< typename GraphType::NodeIndex > operations_research::NodePathImpliedBy ( absl::Span< const typename GraphType::ArcIndex > arc_path,
const GraphType & graph )

Implementations.

Todo
(b/332475804): If ArcPathTo and/or NodePathTo functions become bottlenecks: (1) have the class preallocate a buffer of size num_nodes (2) assign into an index rather than with push_back (3) return by absl::Span (or return a copy) with known size.

Definition at line 268 of file dag_shortest_path.h.

◆ NumBitsForZeroTo()

template<typename T>
int operations_research::NumBitsForZeroTo ( T max_value)

Definition at line 253 of file radix_sort.h.

◆ One()

int64_t operations_research::One ( )
inline

This method returns 1.

Definition at line 3432 of file constraint_solver.h.

◆ OneBit32()

uint32_t operations_research::OneBit32 ( int pos)
inline

Definition at line 42 of file bitset.h.

◆ OneBit64()

uint64_t operations_research::OneBit64 ( int pos)
inline

Returns a word with only bit pos set.

Definition at line 41 of file bitset.h.

◆ OneRange32()

uint32_t operations_research::OneRange32 ( uint32_t s,
uint32_t e )
inline

Definition at line 295 of file bitset.h.

◆ OneRange64()

uint64_t operations_research::OneRange64 ( uint64_t s,
uint64_t e )
inline

Returns a word with bits from s to e set.

Definition at line 288 of file bitset.h.

◆ operator*() [1/2]

LinearExpr operations_research::operator* ( double lhs,
LinearExpr rhs )

Definition at line 168 of file linear_expr.cc.

◆ operator*() [2/2]

LinearExpr operations_research::operator* ( LinearExpr lhs,
double rhs )

Definition at line 160 of file linear_expr.cc.

◆ operator+()

LinearExpr operations_research::operator+ ( LinearExpr lhs,
const LinearExpr & rhs )

NOTE(user): in the ops below, the non-"const LinearExpr&" are intentional. We need to create a new LinearExpr for the result, so we lose nothing by passing one argument by value, mutating it, and then returning it. In particular, this allows (with move semantics and RVO) an optimized evaluation of expressions such as a + b + c + d (see http://en.cppreference.com/w/cpp/language/operators).

Definition at line 152 of file linear_expr.cc.

◆ operator-()

LinearExpr operations_research::operator- ( LinearExpr lhs,
const LinearExpr & rhs )

Definition at line 156 of file linear_expr.cc.

◆ operator/()

LinearExpr operations_research::operator/ ( LinearExpr lhs,
double rhs )

Definition at line 164 of file linear_expr.cc.

◆ operator<<() [1/13]

std::ostream & operations_research::operator<< ( std::ostream & os,
MPSolver::OptimizationProblemType optimization_problem_type )
inline

Definition at line 998 of file linear_solver.h.

◆ operator<<() [2/13]

std::ostream & operations_research::operator<< ( std::ostream & os,
MPSolver::ResultStatus status )
inline

Definition at line 1004 of file linear_solver.h.

◆ operator<<() [3/13]

template<typename StrongIndexName>
std::ostream & operations_research::operator<< ( std::ostream & os,
StrongIndex< StrongIndexName > arg )

– NON-MEMBER STREAM OPERATORS -------------------------------------------— We provide the << operator, primarily for logging purposes. Currently, there seems to be no need for an >> operator.

Definition at line 251 of file strong_integers.h.

◆ operator<<() [4/13]

template<typename StrongIntegerName>
std::ostream & operations_research::operator<< ( std::ostream & os,
StrongInt64< StrongIntegerName > arg )

Definition at line 262 of file strong_integers.h.

◆ operator<<() [5/13]

std::ostream & operations_research::operator<< ( std::ostream & out,
const Assignment & assignment )

Definition at line 1021 of file assignment.cc.

◆ operator<<() [6/13]

std::ostream & operations_research::operator<< ( std::ostream & out,
const BaseObject *const o )

Definition at line 2488 of file constraint_solver.cc.

◆ operator<<() [7/13]

std::ostream & operations_research::operator<< ( std::ostream & out,
const ClosedInterval & interval )

Definition at line 120 of file sorted_interval_list.cc.

◆ operator<<() [8/13]

std::ostream & operations_research::operator<< ( std::ostream & out,
const Domain & domain )

Definition at line 129 of file sorted_interval_list.cc.

◆ operator<<() [9/13]

std::ostream & operations_research::operator<< ( std::ostream & out,
const RoundTripDoubleFormat & format )

Definition at line 110 of file fp_roundtrip_conv.cc.

◆ operator<<() [10/13]

std::ostream & operations_research::operator<< ( std::ostream & out,
const Solver *const s )

---------------— Useful Operators ---------------—

Definition at line 2483 of file constraint_solver.cc.

◆ operator<<() [11/13]

std::ostream & operations_research::operator<< ( std::ostream & out,
const std::vector< ClosedInterval > & intervals )

Definition at line 124 of file sorted_interval_list.cc.

◆ operator<<() [12/13]

template<class DistanceType>
std::ostream & operations_research::operator<< ( std::ostream & out,
DistanceAndParentArc< DistanceType > distance_and_parent_arc )

Implementation of the function templates

Definition at line 116 of file multi_dijkstra.h.

◆ operator<<() [13/13]

std::ostream & operations_research::operator<< ( std::ostream & stream,
const LinearExpr & linear_expr )

Definition at line 147 of file linear_expr.cc.

◆ operator<=()

LinearRange operations_research::operator<= ( const LinearExpr & lhs,
const LinearExpr & rhs )

Definition at line 183 of file linear_expr.cc.

◆ operator==()

LinearRange operations_research::operator== ( const LinearExpr & lhs,
const LinearExpr & rhs )

Definition at line 186 of file linear_expr.cc.

◆ operator>=()

LinearRange operations_research::operator>= ( const LinearExpr & lhs,
const LinearExpr & rhs )

Definition at line 189 of file linear_expr.cc.

◆ optimizermsg()

void XPRS_CC operations_research::optimizermsg ( XPRSprob prob,
void * data,
const char * sMsg,
int nLen,
int nMsgLvl )

Definition at line 2171 of file xpress_interface.cc.

◆ OptionalBoolean_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::OptionalBoolean_descriptor ( )

Definition at line 63 of file optional_boolean.pb.cc.

◆ OptionalBoolean_IsValid()

bool operations_research::OptionalBoolean_IsValid ( int value)
inline

Definition at line 81 of file optional_boolean.pb.h.

◆ OptionalBoolean_Name() [1/2]

template<>
const ::std::string & operations_research::OptionalBoolean_Name ( OptionalBoolean value)
inline

Definition at line 94 of file optional_boolean.pb.h.

◆ OptionalBoolean_Name() [2/2]

template<typename T>
const ::std::string & operations_research::OptionalBoolean_Name ( T value)

Definition at line 87 of file optional_boolean.pb.h.

◆ OptionalBoolean_Parse()

bool operations_research::OptionalBoolean_Parse ( ::absl::string_view name,
OptionalBoolean *PROTOBUF_NONNULL value )
inline

Definition at line 98 of file optional_boolean.pb.h.

◆ OrToolsMajorVersion()

int operations_research::OrToolsMajorVersion ( )

Definition at line 22 of file version.cc.

◆ OrToolsMinorVersion()

int operations_research::OrToolsMinorVersion ( )

Definition at line 24 of file version.cc.

◆ OrToolsPatchVersion()

int operations_research::OrToolsPatchVersion ( )

Definition at line 26 of file version.cc.

◆ OrToolsVersionString()

std::string operations_research::OrToolsVersionString ( )

Definition at line 28 of file version.cc.

◆ ParameterDebugString() [1/2]

template<class P>
std::string operations_research::ParameterDebugString ( P * param)

Support limited to pointers to classes which define DebugString().

Definition at line 547 of file constraint_solveri.h.

◆ ParameterDebugString() [2/2]

template<class P>
std::string operations_research::ParameterDebugString ( P param)

Definition at line 541 of file constraint_solveri.h.

◆ ParseAndSolve()

void operations_research::ParseAndSolve ( const std::string & filename,
absl::string_view solver,
const std::string & params )
Todo
(user): Move naming code to parser.

Build optimization model.

Definition at line 43 of file vector_bin_packing_main.cc.

◆ ParseFileFormat()

FileFormat operations_research::ParseFileFormat ( const std::string & format_name)
Todo
(user): Move this set_cover_reader

Definition at line 168 of file set_cover_solve.cc.

◆ ParseSolFile() [1/2]

absl::StatusOr< glop::DenseRow > operations_research::ParseSolFile ( absl::string_view file_name,
const glop::LinearProgram & model )

Parse a solution to model from a file.

Definition at line 35 of file sol_reader.cc.

◆ ParseSolFile() [2/2]

absl::StatusOr< MPSolutionResponse > operations_research::ParseSolFile ( absl::string_view file_name,
const MPModelProto & model )

Definition at line 41 of file sol_reader.cc.

◆ ParseSolString() [1/2]

absl::StatusOr< glop::DenseRow > operations_research::ParseSolString ( const std::string & solution,
const glop::LinearProgram & model )

Parse a solution to model from a string.

Remove the comments.

Definition at line 47 of file sol_reader.cc.

◆ ParseSolString() [2/2]

absl::StatusOr< MPSolutionResponse > operations_research::ParseSolString ( const std::string & solution,
const MPModelProto & model )

Remove the comments.

Definition at line 104 of file sol_reader.cc.

◆ ParseTextProtoForFlag()

bool operations_research::ParseTextProtoForFlag ( absl::string_view text,
google::protobuf::Message * message_out,
std::string * error_out )

Tries to parse text as a text format proto. On a success, stores the result in message_out and returns true, otherwise, returns false with an explanation in error_out.

Note
this API is optimized for implementing AbslParseFlag(). The error message will be multiline and is designed to be easily read when printed.

Definition at line 82 of file parse_proto.cc.

◆ PdlpSolveProto()

absl::StatusOr< MPSolutionResponse > operations_research::PdlpSolveProto ( LazyMutableCopy< MPModelRequest > request,
bool relax_integer_variables = false,
const std::atomic< bool > * interrupt_solve = nullptr )

Uses pdlp::PrimalDualHybridGradient to solve the problem specified by the MPModelRequest. Users of this interface should be aware of the size limitations of MPModelProto (see, e.g., large_linear_program.proto).

If possible, std::move the request into this function call so that its memory can be reclaimed early.

The optional interrupt_solve can be used to interrupt the solve early. The solver will periodically check its value and stop if it holds true.

If relax_integer_variables is true, integrality constraints are relaxed before solving. If false, integrality constraints result in an error. The solver_specific_info field in the MPSolutionResponse contains a serialized SolveLog.

Returns an error if the conversion from MPModelProto to pdlp::QuadraticProgram fails. The lack of an error does not imply success. Check the SolveLog's termination_reason for more refined status details.

We can now clear the request and optional_model.

PDLP's statuses don't map very cleanly to MPSolver statuses. Do the best we can for now.

variable_value and dual_value are supposed to be set iff 'status' is OPTIMAL or FEASIBLE. However, we set them in all cases.

QpFromMpModelProto converts maximization problems to minimization problems for PDLP by negating the objective and setting objective_scaling_factor to -1. This maintains the same set of primal solutions. Dual solutions need to be negated if objective_scaling_factor is -1.

Definition at line 36 of file pdlp_proto_solver.cc.

◆ PerturbationStrategy_Value_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::PerturbationStrategy_Value_descriptor ( )

Definition at line 486 of file routing_ils.pb.cc.

◆ PerturbationStrategy_Value_IsValid()

bool operations_research::PerturbationStrategy_Value_IsValid ( int value)
inline

Definition at line 182 of file routing_ils.pb.h.

◆ PerturbationStrategy_Value_Name() [1/2]

template<>
const ::std::string & operations_research::PerturbationStrategy_Value_Name ( PerturbationStrategy_Value value)
inline

Definition at line 195 of file routing_ils.pb.h.

◆ PerturbationStrategy_Value_Name() [2/2]

template<typename T>
const ::std::string & operations_research::PerturbationStrategy_Value_Name ( T value)

Definition at line 188 of file routing_ils.pb.h.

◆ PerturbationStrategy_Value_Parse()

bool operations_research::PerturbationStrategy_Value_Parse ( ::absl::string_view name,
PerturbationStrategy_Value *PROTOBUF_NONNULL value )
inline

Definition at line 199 of file routing_ils.pb.h.

◆ PiecewiseLinearFunctionToSlopeAndYIntercept()

std::vector< SlopeAndYIntercept > operations_research::PiecewiseLinearFunctionToSlopeAndYIntercept ( const FloatSlopePiecewiseLinearFunction & pwl_function,
int index_start = 0,
int index_end = -1 )

Given a FloatSlopePiecewiseLinearFunction, returns a vector of slope and y-intercept corresponding to each segment. Only the segments in [index_start, index_end[ will be considered.

Todo
(user): Consider making the following two functions methods of FloatSlopePiecewiseLinearFunction. They're only called in lp_scheduling.cc and ../tour_optimization/model_test.cc, but they might come in handy.

Definition at line 1316 of file routing_lp_scheduling.cc.

◆ PortableDeleteFile()

absl::Status operations_research::PortableDeleteFile ( absl::string_view file_name)

Definition at line 78 of file file.cc.

◆ PortableFileGetContents()

absl::Status operations_research::PortableFileGetContents ( absl::string_view file_name,
std::string * output )

Definition at line 45 of file file.cc.

◆ PortableFileSetContents()

absl::Status operations_research::PortableFileSetContents ( absl::string_view file_name,
absl::string_view content )

Definition at line 35 of file file.cc.

◆ PortableTemporaryFile()

bool operations_research::PortableTemporaryFile ( const char * directory_prefix,
std::string * filename_out )

Returns true if successful. Outputs temp file to filename.

Definition at line 55 of file file.cc.

◆ PosIntDivDown()

int64_t operations_research::PosIntDivDown ( int64_t e,
int64_t v )
inline

Definition at line 4371 of file constraint_solveri.h.

◆ PosIntDivUp()

int64_t operations_research::PosIntDivUp ( int64_t e,
int64_t v )
inline

Definition at line 4366 of file constraint_solveri.h.

◆ printError()

void operations_research::printError ( const XPRSprob & mLp,
int line )

Definition at line 139 of file xpress_interface.cc.

◆ printXpressBanner()

void operations_research::printXpressBanner ( bool error)

Definition at line 192 of file environment.cc.

◆ ProbablyRunningInsideUnitTest()

bool operations_research::ProbablyRunningInsideUnitTest ( )
inline

Definition at line 22 of file testing_utils.h.

◆ PropagateLightweightVehicleBreaks()

bool operations_research::PropagateLightweightVehicleBreaks ( int path,
DimensionValues & dimension_values,
absl::Span< const std::pair< int64_t, int64_t > > interbreaks )

Propagates vehicle break constraints in dimension_values. This returns false if breaks cannot fit the path. Otherwise, this returns true, and modifies the start cumul, end cumul and the span of the given path. This applies light reasoning, and runs in O(#breaks * #interbreak rules).

Improve bounds on span/start max/end min using time windows: breaks that must occur inside the path have their duration accumulated into lb_span_tw, they also widen [start_max, end_min).

Todo
(user): consider adding deductions from the path to the break.

If the break may be performed before the path, after the path, or if it is not performed at all, ignore the break.

This break must be performed inside the path: widen the path.

Compute num_feasible_breaks = number of breaks that may fit into route, and [breaks_start_min, breaks_end_max) = max coverage of breaks.

Improve span/start min/end max using interbreak limits: there must be enough breaks inside the path, so that for each limit, the union of [br.start - max_interbreak, br.end + max_interbreak) covers [start, end), or [start, end) is shorter than max_interbreak.

Minimal number of breaks depends on total travel: 0 breaks for 0 <= total travel <= limit, 1 break for limit + 1 <= total travel <= 2 * limit, i breaks for i * limit + 1 <= total travel <= (i+1) * limit, ...

Definition at line 1216 of file routing_filters.cc.

◆ ProtobufDebugString()

template<class P>
std::string operations_research::ProtobufDebugString ( const P & message)

Definition at line 31 of file proto_utils.h.

◆ ProtobufParseTextProtoForFlag()

template<typename ProtoType>
bool operations_research::ProtobufParseTextProtoForFlag ( absl::string_view text,
ProtoType * message_out,
std::string * error_out )

Tries to parse text as a text format proto. On a success, stores the result in message_out and returns true, otherwise, returns false with an explanation in error_out.

When compiled with lite protos, any nonempty text will result in an error, as lite protos do not support parsing from text format.

Note
this API is optimized for implementing AbslParseFlag(). The error message will be multiline and is designed to be easily read when printed.

Definition at line 103 of file proto_utils.h.

◆ ProtobufShortDebugString()

template<class P>
std::string operations_research::ProtobufShortDebugString ( const P & message)

Definition at line 46 of file proto_utils.h.

◆ ProtobufTextFormatMergeFromString()

template<typename ProtoType>
bool operations_research::ProtobufTextFormatMergeFromString ( absl::string_view proto_text_string,
ProtoType * proto )

Definition at line 79 of file proto_utils.h.

◆ ProtobufTextFormatPrintToStringForFlag() [1/2]

std::string operations_research::ProtobufTextFormatPrintToStringForFlag ( const google::protobuf::Message & proto)

Prints the input proto to a string on a single line in a format compatible with ProtobufParseTextProtoForFlag().

TextFormat may add an empty space at the end of the string (e.g. "cpu: 3.5 "), likely because it always add a space after each field; we simply remove it here.

Definition at line 26 of file proto_utils.cc.

◆ ProtobufTextFormatPrintToStringForFlag() [2/2]

std::string operations_research::ProtobufTextFormatPrintToStringForFlag ( const google::protobuf::MessageLite & proto)

Prints an error message when compiling with lite protos.

Definition at line 39 of file proto_utils.cc.

◆ ProtoEnumToString()

template<typename ProtoEnumType>
std::string operations_research::ProtoEnumToString ( ProtoEnumType enum_value)

Definition at line 63 of file proto_utils.h.

◆ RadixSort()

template<typename T>
void operations_research::RadixSort ( absl::Span< T > values,
int num_bits = sizeof(T) * 8 )

Sorts an array of int, double, or other numeric types. Up to ~10x faster than std::sort() when size ≥ 8k. See file-level comment for more details.

Debug-check that num_bits is valid w.r.t. the values given.

We only shift by num_bits - 1, to avoid to potentially shift by the entire bit width, which would be undefined behavior.

This shortcut here is important to have early, guarded by as few "if" branches as possible, for the use case where the array is very small. For larger arrays below, the overhead of a few "if" is negligible.

Todo
(user): More complex decision tree, based on benchmarks. This one is already nice, but some cases can surely be optimized.
Parameters
num_bitsADVANCED USAGE: if you're sorting nonnegative integers, and suspect that their values use less bits than their full bit width, you may improve performance by setting num_bits to a lower value, for example NumBitsForZeroTo(max_value). It might even be faster to scan the values once just to do that, e.g., RadixSort(values, NumBitsForZeroTo(*absl::c_max_element(values)));

Definition at line 270 of file radix_sort.h.

◆ RadixSortTpl()

template<typename T, int radix_width, int num_passes>
void operations_research::RadixSortTpl ( absl::Span< T > values)

The internal template that does all the work.

ADVANCED USAGE: For power users who know which radix_width or num_passes they need, possibly differing from the canonical values used by RadixSort().

Internally we assume our values are unsigned integers. This works for both signed integers and IEEE754 floating-point types, with various twists for negative numbers. In particular, two nonnegative floats compare exactly as their unsigned integer bitcast do.

NOTE(user): We could support sizes > kint32max if needed. We use uint32_t for sizes, instead of size_t, to spare memory for the large radix widths. We could use uint64_t for sizes > 4G, but until we need it, just using uint32_t is simpler. Using smaller types (uint16_t or uint8_t) for smaller sizes was noticeably slower.

Main Radix/Count-sort counters. Radix sort normally uses several passes, but to speed things up, we compute all radix counters for all passes at once in a single initial sweep over the data.

count[] is actually a 2-dimensional array [num_passes][1 << radix_width], flattened for performance and in a vector<> because it can be too big for the stack.

Perform the radix count all at once, in 'parallel' (the CPU should be able to parallelize the inner loop).

Convert the counts into offsets via a cumulative sum.

This inner loop should be parallelizable by the CPU.

FIRST-TIME READER: Skip this section, which is only for signed integers: you can go back to it at the end.

If T is signed, and if there were any negative numbers, we'll need to account for that. For floating-point types, we do that at the end of this function. For integer types, fortunately, it's easy and fast to do it now: negative numbers were treated as top-half values in the last radix pass. We can poll the most significant count[] bucket corresponding to the min negative number, immediately see if there were any negative numbers, and patch the last count[] offsets in that case. Number of bits of the radix in the last pass. E.g. if U is 32 bits,

Todo
: remove the if constexpr so that compilation catches the bad cases.

There are some negative values, and they're sorted last instead of first, since we considered them as unsigned so far. E.g., with bytes: 00000000, ..., 01111111, 10000000, ..., 11111111. Fixing that is easy: we take the 10000000..11111111 chunks and shift it before all the 00000000..01111111 ones.

Shift non-negatives by +num_negative_values...

... and negatives by -num_nonnegative_values.

Perform the radix sort, using a temporary buffer.

FIRST-TIME READER: Skip this section, which is only for negative floats. We fix mis-sorted negative floating-point numbers here.

Negative floating-point numbers are sorted exactly in the reverse order. Unlike for integers, we need to std::reverse() them, and also shift them back before the positive ones.

If we swapped an odd number of times, we're lucky: we don't need to make an extra copy.

Todo
(user): See if this is faster than memcpy + std::reverse().

We can't move + reverse in-place, so we need the temporary buffer. First, we copy all negative numbers to the temporary buffer.

Then we shift the nonnegative.

Todo
(user): See if memcpy everything + memcpy here is faster than memmove().

If there were negative floats, we've done our work and are done. Else we still may need to move the data from the temp buffer to 'values'.

If we swapped an odd number of times, copy tmp[] onto values[].

Definition at line 101 of file radix_sort.h.

◆ RangeConvexMinimum() [1/2]

template<class Point, class Value>
std::pair< Point, Value > operations_research::RangeConvexMinimum ( Point begin,
Point end,
absl::FunctionRef< Value(Point)> f )

Searches in the range [begin, end), where Point supports basic arithmetic.

Starts by splitting interval in two with two queries and getting some info. Note the current min will be outside the interval.

Note
we exclude before_mid from the range.

Definition at line 247 of file binary_search.h.

◆ RangeConvexMinimum() [2/2]

template<class Point, class Value>
std::pair< Point, Value > operations_research::RangeConvexMinimum ( std::pair< Point, Value > current_min,
Point begin,
Point end,
absl::FunctionRef< Value(Point)> f )

If the midpoint is no better than our current minimum, then the global min must lie between our midpoint and our current min.

v < current_min.second, we cannot decide, so we use a second value close to v like in the initial step.

Definition at line 280 of file binary_search.h.

◆ RationalApproximation()

Fraction operations_research::RationalApproximation ( const double x,
const double precision )

Computes a rational approximation numerator/denominator for value x using a continued fraction algorithm. The absolute difference between the output fraction and the input "x" will not exceed "precision".

Computes a rational approximation numerator/denominator for value x using a continued fraction algorithm. The absolute difference between the output fraction and the input "x" will not exceed "precision".

Todo
(user): make a parameterized template with integer and floating-point type parameters.

All computations are made on long doubles to guarantee the maximum precision for the approximations. This way, the approximations when Fractional is float or double are as accurate as possible.

If there was an overflow, we prefer returning a not-so-good approximation rather than something that is completely wrong.

Definition at line 27 of file rational_approximation.cc.

◆ ReadAllRecordsOrDie() [1/2]

template<typename Proto>
std::vector< Proto > operations_research::ReadAllRecordsOrDie ( absl::string_view filename)

Reads all records in Proto format in 'file'. Silently does nothing if the file is empty. Dies if the file doesn't exist or contains something else than protos encoded in RecordIO format.

Definition at line 117 of file file_util.h.

◆ ReadAllRecordsOrDie() [2/2]

template<typename Proto>
std::vector< Proto > operations_research::ReadAllRecordsOrDie ( File * file)

Definition at line 121 of file file_util.h.

◆ ReadFileToProto() [1/2]

template<typename Proto>
absl::StatusOr< Proto > operations_research::ReadFileToProto ( absl::string_view filename,
bool allow_partial = false )

Definition at line 51 of file file_util.h.

◆ ReadFileToProto() [2/2]

absl::Status operations_research::ReadFileToProto ( absl::string_view filename,
google::protobuf::Message * proto,
bool allow_partial = false )

Reads a proto from a file. Supports the following formats: binary, text, JSON, all of those optionally gzipped. Returns errors as expected: filesystem error, parsing errors, or type error: maybe it was a valid JSON, text proto, or binary proto, but not of the right proto message (this is not an exact science, but the heuristics used should work well in practice).

Parameters
allow_partialIf true, unset required fields don't cause errors. This boolean doesn't work for JSON inputs.

Definition at line 54 of file file_util.cc.

◆ ReadFileToString()

absl::StatusOr< std::string > operations_research::ReadFileToString ( absl::string_view filename)

Reads a file, optionally gzipped, to a string.

Try decompressing it.

Definition at line 43 of file file_util.cc.

◆ ReadFimiDat()

SetCoverModel operations_research::ReadFimiDat ( absl::string_view filename)

Reads a file in the FIMI / .dat file format. FIMI stands for "Frequent Itemset Mining Implementations". The file is given column-by-column, with each column containing a space- separated list of elements terminating with a newline. The elements are 0-indexed. The cost of each subset is 1.

Read the file once to discover the smallest element index.

As there can be repetitions in the data, we need to keep track of the elements already added to the subset.

Re-index the elements starting from 0.

Clean up the list of elements.

Definition at line 182 of file set_cover_reader.cc.

◆ ReadModel()

SetCoverModel operations_research::ReadModel ( absl::string_view filename,
FileFormat format )
Todo
(user): Move this set_cover_reader

Definition at line 189 of file set_cover_solve.cc.

◆ ReadOneRecordOrDie()

template<typename Proto>
Proto operations_research::ReadOneRecordOrDie ( absl::string_view filename)

Reads one record from file, which must be in RecordIO binary proto format. Dies if the file can't be read, doesn't contain exactly one record, or contains something else than the expected proto in RecordIO format.

Definition at line 129 of file file_util.h.

◆ ReadOrlibRail()

SetCoverModel operations_research::ReadOrlibRail ( absl::string_view filename)

This is a column-based format where the elements are 1-indexed.

Reads a rail set cover problem and returns a SetCoverModel. The format of these test problems is: number of rows (m), number of columns (n) for each column j (j=1,...,n): the cost of the column, the number of rows that it covers followed by a list of the rows that it covers. The columns and rows are 1-indexed with this file format. The translation to 0-indexing is done at read time.

Correct the 1-indexing.

Definition at line 153 of file set_cover_reader.cc.

◆ ReadOrlibScp()

SetCoverModel operations_research::ReadOrlibScp ( absl::string_view filename)

This is a row-based format where the elements are 1-indexed.

Readers for set covering problems at http://people.brunel.ac.uk/~mastjjb/jeb/orlib/scpinfo.html All the instances have either the Beasley or the rail format. There is currently NO error handling, as the files are in a limited number.

Todo
(user): add proper error handling.

Also, note that the indices in the files, when mentioned, start from 1, while SetCoverModel starts from 0, The translation is done at read time. Reads a rail set cover problem create by Beasley and returns a SetCoverModel. The format of all of these 80 data files is: number of rows (m), number of columns (n) for each column j, (j=1,...,n): the cost of the column c(j) for each row i (i=1,...,m): the number of columns which cover row i followed by a list of the columns which cover row i The columns and rows are 1-indexed with this file format. The translation to 0-indexing is done at read time.

Correct the 1-indexing.

Definition at line 122 of file set_cover_reader.cc.

◆ readParameter()

bool operations_research::readParameter ( XPRSprob const & prob,
std::string const & name,
std::string const & value )

Apply the specified name=value setting to prob.

We cannot set empty parameters.

Figure out the type of the control.

Depending on the type, parse the text in value and apply it.

Note
string parameters are not supported at the moment since we don't want to deal with potential encoding or escaping issues.

Definition at line 61 of file xpress_interface.cc.

◆ ReadQapProblemOrDie()

QapProblem operations_research::ReadQapProblemOrDie ( absl::string_view filepath)
Todo
(user): Unit test cases when the function dies, or return (and test) a status instead.

Reads a QAP problem from file in a format used in QAPLIB. See anjos.mgi.polymtl.ca/qaplib/ for more context. The format is "n W D", where n is the number of factories/locations, and W and D are weight and distance matrices, respectively. Both W and D are square matrices of size N x N. Each entry of the matrices must parse as double (we CHECK if it does). Multiple spaces, or '
' are disregarded. For example:

2

0 2 3 0

0 2 1 0

defines a problem with two factories and two locations. There are 2 units of supply flowing from factory 0 to factory 1, and 3 units of supply flowing from factory 1 to 0. The distance from location 0 to location 1 is equal to 2, and the distance from location 1 to 0 is equal to 1.

Definition at line 30 of file qap_reader.cc.

◆ ReadSetCoverProto()

SetCoverModel operations_research::ReadSetCoverProto ( absl::string_view filename,
bool binary )

Reads a set cover problem from a SetCoverProto. The proto is either read from a binary (if binary is true) or a text file.

Definition at line 242 of file set_cover_reader.cc.

◆ ReadSetCoverSolutionProto()

SubsetBoolVector operations_research::ReadSetCoverSolutionProto ( absl::string_view filename,
bool binary )

Reads a set cover solution from a SetCoverSolutionResponse proto. The proto is either read from a binary (if binary is true) or a text file. The solution is 0-indexed.

NOTE(user): The solution is 0-indexed.

Definition at line 370 of file set_cover_reader.cc.

◆ ReadSetCoverSolutionText()

SubsetBoolVector operations_research::ReadSetCoverSolutionText ( absl::string_view filename)

Reads a set cover solution from a text file. The format of the file is: number of columns (n) number of selected columns (k) for each i (j=1,...,k): 1 if column[i] is selected, 0 otherwise. The solution is 0-indexed.

NOTE(user): The solution is 0-indexed.

Definition at line 353 of file set_cover_reader.cc.

◆ ReadSolution()

SubsetBoolVector operations_research::ReadSolution ( absl::string_view filename,
FileFormat format )
Todo
(user): Move this set_cover_reader

Definition at line 207 of file set_cover_solve.cc.

◆ RealDebugString()

template<class Container, class Element>
void operations_research::RealDebugString ( const Container & container,
std::string *const out )

Definition at line 613 of file assignment.cc.

◆ RealLoad()

template<class Var, class Element, class Proto, class Container>
void operations_research::RealLoad ( const AssignmentProto & assignment_proto,
Container *const container,
int(AssignmentProto::* GetSize )() const,
const Proto &(AssignmentProto::* GetElem )(int) const )

Definition at line 504 of file assignment.cc.

◆ RealSave()

template<class Var, class Element, class Proto, class Container>
void operations_research::RealSave ( AssignmentProto *const assignment_proto,
const Container & container,
Proto *(AssignmentProto::* Add )() )

Definition at line 577 of file assignment.cc.

◆ RegisterConstraintHandler() [1/2]

template<typename Constraint>
void operations_research::RegisterConstraintHandler ( ScipConstraintHandler< Constraint > * handler,
SCIP * scip )

handler is not owned but held.

◆ RegisterConstraintHandler() [2/2]

template<typename ConstraintData>
void operations_research::RegisterConstraintHandler ( ScipConstraintHandler< ConstraintData > * handler,
SCIP * scip )

Definition at line 251 of file scip_callback.h.

◆ RegisterDemon()

void operations_research::RegisterDemon ( Solver *const solver,
Demon *const demon,
DemonProfiler *const monitor )

--— Exported Methods for Unit Tests --—

Definition at line 465 of file demon_profiler.cc.

◆ RelocateAndMakeActive()

LocalSearchOperator * operations_research::RelocateAndMakeActive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class )

-— RelocateAndMakeActive --—

RelocateAndMakeActive relocates a node and replaces it by an inactive node. The idea is to make room for inactive nodes. Possible neighbor for paths 0 -> 4, 1 -> 2 -> 5 and 3 inactive is: 0 -> 2 -> 4, 1 -> 3 -> 5.

Todo
(user): Naming is close to MakeActiveAndRelocate but this one is correct; rename MakeActiveAndRelocate if it is actually used.

Definition at line 859 of file local_search.cc.

◆ RelocateAndMakeInactive()

LocalSearchOperator * operations_research::RelocateAndMakeInactive ( Solver * solver,
const std::vector< IntVar * > & vars,
const std::vector< IntVar * > & secondary_vars,
std::function< int(int64_t)> start_empty_path_class )

--— RelocateAndMakeInactive --—

RelocateAndMakeInactive relocates a node to a new position and makes the node which was at that position inactive. Possible neighbors for paths 0 -> 2 -> 4, 1 -> 3 -> 5 are: 0 -> 3 -> 4, 1 -> 5 & 2 inactive 0 -> 4, 1 -> 2 -> 5 & 3 inactive

Definition at line 1065 of file local_search.cc.

◆ RestoreBoolValue()

void operations_research::RestoreBoolValue ( IntVar * var)
extern

--— Trail --—

Object are explicitly copied using the copy ctor instead of passing and storing a pointer. As objects are small, copying is much faster than allocating (around 35% on a complete solve).

Definition at line 6409 of file expressions.cc.

◆ ReturnCodeString()

std::string operations_research::ReturnCodeString ( int rc)

Formats the return code of glp_intopt(), glp_simplex(), glp_exact() and glp_interior() to a string.

Definition at line 67 of file glpk_formatters.cc.

◆ RootedTreeFromGraph() [1/2]

template<typename Graph>
absl::StatusOr< RootedTree< typename Graph::NodeIndex > > operations_research::RootedTreeFromGraph ( const typename Graph::NodeIndex root,
const Graph & graph,
std::vector< typename Graph::NodeIndex > *const topological_order,
std::vector< typename Graph::NodeIndex > *const depths )
Note
this will also catch nodes with self loops.

Definition at line 746 of file rooted_tree.h.

◆ RootedTreeFromGraph() [2/2]

template<typename Graph>
absl::StatusOr< RootedTree< typename Graph::NodeType > > operations_research::RootedTreeFromGraph ( typename Graph::NodeType root,
const Graph & graph,
std::vector< typename Graph::NodeType > * topological_order = nullptr,
std::vector< typename Graph::NodeType > * depths = nullptr )

Graph API Converts an adjacency list representation of an undirected tree into a rooted tree.

Graph must meet the API defined in ortools/graph/graph.h, e.g., StaticGraph or ListGraph. Note that these are directed graph APIs, so they must have both forward and backward arcs for each edge in the tree.

Graph must be a tree when viewed as an undirected graph.

If topological_order is not null, it is set to a vector with one entry for each node giving a topological ordering over the nodes of the graph, with the root first.

If depths is not null, it is set to a vector with one entry for each node, giving the depth in the tree of that node (the root has depth zero).

◆ RoutingSearchParameters_InsertionSortingProperty_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::RoutingSearchParameters_InsertionSortingProperty_descriptor ( )

Definition at line 698 of file routing_parameters.pb.cc.

◆ RoutingSearchParameters_InsertionSortingProperty_IsValid()

bool operations_research::RoutingSearchParameters_InsertionSortingProperty_IsValid ( int value)
inline

Definition at line 160 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_InsertionSortingProperty_Name() [1/2]

template<>
const ::std::string & operations_research::RoutingSearchParameters_InsertionSortingProperty_Name ( RoutingSearchParameters_InsertionSortingProperty value)
inline

Definition at line 173 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_InsertionSortingProperty_Name() [2/2]

template<typename T>
const ::std::string & operations_research::RoutingSearchParameters_InsertionSortingProperty_Name ( T value)

Definition at line 166 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_InsertionSortingProperty_Parse()

bool operations_research::RoutingSearchParameters_InsertionSortingProperty_Parse ( ::absl::string_view name,
RoutingSearchParameters_InsertionSortingProperty *PROTOBUF_NONNULL value )
inline

Definition at line 177 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_PairInsertionStrategy_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::RoutingSearchParameters_PairInsertionStrategy_descriptor ( )

Definition at line 692 of file routing_parameters.pb.cc.

◆ RoutingSearchParameters_PairInsertionStrategy_IsValid()

bool operations_research::RoutingSearchParameters_PairInsertionStrategy_IsValid ( int value)
inline

Definition at line 117 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_PairInsertionStrategy_Name() [1/2]

template<>
const ::std::string & operations_research::RoutingSearchParameters_PairInsertionStrategy_Name ( RoutingSearchParameters_PairInsertionStrategy value)
inline

Definition at line 130 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_PairInsertionStrategy_Name() [2/2]

template<typename T>
const ::std::string & operations_research::RoutingSearchParameters_PairInsertionStrategy_Name ( T value)

Definition at line 123 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_PairInsertionStrategy_Parse()

bool operations_research::RoutingSearchParameters_PairInsertionStrategy_Parse ( ::absl::string_view name,
RoutingSearchParameters_PairInsertionStrategy *PROTOBUF_NONNULL value )
inline

Definition at line 134 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_SchedulingSolver_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::RoutingSearchParameters_SchedulingSolver_descriptor ( )

Definition at line 704 of file routing_parameters.pb.cc.

◆ RoutingSearchParameters_SchedulingSolver_IsValid()

bool operations_research::RoutingSearchParameters_SchedulingSolver_IsValid ( int value)
inline

Definition at line 197 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_SchedulingSolver_Name() [1/2]

template<>
const ::std::string & operations_research::RoutingSearchParameters_SchedulingSolver_Name ( RoutingSearchParameters_SchedulingSolver value)
inline

Definition at line 210 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_SchedulingSolver_Name() [2/2]

template<typename T>
const ::std::string & operations_research::RoutingSearchParameters_SchedulingSolver_Name ( T value)

Definition at line 203 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_SchedulingSolver_Parse()

bool operations_research::RoutingSearchParameters_SchedulingSolver_Parse ( ::absl::string_view name,
RoutingSearchParameters_SchedulingSolver *PROTOBUF_NONNULL value )
inline

Definition at line 214 of file routing_parameters.pb.h.

◆ RoutingSearchStatus_Value_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::RoutingSearchStatus_Value_descriptor ( )

Definition at line 165 of file routing_enums.pb.cc.

◆ RoutingSearchStatus_Value_IsValid()

bool operations_research::RoutingSearchStatus_Value_IsValid ( int value)
inline

Definition at line 205 of file routing_enums.pb.h.

◆ RoutingSearchStatus_Value_Name() [1/2]

template<>
const ::std::string & operations_research::RoutingSearchStatus_Value_Name ( RoutingSearchStatus_Value value)
inline

Definition at line 218 of file routing_enums.pb.h.

◆ RoutingSearchStatus_Value_Name() [2/2]

template<typename T>
const ::std::string & operations_research::RoutingSearchStatus_Value_Name ( T value)

Definition at line 211 of file routing_enums.pb.h.

◆ RoutingSearchStatus_Value_Parse()

bool operations_research::RoutingSearchStatus_Value_Parse ( ::absl::string_view name,
RoutingSearchStatus_Value *PROTOBUF_NONNULL value )
inline

Definition at line 222 of file routing_enums.pb.h.

◆ RuinCompositionStrategy_Value_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::RuinCompositionStrategy_Value_descriptor ( )

Definition at line 480 of file routing_ils.pb.cc.

◆ RuinCompositionStrategy_Value_IsValid()

bool operations_research::RuinCompositionStrategy_Value_IsValid ( int value)
inline

Definition at line 146 of file routing_ils.pb.h.

◆ RuinCompositionStrategy_Value_Name() [1/2]

template<>
const ::std::string & operations_research::RuinCompositionStrategy_Value_Name ( RuinCompositionStrategy_Value value)
inline

Definition at line 159 of file routing_ils.pb.h.

◆ RuinCompositionStrategy_Value_Name() [2/2]

template<typename T>
const ::std::string & operations_research::RuinCompositionStrategy_Value_Name ( T value)

Definition at line 152 of file routing_ils.pb.h.

◆ RuinCompositionStrategy_Value_Parse()

bool operations_research::RuinCompositionStrategy_Value_Parse ( ::absl::string_view name,
RuinCompositionStrategy_Value *PROTOBUF_NONNULL value )
inline

Definition at line 163 of file routing_ils.pb.h.

◆ Run()

void operations_research::Run ( )

Definition at line 680 of file set_cover_solve.cc.

◆ RunGreedy()

SetCoverInvariant operations_research::RunGreedy ( SetCoverModel * model)

Definition at line 271 of file set_cover_solve.cc.

◆ RunLazyElementDegree()

SetCoverInvariant operations_research::RunLazyElementDegree ( SetCoverModel * model)

Definition at line 262 of file set_cover_solve.cc.

◆ RunSeparation()

ScipSeparationResult operations_research::RunSeparation ( internal::ScipCallbackRunner * runner,
const ScipConstraintHandlerContext & context,
absl::Span< SCIP_CONS * > constraints,
bool is_integral )

If any violated lazy constraint is found: returns kLazyConstraintAdded, else if any violated cutting plane is found: returns kCuttingPlaneAdded, else: returns kDidNotFind

Two code paths, one for cuts, one for lazy constraints. Cuts first:

NOTE(user): the coefficients don't come out sorted. I don't think this matters.

Todo
(user): when infeasible is true, it better to have the scip return status be cutoff instead of cutting plane added (e.g. see cs/scip/src/scip/cons_knapsack.c). However, as we use SCIPaddRow(), it isn't clear this will even happen.

NOTE(user): if we have already found a violated lazy constraint, we want to return kLazyConstraintAdded, not kCuttingPlaneAdded, see function contract.

Lazy constraint path:

NOTE(user): the coefficients don't come out sorted. I don't think this matters.

Todo
(user): Maybe it is better to expose more of these options, potentially through user_suggested_constraint.

Definition at line 118 of file scip_callback.cc.

◆ RunTimeInMicroseconds()

int64_t operations_research::RunTimeInMicroseconds ( const SetCoverSolutionGenerator & gen)

Definition at line 109 of file set_cover_solve.cc.

◆ RunTimeInNanoseconds()

int64_t operations_research::RunTimeInNanoseconds ( const SetCoverSolutionGenerator & gen)

Definition at line 113 of file set_cover_solve.cc.

◆ RunWorker()

void operations_research::RunWorker ( void * data)

Definition at line 23 of file threadpool.cc.

◆ SafeAddInto()

template<typename IntegerType>
bool operations_research::SafeAddInto ( IntegerType a,
IntegerType * b )

Performs *b += a and returns false iff the addition overflow or underflow. This function only works for typed integer type (IntType<>).

Definition at line 133 of file saturated_arithmetic.h.

◆ SafeProtoConstDownCast()

template<class Proto>
absl::StatusOr< const Proto * > operations_research::SafeProtoConstDownCast ( const google::protobuf::Message * proto)

Definition at line 63 of file proto_tools.h.

◆ SafeProtoDownCast()

template<class Proto>
absl::StatusOr< Proto * > operations_research::SafeProtoDownCast ( google::protobuf::Message * proto)

Implementation of function templates.

Casts a generic google::protobuf::Message* to a specific proto type, or returns an InvalidArgumentError if it doesn't seem to be of the right type. Comes in non-const and const versions. NOTE(user): You should rather use DynamicCastToGenerated() from message.h if you don't need the fancy error message or the absl::Status.

Definition at line 50 of file proto_tools.h.

◆ SatSolveProto()

MPSolutionResponse operations_research::SatSolveProto ( LazyMutableCopy< MPModelRequest > request,
std::atomic< bool > * interrupt_solve = nullptr,
std::function< void(const std::string &)> logging_callback = nullptr,
std::function< void(const MPSolution &)> solution_callback = nullptr )

Solve the input MIP model with the SAT solver.

If possible, std::move the request into this function call to avoid a copy.

If you need to change the solver parameters, please use the EncodeParametersAsString() function to set the request's solver_specific_parameters field.

The optional interrupt_solve can be used to interrupt the solve early. It must only be set to true, never reset to false. It is also used internally by the solver that will set it to true for its own internal logic. As a consequence the caller should ignore the stored value and should not use the same atomic for different concurrent calls.

The optional logging_callback will be called when the SAT parameter log_search_progress is set to true. Passing a callback will disable the default logging to INFO. Note though that by default the SAT parameter log_to_stdout is true so even with a callback, the logs will appear on stdout too unless log_to_stdout is set to false. The enable_internal_solver_output in the request will act as the SAT parameter log_search_progress.

The optional solution_callback will be called on each intermediate solution found by the solver. The solver may call solution_callback from multiple threads, but it will ensure that at most one thread executes solution_callback at a time.

Todo
(user): We do not support all the parameters here. In particular the logs before the solver is called will not be appended to the response. Fix that, and remove code duplication for the logger config. One way should be to not touch/configure anything if the logger is already created while calling SolveCpModel() and call a common config function from here or from inside Solve()?

Set it now so that it can be overwritten by the solver specific parameters.

See EncodeSatParametersAsString() documentation.

Validate parameters.

Reconfigure the logger in case the solver_specific_parameters overwrite its configuration. Note that the invalid parameter message will be logged before that though according to request.enable_internal_solver_output().

Model validation and delta handling.

Note
the ExtractValidMPModelInPlaceOrPopulateResponseStatus() can also close trivial model (empty or trivially infeasible). So this is not always the MODEL_INVALID status.

The logging is only needed for our benchmark script, so we use UNKNOWN here, but we could log the proper status instead.

We will presolve directly on the MPModelProto, so get a copy or transfer ownership from the LazyMutableCopy<MPModelProto>().

The request is no longer needed after this. Important: we need to copy the model above before clearing this.

We start by some extra validation since our code do not accept any kind of input.

This is good to do before any presolve.

Coefficients really close to zero can cause issues. We remove them right away according to our parameters.

Note(user): the LP presolvers API is a bit weird and keep a reference to the given GlopParameters, so we need to make sure it outlive them.

Continue with the solve.

Todo
(user): We put the INFEASIBLE_OR_UNBOUNBED case here since there is no return status that exactly matches it.

This is needed for our benchmark scripts.

We need to do that before the automatic detection of integers.

Abort if one only want to solve pure-IP model and we don't have one.

Copy and scale the hint if there is one.

To handle weird hint input values, we cap any large value to +/- mip_max_bound() which is also the min/max value of any variable once scaled.

We no longer need the mp_model after this, reclaime its memory.

Configure model.

Postsolve the bound shift and scaling.

Solve.

Convert the response.

Todo
(user): Implement the row and column status.

Copy and postsolve any additional solutions.

Todo
(user): Remove the postsolve hack of copying to a response.

If the scaling factor is unset/zero, it is assumed to be one.

Definition at line 160 of file sat_proto_solver.cc.

◆ SatSolverVersion()

std::string operations_research::SatSolverVersion ( )

Returns a string that describes the version of the CP-SAT solver.

Definition at line 493 of file sat_proto_solver.cc.

◆ ScipSolveProto()

absl::StatusOr< MPSolutionResponse > operations_research::ScipSolveProto ( LazyMutableCopy< MPModelRequest > request)

Note, here we do not override any of SCIP default parameters. This behavior differs from MPSolver::Solve() which sets the feasibility tolerance to 1e-7, and the gap limit to 0.0001 (whereas SCIP defaults are 1e-6 and 0, respectively, and they are being used here).

Release all created pointers.

Default clock type. We use wall clock time because getting CPU user seconds involves calling times() which is very expensive. NOTE(user): Also, time limit based on CPU user seconds is NOT thread safe. We observed that different instances of SCIP running concurrently in different threads consume the time limit together. E.g., 2 threads running SCIP with time limit 10s each will both terminate after ~5s.

These extra arrays are used by quadratic constraints.

can't make 'scip_solution' const, as SCIPxxx does not offer const parameter functions.

NOTE(user): As of SCIP 7.0.1, getting the pointer to all solutions is as fast as getting the pointer to the best solution. See scip/src/scip/scip_sol.c?l=2264&rcl=322332899.

To be consistent with the other solvers.

NOTE(user): After looking at the SCIP code on 2019-06-14, it seems that this will mostly happen for INFEASIBLE problems in practice. Since most (all?) users shouldn't have their application behave very differently upon INFEASIBLE or UNBOUNDED, the potential error that we are making here seems reasonable (and not worth a LOG, unless in debug mode).

Definition at line 718 of file scip_proto_solver.cc.

◆ SetAssignmentFromAssignment()

void operations_research::SetAssignmentFromAssignment ( Assignment * target_assignment,
const std::vector< IntVar * > & target_vars,
const Assignment * source_assignment,
const std::vector< IntVar * > & source_vars )

NOLINT.

Given a "source_assignment", clears the "target_assignment" and adds all IntVars in "target_vars", with the values of the variables set according to the corresponding values of "source_vars" in "source_assignment". source_vars and target_vars must have the same number of elements. The source and target assignments can belong to different Solvers.

Definition at line 947 of file assignment.cc.

◆ SetBit32()

void operations_research::SetBit32 ( uint32_t *const bitset,
uint32_t pos )
inline

Definition at line 360 of file bitset.h.

◆ SetBit64()

void operations_research::SetBit64 ( uint64_t *const bitset,
uint64_t pos )
inline

Sets the bit pos to true in bitset.

Definition at line 357 of file bitset.h.

◆ SetCoverSolutionResponse_Status_descriptor()

OR_PROTO_DLLconst::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL operations_research::SetCoverSolutionResponse_Status_descriptor ( )

Definition at line 217 of file set_cover.pb.cc.

◆ SetCoverSolutionResponse_Status_IsValid()

bool operations_research::SetCoverSolutionResponse_Status_IsValid ( int value)
inline

Definition at line 99 of file set_cover.pb.h.

◆ SetCoverSolutionResponse_Status_Name() [1/2]

template<>
const ::std::string & operations_research::SetCoverSolutionResponse_Status_Name ( SetCoverSolutionResponse_Status value)
inline

Definition at line 112 of file set_cover.pb.h.

◆ SetCoverSolutionResponse_Status_Name() [2/2]

template<typename T>
const ::std::string & operations_research::SetCoverSolutionResponse_Status_Name ( T value)

Definition at line 105 of file set_cover.pb.h.

◆ SetCoverSolutionResponse_Status_Parse()

bool operations_research::SetCoverSolutionResponse_Status_Parse ( ::absl::string_view name,
SetCoverSolutionResponse_Status *PROTOBUF_NONNULL value )
inline

Definition at line 116 of file set_cover.pb.h.

◆ SetIsEqual()

Constraint * operations_research::SetIsEqual ( IntVar *const var,
absl::Span< const int64_t > values,
const std::vector< IntVar * > & vars )

Definition at line 6394 of file expressions.cc.

◆ SetIsGreaterOrEqual()

Constraint * operations_research::SetIsGreaterOrEqual ( IntVar *const var,
absl::Span< const int64_t > values,
const std::vector< IntVar * > & vars )

Definition at line 6401 of file expressions.cc.

◆ setobjoffset()

int operations_research::setobjoffset ( const XPRSprob & mLp,
double value )
Todo
detect xpress version

Definition at line 184 of file xpress_interface.cc.

◆ SetSolverSpecificParameters() [1/2]

absl::Status operations_research::SetSolverSpecificParameters ( absl::string_view parameters,
GRBenv * gurobi )

Set parameters specified in the string. The format of the string is a series of tokens separated by either '
' or by ',' characters. Any token whose first character is a '#' or has zero length is skipped. Comment tokens (i.e. those starting with #) can contain ',' characters. Any other token has the form: parameter_name(separator)value where (separator) is either '=' or ' '. A valid string can look-like: "#\n# Gurobi-specific parameters, still part of the comment\n\nThreads=1\nPresolve 2,SolutionLimit=100" This function will process each and every token, even if an intermediate token is unrecognized.

Empty lines are simply ignored.

Comment tokens end at the next new-line, or the end of the string. The first character must be '#'

If one parameter fails, we keep processing the list of parameters.

Definition at line 233 of file gurobi_proto_solver.cc.

◆ SetSolverSpecificParameters() [2/2]

absl::Status operations_research::SetSolverSpecificParameters ( const std::string & parameters,
Highs & highs )

Comment tokens end at the next new-line, or the end of the string. The first character must be '#'

If one parameter fails, we keep processing the list of parameters.

Definition at line 303 of file highs_proto_solver.cc.

◆ SetupGlpkEnvAutomaticDeletion()

void operations_research::SetupGlpkEnvAutomaticDeletion ( )

Setups a thread local that will call glp_free_env() when the calling thread exits. This method is safe to be called multiple times on the same thread and is thread-safe.

This function needs to be called on any thread where glp_create_prob() is called since Glpk automatically creates an environment on each thread if it does not already exist but does not have any code to free it. Thus it leaks.

The GlpkEnvDeleter will be created at most once per thread where the function is called and its destructor will be called at the exit of this thread.

Definition at line 35 of file glpk_env_deleter.cc.

◆ ShortestPathsOnDag()

PathWithLength operations_research::ShortestPathsOnDag ( int num_nodes,
absl::Span< const ArcWithLength > arcs_with_length,
int source,
int destination )

Returns {+inf, {}, {}} if there is no path of finite length from the source to the destination. Dies if arcs_with_length has a cycle.

Definition at line 83 of file dag_shortest_path.cc.

◆ SimpleOneToOneShortestPath()

template<typename NodeIndex, typename DistanceType>
std::pair< DistanceType, std::vector< NodeIndex > > operations_research::SimpleOneToOneShortestPath ( NodeIndex source,
NodeIndex destination,
absl::Span< const NodeIndex > tails,
absl::Span< const NodeIndex > heads,
absl::Span< const DistanceType > lengths,
DistanceType limit = std::numeric_limits<DistanceType>::max() )

Computes a shortest path from source to destination in a weighted directed graph, specified as an arc list.

This function also demonstrates how to use the more feature rich BoundedDijkstraWrapper (defined below) in the simple case, see the implementation at the bottom of this file.

We take a sparse directed input graph with nodes indexed in [0, num_nodes). Each arcs goes from a tail node to a head node (tail -> head) and must have a NON-NEGATIVE length. Self-arc or duplicate arcs are supported. This is provided as 3 parallel vectors of the same size. Note that we validate the input consistency with checks.

If your graph is undirected, you can easily transform it by adding two arcs (a -> b and b -> a) for each edge (a <-> b).

This returns a pair (path length, node-path from source to destination) corresponding to a shortest path. Both source and destination will be included in the path.

If destination is not reachable from source, or if the shortest path length is >= limit we will return {limit, {}}. As a consequence any arc length >= limit is the same as no arc. The code is also overflow-safe and will behave correctly if the limit is int64max or infinity.

Example usage.

Compute the number of nodes.

This is not necessary, but is a good practice to allocate the graph size in one go. We also do some basic validation.

The number of arcs.

Build the graph. Note that this permutes arc indices for speed, but we don't care here since we will return a node path.

Negative length can cause the algo to loop forever and/or use a lot of memory. So it should be validated.

Compute a shortest path. This should work for both float/double or integer distances.

No path exists, or shortest_distance >= limit.

A path exist, returns it.

Definition at line 672 of file bounded_dijkstra.h.

◆ SlopeAndYInterceptToConvexityRegions()

std::vector< bool > operations_research::SlopeAndYInterceptToConvexityRegions ( absl::Span< const SlopeAndYIntercept > slope_and_y_intercept)

Converts a vector of SlopeAndYIntercept to a vector of convexity regions. Convexity regions are defined such that, all segment in a convexity region form a convex function. The boolean in the vector is set to true if the segment associated to it starts a new convexity region. Therefore, a convex function would yield {true, false, false, ...} and a concave function would yield {true, true, true, ...}.

Definition at line 1334 of file routing_lp_scheduling.cc.

◆ solution()

Select next search node to expand Select next item_i to add this new search node to the search Generate a new search node where item_i is not in the knapsack Check validity of this new partial operations_research::solution ( using propagators)

◆ SolutionStatusString()

std::string operations_research::SolutionStatusString ( const int status)

Formats a solution status (GLP_OPT,...).

Definition at line 31 of file glpk_formatters.cc.

◆ SolveFromAssignmentWithAlternativeSolvers()

const Assignment * operations_research::SolveFromAssignmentWithAlternativeSolvers ( const Assignment * assignment,
RoutingModel * primary_model,
const std::vector< RoutingModel * > & alternative_models,
const RoutingSearchParameters & parameters,
int max_non_improving_iterations )

Same as above, but taking an initial solution.

Definition at line 145 of file routing_search.cc.

◆ SolveFromAssignmentWithAlternativeSolversAndParameters()

const Assignment * operations_research::SolveFromAssignmentWithAlternativeSolversAndParameters ( const Assignment * assignment,
RoutingModel * primary_model,
const RoutingSearchParameters & primary_parameters,
const std::vector< RoutingModel * > & alternative_models,
const std::vector< RoutingSearchParameters > & alternative_parameters,
int max_non_improving_iterations )

Same as above but taking alternative parameters for each alternative model.

Shortcut if no alternative models will be explored.

The first alternating phases are limited to greedy descent. The final pass at the end of this function will actually use the metaheuristic if needed.

Todo
(user): Add support for multiple metaheuristics.

No modifications done in this iteration, no need to continue.

We're back to the best assignment which means we will cycle if we continue the search.

Definition at line 155 of file routing_search.cc.

◆ SolveMaxFlow()

template<typename GraphType>
void operations_research::SolveMaxFlow ( const FlowModelProto & flow_model,
double * loading_time,
double * solving_time,
std::function< void(GraphType *graph)> configure_graph_options = nullptr )

Loads a FlowModelProto proto into the MaxFlow class and solves it.

Build the graph.

Find source & sink.

Create the max flow instance and set the arc capacities.

Definition at line 234 of file solve_flow_model.cc.

◆ SolveMinCostFlow()

void operations_research::SolveMinCostFlow ( const FlowModelProto & flow_model,
double * loading_time,
double * solving_time )

Loads a FlowModelProto proto into the MinCostFlow class and solves it.

Compute the number of nodes.

Build the graph.

Definition at line 186 of file solve_flow_model.cc.

◆ SolveModelWithSat()

bool operations_research::SolveModelWithSat ( RoutingModel * model,
const RoutingSearchParameters & search_parameters,
const Assignment * initial_solution,
Assignment * solution )

Solves a RoutingModel using the CP-SAT solver. Returns false if no solution was found.

Todo
(user): Check that performance is acceptable.
Todo
(user): Check that performance is acceptable.

Definition at line 1157 of file routing_sat.cc.

◆ SolveMPModel()

MPSolutionResponse operations_research::SolveMPModel ( LazyMutableCopy< MPModelRequest > request,
const SolveInterrupter * interrupter )
Todo
(b/311704821): this function should not delegate to MPSolver, also true for the functions below.

Solves the model encoded by a MPModelRequest protocol buffer and returns the solution encoded as a MPSolutionResponse.

LazyMutableCopy<> accept both 'const MPModelRequest&' and 'MPModelRequest&&' prefer to call this with the std::move() version if you no longer need the request. It will allows to reclaim the request memory as soon as it is converted to one of the solver internal data representation.

If interrupter is non-null, one can call interrupter->Interrupt() to stop the solver earlier. Interruption is only supported if SolverTypeSupportsInterruption() returns true for the requested solver. Passing a non-null pointer with any other solver type immediately returns an MPSOLVER_INCOMPATIBLE_OPTIONS error.

Definition at line 29 of file solve_mp_model.cc.

◆ SolverTypeIsMip() [1/2]

bool operations_research::SolverTypeIsMip ( MPModelRequest::SolverType solver_type)

There is a homonymous version taking a MPSolver::OptimizationProblemType.

Definition at line 85 of file linear_solver.cc.

◆ SolverTypeIsMip() [2/2]

bool operations_research::SolverTypeIsMip ( MPSolver::OptimizationProblemType solver_type)
inline

Definition at line 991 of file linear_solver.h.

◆ SolverTypeSupportsInterruption()

bool operations_research::SolverTypeSupportsInterruption ( const MPModelRequest::SolverType solver)

Definition at line 44 of file solve_mp_model.cc.

◆ SolveWithAlternativeSolvers()

const Assignment * operations_research::SolveWithAlternativeSolvers ( RoutingModel * primary_model,
const std::vector< RoutingModel * > & alternative_models,
const RoutingSearchParameters & parameters,
int max_non_improving_iterations )

Solves a routing model using alternative models. This assumes that the models are equivalent in the sense that a solution to one model is also a solution to the other models. This is true for models that differ only by their arc costs or objective for instance. The primary model is the main model, to which the returned solution will correspond. The method solves the primary model and alternative models alternatively. It works as follows (all solves use 'parameters'): 1) solve the primary model with a greedy descent, 2) let 'alt' be the first alternative model, 3) solve 'alt' starting from the solution to the primary model with a greedy descent, 4) solve the primary model from the solution to 'alt' with a greedy descent, 5) if the new solution improves the best solution found so far, update it, otherwise increase the iteration counter, 6) if the iteration counter is less than 'max_non_improving_iterations', let 'alt' be the next "round-robin" alternative model, and go to step 3, 7) if 'parameters' specified a metaheuristic, solve the primary model using that metaheuristic starting from the best solution found so far, 8) return the best solution found.

Note
if the time limit is reached at any stage, the search is interrupted and the best solution found will be returned immediately.
Todo
(user): Add a version taking search parameters for alternative models.

Definition at line 135 of file routing_search.cc.

◆ splitMyString()

template<class Container>
void operations_research::splitMyString ( const std::string & str,
Container & cont,
char delim = ' ' )
Todo
useless ?

Definition at line 2100 of file xpress_interface.cc.

◆ stringToCharPtr()

bool operations_research::stringToCharPtr ( const std::string & var,
const char ** out )

Definition at line 2108 of file xpress_interface.cc.

◆ StringToProto()

absl::Status operations_research::StringToProto ( absl::string_view data,
google::protobuf::Message * proto,
bool allow_partial )

Exactly like ReadFileToProto(), but directly from the contents.

Try decompressing it.

Try binary format first, then text format, then JSON, then proto3 JSON, then give up. For some of those, like binary format and proto3 JSON, we perform additional checks to verify that we have the right proto: it can happen to try to read a proto of type Foo as a proto of type Bar, by mistake, and we'd rather have this function fail rather than silently accept it, because the proto parser is too lenient with unknown fields. We don't require ByteSizeLong(parsed) == input.size(), because it may be the case that the proto version changed and some fields are dropped. We just fail when the difference is too large.

NOTE(user): When using ParseFromString() from a generic google::protobuf::Message, like we do here, all fields are stored, even if they are unknown in the underlying proto type. Unless we explicitly discard those 'unknown fields' here, our call to ByteSizeLong() will still count the unknown payload.

We convert the 0-indexed line to 1-indexed.

NOTE(user): We protect against the JSON proto3 parser being very lenient and easily accepting any JSON as a valid JSON for our proto: if the parsed proto's size is too small compared to the JSON, we probably parsed a JSON that wasn't representing a valid proto.

Definition at line 63 of file file_util.cc.

◆ STRONG_TYPE_ARITHMETIC_OP() [1/11]

operations_research::STRONG_TYPE_ARITHMETIC_OP ( StrongIndex ,
int ,
%  )

◆ STRONG_TYPE_ARITHMETIC_OP() [2/11]

operations_research::STRONG_TYPE_ARITHMETIC_OP ( StrongIndex ,
int ,
*  )

◆ STRONG_TYPE_ARITHMETIC_OP() [3/11]

operations_research::STRONG_TYPE_ARITHMETIC_OP ( StrongIndex ,
int ,
-  )

◆ STRONG_TYPE_ARITHMETIC_OP() [4/11]

operations_research::STRONG_TYPE_ARITHMETIC_OP ( StrongIndex ,
int ,
+  )

◆ STRONG_TYPE_ARITHMETIC_OP() [5/11]

operations_research::STRONG_TYPE_ARITHMETIC_OP ( StrongInt64 ,
int64_t ,
%  )

◆ STRONG_TYPE_ARITHMETIC_OP() [6/11]

operations_research::STRONG_TYPE_ARITHMETIC_OP ( StrongInt64 ,
int64_t ,
*  )

◆ STRONG_TYPE_ARITHMETIC_OP() [7/11]

operations_research::STRONG_TYPE_ARITHMETIC_OP ( StrongInt64 ,
int64_t ,
-  )

◆ STRONG_TYPE_ARITHMETIC_OP() [8/11]

operations_research::STRONG_TYPE_ARITHMETIC_OP ( StrongInt64 ,
int64_t  )

◆ STRONG_TYPE_ARITHMETIC_OP() [9/11]

operations_research::STRONG_TYPE_ARITHMETIC_OP ( StrongInt64 ,
int64_t ,
+  )

◆ STRONG_TYPE_ARITHMETIC_OP() [10/11]

operations_research::STRONG_TYPE_ARITHMETIC_OP ( StrongInt64 ,
int64_t ,
/  )

◆ STRONG_TYPE_ARITHMETIC_OP() [11/11]

operations_research::STRONG_TYPE_ARITHMETIC_OP ( StrongInt64 ,
int64_t ,
<<  )

◆ STRONG_TYPE_COMPARISON_OP() [1/8]

operations_research::STRONG_TYPE_COMPARISON_OP ( StrongIndex ,
int ,
!  )

◆ STRONG_TYPE_COMPARISON_OP() [2/8]

operations_research::STRONG_TYPE_COMPARISON_OP ( StrongIndex ,
int ,
>=  )

◆ STRONG_TYPE_COMPARISON_OP() [3/8]

operations_research::STRONG_TYPE_COMPARISON_OP ( StrongIndex ,
int ,
<=  )

◆ STRONG_TYPE_COMPARISON_OP() [4/8]

operations_research::STRONG_TYPE_COMPARISON_OP ( StrongIndex ,
int  )

◆ STRONG_TYPE_COMPARISON_OP() [5/8]

operations_research::STRONG_TYPE_COMPARISON_OP ( StrongInt64 ,
int64_t ,
!  )

◆ STRONG_TYPE_COMPARISON_OP() [6/8]

operations_research::STRONG_TYPE_COMPARISON_OP ( StrongInt64 ,
int64_t ,
>=  )

◆ STRONG_TYPE_COMPARISON_OP() [7/8]

operations_research::STRONG_TYPE_COMPARISON_OP ( StrongInt64 ,
int64_t ,
<=  )

◆ STRONG_TYPE_COMPARISON_OP() [8/8]

operations_research::STRONG_TYPE_COMPARISON_OP ( StrongInt64 ,
int64_t  )

◆ strtoint32()

int32_t operations_research::strtoint32 ( absl::string_view word)

Definition at line 26 of file strtoint.cc.

◆ strtoint64()

int64_t operations_research::strtoint64 ( absl::string_view word)

Definition at line 32 of file strtoint.cc.

◆ SubHadOverflow()

bool operations_research::SubHadOverflow ( int64_t x,
int64_t y,
int64_t diff )
inline

This is the same reasoning as for AddHadOverflow. We have x = diff + y. The formula is the same, with 'x' and diff exchanged.

Definition at line 107 of file saturated_arithmetic.h.

◆ SubOverflows()

int64_t operations_research::SubOverflows ( int64_t x,
int64_t y )
inline

Definition at line 126 of file saturated_arithmetic.h.

◆ SumOfKMaxValueInDomain()

int64_t operations_research::SumOfKMaxValueInDomain ( const Domain & domain,
int k )

Returns the sum of largest k values in the domain.

Definition at line 816 of file sorted_interval_list.cc.

◆ SumOfKMinValueInDomain()

int64_t operations_research::SumOfKMinValueInDomain ( const Domain & domain,
int k )

Returns the sum of smallest k values in the domain.

Definition at line 802 of file sorted_interval_list.cc.

◆ ToInt64Vector()

std::vector< int64_t > operations_research::ToInt64Vector ( const std::vector< int > & input)

--— Vector manipulations --—

Definition at line 829 of file utilities.cc.

◆ TopologicalOrderIsValid() [1/2]

template<class GraphType, typename ArcLengths>
absl::Status operations_research::TopologicalOrderIsValid ( const GraphType & graph,
absl::Span< const typename GraphType::NodeIndex > topological_order )

◆ TopologicalOrderIsValid() [2/2]

template<class GraphType>
absl::Status operations_research::TopologicalOrderIsValid ( const GraphType & graph,
absl::Span< const typename GraphType::NodeIndex > topological_order )

Definition at line 292 of file dag_shortest_path.h.

◆ ToString() [1/2]

std::string operations_research::ToString ( MPCallbackEvent event)

Definition at line 23 of file linear_solver_callback.cc.

◆ ToString() [2/2]

absl::string_view operations_research::ToString ( MPSolver::OptimizationProblemType optimization_problem_type)

Definition at line 627 of file linear_solver.cc.

◆ TruncateAndQuoteGLPKName()

std::string operations_research::TruncateAndQuoteGLPKName ( std::string_view original_name)

Returns a name which size is < kMaxGLPKNameLen and that does not contain control characters (as define by iscntrl()) (escaped using \xHH sequences).

We use \ for escape sequences; thus we must escape it too.

Simply insert non-control characters (that are not the escape character above).

Escape control characters.

Definition at line 112 of file glpk_formatters.cc.

◆ TwoBitsFromPos64()

uint64_t operations_research::TwoBitsFromPos64 ( uint64_t pos)
inline

Returns a mask with the bits pos % 64 and (pos ^ 1) % 64 sets.

Definition at line 405 of file bitset.h.

◆ TwosComplementAddition()

int64_t operations_research::TwosComplementAddition ( int64_t x,
int64_t y )
inline

-------— Overflow utility functions -------—

Implement two's complement addition and subtraction on int64s.

The C and C++ standards specify that the overflow of signed integers is undefined. This is because of the different possible representations that may be used for signed integers (one's complement, two's complement, sign and magnitude). Such overflows are detected by Address Sanitizer with -fsanitize=signed-integer-overflow.

Simple, portable overflow detection on current machines relies on these two functions. For example, if the sign of the sum of two positive integers is negative, there has been an overflow.

Note
the static assert will break if the code is compiled on machines which do not use two's complement.

Definition at line 82 of file saturated_arithmetic.h.

◆ TwosComplementSubtraction()

int64_t operations_research::TwosComplementSubtraction ( int64_t x,
int64_t y )
inline

Definition at line 89 of file saturated_arithmetic.h.

◆ UnsafeLeastSignificantBitPosition32()

int32_t operations_research::UnsafeLeastSignificantBitPosition32 ( const uint32_t * bitset,
uint32_t start,
uint32_t end )

◆ UnsafeLeastSignificantBitPosition64()

int64_t operations_research::UnsafeLeastSignificantBitPosition64 ( const uint64_t * bitset,
uint64_t start,
uint64_t end )

Unsafe versions of the functions above where respectively end and start are supposed to be set.

◆ UnsafeMostSignificantBitPosition32()

int32_t operations_research::UnsafeMostSignificantBitPosition32 ( const uint32_t * bitset,
uint32_t start,
uint32_t end )

◆ UnsafeMostSignificantBitPosition64()

int64_t operations_research::UnsafeMostSignificantBitPosition64 ( const uint64_t * bitset,
uint64_t start,
uint64_t end )

◆ VariablesToString()

std::string operations_research::VariablesToString ( absl::flat_hash_map< std::string, std::pair< sat::IntegerVariableProto, int > > & variables,
absl::flat_hash_map< std::string, std::vector< int > > & variable_instances,
absl::flat_hash_map< std::string, absl::flat_hash_set< std::string > > & variable_childs,
const sat::CpSolverResponse & response_,
absl::string_view variable,
std::string prefix = "" )

Childs

Definition at line 3285 of file routing_lp_scheduling.cc.

◆ VariableToString()

std::string operations_research::VariableToString ( std::pair< sat::IntegerVariableProto, int > & variable_pair,
const sat::CpSolverResponse & response_ )

Definition at line 3233 of file routing_lp_scheduling.cc.

◆ VectorSum()

float operations_research::VectorSum ( absl::Span< const float > values)
inline

Computes the sum of values without assuming anything.

Definition at line 37 of file vector_sum.h.

◆ WriteModel()

void operations_research::WriteModel ( const SetCoverModel & model,
const std::string & filename,
FileFormat format )
Todo
(user): Move this set_cover_reader

Definition at line 221 of file set_cover_solve.cc.

◆ WriteModelToMpsFile()

absl::Status operations_research::WriteModelToMpsFile ( absl::string_view filename,
const MPModelProto & model,
const MPModelExportOptions & options = MPModelExportOptions() )

Write the current model (variables, constraints, objective) to a file in MPS file format, using the "free" MPS format.

See ExportModelAsMpsFormat().

Definition at line 254 of file model_exporter.cc.

◆ WriteOrlibRail()

void operations_research::WriteOrlibRail ( const SetCoverModel & model,
absl::string_view filename )

Beware the fact that elements written are converted to 1-indexed.

Definition at line 322 of file set_cover_reader.cc.

◆ WriteOrlibScp()

void operations_research::WriteOrlibScp ( const SetCoverModel & model,
absl::string_view filename )

Writers for the Beasley and Rail formats. The translation of indices from 0 to 1-indexing is done at write time.

Definition at line 297 of file set_cover_reader.cc.

◆ WriteProtoToFile()

absl::Status operations_research::WriteProtoToFile ( absl::string_view filename,
const google::protobuf::Message & proto,
ProtoWriteFormat proto_write_format,
bool gzipped = false,
bool append_extension_to_file_name = true )

Writes a proto to a file. Supports the following formats: binary, text, JSON, all of those optionally gzipped. If 'proto_write_format' is kProtoBinary, ".bin" is appended to file_name. If 'proto_write_format' is kJson or kCanonicalJson, ".json" is appended to file_name. If 'gzipped' is true, ".gz" is appended to file_name.

Definition at line 143 of file file_util.cc.

◆ WriteRecordsOrDie()

template<typename Proto>
void operations_research::WriteRecordsOrDie ( absl::string_view filename,
const std::vector< Proto > & protos )

Writes all records in Proto format to 'file'. Dies if it is unable to open the file or write to it.

Definition at line 138 of file file_util.h.

◆ WriteSetCoverProto()

void operations_research::WriteSetCoverProto ( const SetCoverModel & model,
absl::string_view filename,
bool binary )

Writes a set cover problem to a SetCoverProto. The proto is either written to a binary (if binary is true) or a text file. The model is modified (its columns are sorted) in-place when the proto is generated.

Definition at line 343 of file set_cover_reader.cc.

◆ WriteSetCoverSolutionProto()

void operations_research::WriteSetCoverSolutionProto ( const SetCoverModel & model,
const SubsetBoolVector & solution,
absl::string_view filename,
bool binary )

Writes a set cover solution to a SetCoverSolutionResponse proto. The proto is either written to a binary (if binary is true) or a text file. The solution is 0-indexed.

Definition at line 413 of file set_cover_reader.cc.

◆ WriteSetCoverSolutionText()

void operations_research::WriteSetCoverSolutionText ( const SetCoverModel & model,
const SubsetBoolVector & solution,
absl::string_view filename )

Writes a set cover solution to a text file. The format of the file is: number of columns (n) number of selected columns (k) for each i (j=1,...,k): 1 if column[i] is selected, 0 otherwise. The solution is 0-indexed.

Definition at line 388 of file set_cover_reader.cc.

◆ WriteSolution()

void operations_research::WriteSolution ( const SetCoverModel & model,
const SubsetBoolVector & solution,
absl::string_view filename,
FileFormat format )
Todo
(user): Move this set_cover_reader

Definition at line 243 of file set_cover_solve.cc.

◆ XpressBasisStatusesFrom()

std::vector< int > operations_research::XpressBasisStatusesFrom ( const std::vector< MPSolver::BasisStatus > & statuses)

Definition at line 1711 of file xpress_interface.cc.

◆ XpressDynamicLibraryPotentialPaths()

std::vector< std::string > operations_research::XpressDynamicLibraryPotentialPaths ( )

Look for libraries pointed by XPRESSDIR first.

Search for canonical places.

Definition at line 203 of file environment.cc.

◆ XpressIntSolCallbackImpl()

void XPRS_CC operations_research::XpressIntSolCallbackImpl ( XPRSprob cbprob,
void * cbdata )

This is the call-back called by XPRESS when it finds a new MIP solution NOTE(user): This function must have this exact API, because we are passing it to XPRESS as a callback.

nothing to do

Definition at line 2220 of file xpress_interface.cc.

◆ XpressIsCorrectlyInstalled()

bool operations_research::XpressIsCorrectlyInstalled ( )
extern

Definition at line 382 of file environment.cc.

◆ XPressSolveProto()

MPSolutionResponse operations_research::XPressSolveProto ( LazyMutableCopy< MPModelRequest > request)

Solves the input request.

◆ XpressToMPSolverBasisStatus()

MPSolver::BasisStatus operations_research::XpressToMPSolverBasisStatus ( int xpress_basis_status)
static

Transform XPRESS basis status to MPSolver basis status.

Transform a XPRESS basis status to an MPSolver basis status.

Definition at line 1247 of file xpress_interface.cc.

◆ YenKShortestPaths()

template<class GraphType>
KShortestPaths< GraphType > operations_research::YenKShortestPaths ( const GraphType & graph,
const std::vector< PathDistance > & arc_lengths,
typename GraphType::NodeIndex source,
typename GraphType::NodeIndex destination,
unsigned k )

Computes up to k shortest paths from the node source to the node destination in the given directed graph. The paths are guaranteed not to have loops.

Hypotheses on input (which are not checked at runtime):

  • No multigraphs (more than one edge or a pair of nodes). The behavior is undefined otherwise.
  • The arc_lengths are supposed to be nonnegative. The behavior is undefined otherwise.
    Todo
    (user): relax to "no negative-weight cycles" (no Dijkstra).

This function uses Yen's algorithm, which guarantees to find the first k shortest paths in O(k n (m + n log n)) for n nodes and m edges. This algorithm is an implementation of the idea of detours.

Yen, Jin Y. "Finding the k Shortest Loopless Paths in a Network". Management Science. 17 (11): 712–716, 1971. https://doi.org/10.1287%2Fmnsc.17.11.712

Todo
(user): Yen's algorithm can work with negative weights, but Dijkstra cannot.

Yen, Jin Y. "Finding the k Shortest Loopless Paths in a Network". Management Science. 17 (11): 712–716, 1971. https://doi.org/10.1287%2Fmnsc.17.11.712

Yen's notations:

  • Source node: (1).
  • Destination node: (N).
  • Path from (1) to (j): (1) - (i) - ... - (j).
  • Cost for following the arc from (i) to (j), potentially negative: d_ij.
  • k-th shortest path: A^k == (1) - (2^k) - (3^k) - ... - (Q_k^k) - (N).
  • Deviation from A^k-1 at (i): A_i^k. This is the shortest path from (1) to (N) that is identical to A^k-1 from (1) to (i^k-1), then different from all the first k-1 shortest paths {A^1, A^2, ..., A^k-1}.
  • Root of A_i^k: R_i^k. This is the first subpath of A_i^k that coincides with A^k-1, i.e. A_i^k until i^k-1.
  • Spur of A_i^k: S_i^k. This is the last subpart of A_i^k with only one node coinciding with A_i^k, (i^k-1), i.e. A_i^k from i^k-1 onwards.

Example graph, paths from A to H (more classical notations): C - D / / \ A - B / G - H \ / / E - F Source node: A. Destination node: H. Three paths from A to H, say they are ordered from the cheapest to the most expensive:

  • 1st path: A - B - C - D - G - H
  • 2nd path: A - B - E - F - G - H
  • 3rd path: A - B - E - D - G - H To start with, Yen's algorithm uses the shortest path: A^1 = A - B - C - D - G - H To compute the second path A^2, compute a detour around A^1. Consider the iteration where B is the spur node.
  • Spur node: 2^1 = B.
  • Root of A^1_2: R_1^2 = A - B (including the spur node 2^1 = B).
  • Spur path S_1^2 starts at the spur node 2^1 = B. There are two possible spur paths, the cheapest being: S_1^2 = B - E - F - G - H

First step: compute the shortest path.

Generate variant paths.

One path has already been generated (the shortest one). Only k-1 more paths need to be generated.

Generate variant paths from the last shortest path.

Todo
(user): think about adding parallelism for this loop to improve running times. This is not a priority as long as the algorithm is faster than the one in shortest_paths.h.

Consider the part of the last shortest path up to and excluding the spur node. If spur_node_position == 0, this span only contains the source node.

Simplify the graph to have different paths using infinite lengths: copy the weights, set some of them to infinity. There is no need to restore the graph to its previous state in this case.

This trick is used in the original article (it's old-fashioned), but not in Wikipedia's pseudocode (it prefers mutating the graph, which is harder to do without copying the whole graph structure). Copying the whole graph might be quite expensive, especially as it is not useful for long (computing one shortest path).

Check among the previous paths: if part of the path coincides with the first few nodes up to the spur node (included), forbid this part of the path in the search for the next shortest path. More precisely, in that case, avoid the arc from the spur node to the next node in the path.

Ensure that the path computed from the new weights is loopless by "removing" the nodes of the root path from the graph (by tweaking the weights, again). The previous operation only disallows the arc from the spur node (at the end of the root path) to the next node in the previously found paths.

Generate a new candidate path from the spur node to the destination without using the forbidden arcs.

Node unreachable after some arcs are forbidden.

Ensure there is an edge between the end of the root path and the beginning of the spur path (knowing that both subpaths coincide at the spur node).

Ensure the forbidden arc is not present in any previously generated path.

Assemble the new path.

Ensure the assembled path is loopless, i.e. no node is repeated.

Ensure the new path is not one of the previously known ones. This operation is required, as there are two sources of paths from the source to the destination:

  • paths, the list of paths that is output by the function: there is no possible duplicate due to arc_lengths_for_detour, where edges that might generate a duplicate path are forbidden.
  • variant_path_queue, the list of potential paths, ordered by their cost, with no impact on arc_lengths_for_detour.
    Todo
    (user): would it be faster to fingerprint the paths and filter by fingerprints? Due to the probability of error with fingerprints, still use this slow-but-exact code, but after filtering.

Add the shortest spur path ever found that has not yet been added. This can be a spur path that has just been generated or a previous one, if this iteration found no shorter one.

Definition at line 290 of file k_shortest_paths.h.

◆ Zero()

int64_t operations_research::Zero ( )
inline

NOLINT.

This method returns 0. It is useful when 0 can be cast either as a pointer or as an integer value and thus lead to an ambiguous function call.

Definition at line 3429 of file constraint_solver.h.

Variable Documentation

◆ _AcceptanceStrategy_default_instance_

OR_PROTO_DLL AcceptanceStrategyDefaultTypeInternal operations_research::_AcceptanceStrategy_default_instance_

Definition at line 204 of file routing_ils.pb.cc.

◆ _AssignmentProto_default_instance_

OR_PROTO_DLL AssignmentProtoDefaultTypeInternal operations_research::_AssignmentProto_default_instance_

Definition at line 185 of file assignment.pb.cc.

◆ _CapacityConstraintProto_CapacityTerm_default_instance_

OR_PROTO_DLL CapacityConstraintProto_CapacityTermDefaultTypeInternal operations_research::_CapacityConstraintProto_CapacityTerm_default_instance_

Definition at line 79 of file capacity.pb.cc.

◆ _CapacityConstraintProto_CapacityTerm_ElementWeightPair_default_instance_

OR_PROTO_DLL CapacityConstraintProto_CapacityTerm_ElementWeightPairDefaultTypeInternal operations_research::_CapacityConstraintProto_CapacityTerm_ElementWeightPair_default_instance_

Definition at line 53 of file capacity.pb.cc.

◆ _CapacityConstraintProto_default_instance_

OR_PROTO_DLL CapacityConstraintProtoDefaultTypeInternal operations_research::_CapacityConstraintProto_default_instance_

Definition at line 106 of file capacity.pb.cc.

◆ _ClassAssignment_default_instance_

OR_PROTO_DLL ClassAssignmentDefaultTypeInternal operations_research::_ClassAssignment_default_instance_

Definition at line 209 of file course_scheduling.pb.cc.

◆ _ConstraintRuns_default_instance_

OR_PROTO_DLL ConstraintRunsDefaultTypeInternal operations_research::_ConstraintRuns_default_instance_

Definition at line 92 of file demon_profiler.pb.cc.

◆ _ConstraintSolverParameters_default_instance_

OR_PROTO_DLL ConstraintSolverParametersDefaultTypeInternal operations_research::_ConstraintSolverParameters_default_instance_

Definition at line 80 of file solver_parameters.pb.cc.

◆ _ConstraintSolverStatistics_default_instance_

OR_PROTO_DLL ConstraintSolverStatisticsDefaultTypeInternal operations_research::_ConstraintSolverStatistics_default_instance_

Definition at line 151 of file search_stats.pb.cc.

◆ _CoolingScheduleStrategy_default_instance_

OR_PROTO_DLL CoolingScheduleStrategyDefaultTypeInternal operations_research::_CoolingScheduleStrategy_default_instance_

Definition at line 186 of file routing_ils.pb.cc.

◆ _Course_default_instance_

OR_PROTO_DLL CourseDefaultTypeInternal operations_research::_Course_default_instance_

Definition at line 179 of file course_scheduling.pb.cc.

◆ _CourseSchedulingModel_default_instance_

OR_PROTO_DLL CourseSchedulingModelDefaultTypeInternal operations_research::_CourseSchedulingModel_default_instance_

Definition at line 272 of file course_scheduling.pb.cc.

◆ _CourseSchedulingResult_default_instance_

OR_PROTO_DLL CourseSchedulingResultDefaultTypeInternal operations_research::_CourseSchedulingResult_default_instance_

Definition at line 239 of file course_scheduling.pb.cc.

◆ _DemonRuns_default_instance_

OR_PROTO_DLL DemonRunsDefaultTypeInternal operations_research::_DemonRuns_default_instance_

Definition at line 59 of file demon_profiler.pb.cc.

◆ _FirstSolutionStrategy_default_instance_

OR_PROTO_DLL FirstSolutionStrategyDefaultTypeInternal operations_research::_FirstSolutionStrategy_default_instance_

Definition at line 81 of file routing_enums.pb.cc.

◆ _FlowArcProto_default_instance_

OR_PROTO_DLL FlowArcProtoDefaultTypeInternal operations_research::_FlowArcProto_default_instance_

Definition at line 81 of file flow_problem.pb.cc.

◆ _FlowModelProto_default_instance_

OR_PROTO_DLL FlowModelProtoDefaultTypeInternal operations_research::_FlowModelProto_default_instance_

Definition at line 108 of file flow_problem.pb.cc.

◆ _FlowNodeProto_default_instance_

OR_PROTO_DLL FlowNodeProtoDefaultTypeInternal operations_research::_FlowNodeProto_default_instance_

Definition at line 53 of file flow_problem.pb.cc.

◆ _GScipOutput_default_instance_

OR_PROTO_DLL GScipOutputDefaultTypeInternal operations_research::_GScipOutput_default_instance_

Definition at line 246 of file gscip.pb.cc.

◆ _GScipParameters_BoolParamsEntry_DoNotUse_default_instance_

OR_PROTO_DLL GScipParameters_BoolParamsEntry_DoNotUseDefaultTypeInternal operations_research::_GScipParameters_BoolParamsEntry_DoNotUse_default_instance_

Definition at line 169 of file gscip.pb.cc.

◆ _GScipParameters_CharParamsEntry_DoNotUse_default_instance_

OR_PROTO_DLL GScipParameters_CharParamsEntry_DoNotUseDefaultTypeInternal operations_research::_GScipParameters_CharParamsEntry_DoNotUse_default_instance_

Definition at line 151 of file gscip.pb.cc.

◆ _GScipParameters_default_instance_

OR_PROTO_DLL GScipParametersDefaultTypeInternal operations_research::_GScipParameters_default_instance_

Definition at line 217 of file gscip.pb.cc.

◆ _GScipParameters_IntParamsEntry_DoNotUse_default_instance_

OR_PROTO_DLL GScipParameters_IntParamsEntry_DoNotUseDefaultTypeInternal operations_research::_GScipParameters_IntParamsEntry_DoNotUse_default_instance_

Definition at line 133 of file gscip.pb.cc.

◆ _GScipParameters_LongParamsEntry_DoNotUse_default_instance_

OR_PROTO_DLL GScipParameters_LongParamsEntry_DoNotUseDefaultTypeInternal operations_research::_GScipParameters_LongParamsEntry_DoNotUse_default_instance_

Definition at line 115 of file gscip.pb.cc.

◆ _GScipParameters_RealParamsEntry_DoNotUse_default_instance_

OR_PROTO_DLL GScipParameters_RealParamsEntry_DoNotUseDefaultTypeInternal operations_research::_GScipParameters_RealParamsEntry_DoNotUse_default_instance_

Definition at line 97 of file gscip.pb.cc.

◆ _GScipParameters_StringParamsEntry_DoNotUse_default_instance_

OR_PROTO_DLL GScipParameters_StringParamsEntry_DoNotUseDefaultTypeInternal operations_research::_GScipParameters_StringParamsEntry_DoNotUse_default_instance_

Definition at line 79 of file gscip.pb.cc.

◆ _GScipSolvingStats_default_instance_

OR_PROTO_DLL GScipSolvingStatsDefaultTypeInternal operations_research::_GScipSolvingStats_default_instance_

Definition at line 61 of file gscip.pb.cc.

◆ _Int128_default_instance_

OR_PROTO_DLL Int128DefaultTypeInternal operations_research::_Int128_default_instance_

Definition at line 53 of file int128.pb.cc.

◆ _IntervalVarAssignment_default_instance_

OR_PROTO_DLL IntervalVarAssignmentDefaultTypeInternal operations_research::_IntervalVarAssignment_default_instance_

Definition at line 125 of file assignment.pb.cc.

◆ _IntVarAssignment_default_instance_

OR_PROTO_DLL IntVarAssignmentDefaultTypeInternal operations_research::_IntVarAssignment_default_instance_

Definition at line 155 of file assignment.pb.cc.

◆ _IteratedLocalSearchParameters_default_instance_

OR_PROTO_DLL IteratedLocalSearchParametersDefaultTypeInternal operations_research::_IteratedLocalSearchParameters_default_instance_

Definition at line 289 of file routing_ils.pb.cc.

◆ _LocalSearchMetaheuristic_default_instance_

OR_PROTO_DLL LocalSearchMetaheuristicDefaultTypeInternal operations_research::_LocalSearchMetaheuristic_default_instance_

Definition at line 63 of file routing_enums.pb.cc.

◆ _LocalSearchStatistics_default_instance_

OR_PROTO_DLL LocalSearchStatisticsDefaultTypeInternal operations_research::_LocalSearchStatistics_default_instance_

Definition at line 181 of file search_stats.pb.cc.

◆ _LocalSearchStatistics_FirstSolutionStatistics_default_instance_

OR_PROTO_DLL LocalSearchStatistics_FirstSolutionStatisticsDefaultTypeInternal operations_research::_LocalSearchStatistics_FirstSolutionStatistics_default_instance_

Definition at line 122 of file search_stats.pb.cc.

◆ _LocalSearchStatistics_LocalSearchFilterStatistics_default_instance_

OR_PROTO_DLL LocalSearchStatistics_LocalSearchFilterStatisticsDefaultTypeInternal operations_research::_LocalSearchStatistics_LocalSearchFilterStatistics_default_instance_

Definition at line 94 of file search_stats.pb.cc.

◆ _LocalSearchStatistics_LocalSearchOperatorStatistics_default_instance_

OR_PROTO_DLL LocalSearchStatistics_LocalSearchOperatorStatisticsDefaultTypeInternal operations_research::_LocalSearchStatistics_LocalSearchOperatorStatistics_default_instance_

Definition at line 60 of file search_stats.pb.cc.

◆ _MPAbsConstraint_default_instance_

OR_PROTO_DLL MPAbsConstraintDefaultTypeInternal operations_research::_MPAbsConstraint_default_instance_

Definition at line 395 of file linear_solver.pb.cc.

◆ _MPArrayConstraint_default_instance_

OR_PROTO_DLL MPArrayConstraintDefaultTypeInternal operations_research::_MPArrayConstraint_default_instance_

Definition at line 369 of file linear_solver.pb.cc.

◆ _MPArrayWithConstantConstraint_default_instance_

OR_PROTO_DLL MPArrayWithConstantConstraintDefaultTypeInternal operations_research::_MPArrayWithConstantConstraint_default_instance_

Definition at line 343 of file linear_solver.pb.cc.

◆ _MPConstraintProto_default_instance_

OR_PROTO_DLL MPConstraintProtoDefaultTypeInternal operations_research::_MPConstraintProto_default_instance_

Definition at line 316 of file linear_solver.pb.cc.

◆ _MPGeneralConstraintProto_default_instance_

OR_PROTO_DLL MPGeneralConstraintProtoDefaultTypeInternal operations_research::_MPGeneralConstraintProto_default_instance_

Definition at line 584 of file linear_solver.pb.cc.

◆ _MPIndicatorConstraint_default_instance_

OR_PROTO_DLL MPIndicatorConstraintDefaultTypeInternal operations_research::_MPIndicatorConstraint_default_instance_

Definition at line 526 of file linear_solver.pb.cc.

◆ _MPModelDeltaProto_ConstraintOverridesEntry_DoNotUse_default_instance_

OR_PROTO_DLL MPModelDeltaProto_ConstraintOverridesEntry_DoNotUseDefaultTypeInternal operations_research::_MPModelDeltaProto_ConstraintOverridesEntry_DoNotUse_default_instance_

Definition at line 499 of file linear_solver.pb.cc.

◆ _MPModelDeltaProto_default_instance_

OR_PROTO_DLL MPModelDeltaProtoDefaultTypeInternal operations_research::_MPModelDeltaProto_default_instance_

Definition at line 555 of file linear_solver.pb.cc.

◆ _MPModelDeltaProto_VariableOverridesEntry_DoNotUse_default_instance_

OR_PROTO_DLL MPModelDeltaProto_VariableOverridesEntry_DoNotUseDefaultTypeInternal operations_research::_MPModelDeltaProto_VariableOverridesEntry_DoNotUse_default_instance_

Definition at line 481 of file linear_solver.pb.cc.

◆ _MPModelProto_Annotation_default_instance_

OR_PROTO_DLL MPModelProto_AnnotationDefaultTypeInternal operations_research::_MPModelProto_Annotation_default_instance_

Definition at line 283 of file linear_solver.pb.cc.

◆ _MPModelProto_default_instance_

OR_PROTO_DLL MPModelProtoDefaultTypeInternal operations_research::_MPModelProto_default_instance_

Definition at line 619 of file linear_solver.pb.cc.

◆ _MPModelRequest_default_instance_

OR_PROTO_DLL MPModelRequestDefaultTypeInternal operations_research::_MPModelRequest_default_instance_

Definition at line 653 of file linear_solver.pb.cc.

◆ _MPQuadraticConstraint_default_instance_

OR_PROTO_DLL MPQuadraticConstraintDefaultTypeInternal operations_research::_MPQuadraticConstraint_default_instance_

Definition at line 248 of file linear_solver.pb.cc.

◆ _MPQuadraticObjective_default_instance_

OR_PROTO_DLL MPQuadraticObjectiveDefaultTypeInternal operations_research::_MPQuadraticObjective_default_instance_

Definition at line 217 of file linear_solver.pb.cc.

◆ _MPSolution_default_instance_

OR_PROTO_DLL MPSolutionDefaultTypeInternal operations_research::_MPSolution_default_instance_

Definition at line 190 of file linear_solver.pb.cc.

◆ _MPSolutionResponse_default_instance_

OR_PROTO_DLL MPSolutionResponseDefaultTypeInternal operations_research::_MPSolutionResponse_default_instance_

Definition at line 463 of file linear_solver.pb.cc.

◆ _MPSolveInfo_default_instance_

OR_PROTO_DLL MPSolveInfoDefaultTypeInternal operations_research::_MPSolveInfo_default_instance_

Definition at line 164 of file linear_solver.pb.cc.

◆ _MPSolverCommonParameters_default_instance_

OR_PROTO_DLL MPSolverCommonParametersDefaultTypeInternal operations_research::_MPSolverCommonParameters_default_instance_

Definition at line 425 of file linear_solver.pb.cc.

◆ _MPSosConstraint_default_instance_

OR_PROTO_DLL MPSosConstraintDefaultTypeInternal operations_research::_MPSosConstraint_default_instance_

Definition at line 138 of file linear_solver.pb.cc.

◆ _MPVariableProto_default_instance_

OR_PROTO_DLL MPVariableProtoDefaultTypeInternal operations_research::_MPVariableProto_default_instance_

Definition at line 111 of file linear_solver.pb.cc.

◆ _OptionalDouble_default_instance_

OR_PROTO_DLL OptionalDoubleDefaultTypeInternal operations_research::_OptionalDouble_default_instance_

Definition at line 79 of file linear_solver.pb.cc.

◆ _PartialVariableAssignment_default_instance_

OR_PROTO_DLL PartialVariableAssignmentDefaultTypeInternal operations_research::_PartialVariableAssignment_default_instance_

Definition at line 54 of file linear_solver.pb.cc.

◆ _PerturbationStrategy_default_instance_

OR_PROTO_DLL PerturbationStrategyDefaultTypeInternal operations_research::_PerturbationStrategy_default_instance_

Definition at line 168 of file routing_ils.pb.cc.

◆ _RandomWalkRuinStrategy_default_instance_

OR_PROTO_DLL RandomWalkRuinStrategyDefaultTypeInternal operations_research::_RandomWalkRuinStrategy_default_instance_

Definition at line 150 of file routing_ils.pb.cc.

◆ _RegularLimitParameters_default_instance_

OR_PROTO_DLL RegularLimitParametersDefaultTypeInternal operations_research::_RegularLimitParameters_default_instance_

Definition at line 57 of file search_limit.pb.cc.

◆ _Room_default_instance_

OR_PROTO_DLL RoomDefaultTypeInternal operations_research::_Room_default_instance_

Definition at line 142 of file course_scheduling.pb.cc.

◆ _RoutingModelParameters_default_instance_

OR_PROTO_DLL RoutingModelParametersDefaultTypeInternal operations_research::_RoutingModelParameters_default_instance_

Definition at line 142 of file routing_parameters.pb.cc.

◆ _RoutingSearchParameters_default_instance_

OR_PROTO_DLL RoutingSearchParametersDefaultTypeInternal operations_research::_RoutingSearchParameters_default_instance_

Definition at line 229 of file routing_parameters.pb.cc.

◆ _RoutingSearchParameters_ImprovementSearchLimitParameters_default_instance_

OR_PROTO_DLL RoutingSearchParameters_ImprovementSearchLimitParametersDefaultTypeInternal operations_research::_RoutingSearchParameters_ImprovementSearchLimitParameters_default_instance_

Definition at line 115 of file routing_parameters.pb.cc.

◆ _RoutingSearchParameters_LocalSearchNeighborhoodOperators_default_instance_

OR_PROTO_DLL RoutingSearchParameters_LocalSearchNeighborhoodOperatorsDefaultTypeInternal operations_research::_RoutingSearchParameters_LocalSearchNeighborhoodOperators_default_instance_

Definition at line 89 of file routing_parameters.pb.cc.

◆ _RoutingSearchStatus_default_instance_

OR_PROTO_DLL RoutingSearchStatusDefaultTypeInternal operations_research::_RoutingSearchStatus_default_instance_

Definition at line 45 of file routing_enums.pb.cc.

◆ _RuinCompositionStrategy_default_instance_

OR_PROTO_DLL RuinCompositionStrategyDefaultTypeInternal operations_research::_RuinCompositionStrategy_default_instance_

Definition at line 125 of file routing_ils.pb.cc.

◆ _RuinRecreateParameters_default_instance_

OR_PROTO_DLL RuinRecreateParametersDefaultTypeInternal operations_research::_RuinRecreateParameters_default_instance_

Definition at line 260 of file routing_ils.pb.cc.

◆ _RuinStrategy_default_instance_

OR_PROTO_DLL RuinStrategyDefaultTypeInternal operations_research::_RuinStrategy_default_instance_

Definition at line 230 of file routing_ils.pb.cc.

◆ _SearchStatistics_default_instance_

OR_PROTO_DLL SearchStatisticsDefaultTypeInternal operations_research::_SearchStatistics_default_instance_

Definition at line 207 of file search_stats.pb.cc.

◆ _SequenceVarAssignment_default_instance_

OR_PROTO_DLL SequenceVarAssignmentDefaultTypeInternal operations_research::_SequenceVarAssignment_default_instance_

Definition at line 89 of file assignment.pb.cc.

◆ _SetCoverProto_default_instance_

OR_PROTO_DLL SetCoverProtoDefaultTypeInternal operations_research::_SetCoverProto_default_instance_

Definition at line 115 of file set_cover.pb.cc.

◆ _SetCoverProto_Subset_default_instance_

OR_PROTO_DLL SetCoverProto_SubsetDefaultTypeInternal operations_research::_SetCoverProto_Subset_default_instance_

Definition at line 54 of file set_cover.pb.cc.

◆ _SetCoverSolutionResponse_default_instance_

OR_PROTO_DLL SetCoverSolutionResponseDefaultTypeInternal operations_research::_SetCoverSolutionResponse_default_instance_

Definition at line 86 of file set_cover.pb.cc.

◆ _SimulatedAnnealingParameters_default_instance_

OR_PROTO_DLL SimulatedAnnealingParametersDefaultTypeInternal operations_research::_SimulatedAnnealingParameters_default_instance_

Definition at line 80 of file routing_ils.pb.cc.

◆ _SISRRuinStrategy_default_instance_

OR_PROTO_DLL SISRRuinStrategyDefaultTypeInternal operations_research::_SISRRuinStrategy_default_instance_

Definition at line 107 of file routing_ils.pb.cc.

◆ _SpatiallyCloseRoutesRuinStrategy_default_instance_

OR_PROTO_DLL SpatiallyCloseRoutesRuinStrategyDefaultTypeInternal operations_research::_SpatiallyCloseRoutesRuinStrategy_default_instance_

Definition at line 52 of file routing_ils.pb.cc.

◆ _Student_default_instance_

OR_PROTO_DLL StudentDefaultTypeInternal operations_research::_Student_default_instance_

Definition at line 114 of file course_scheduling.pb.cc.

◆ _StudentAssignment_default_instance_

OR_PROTO_DLL StudentAssignmentDefaultTypeInternal operations_research::_StudentAssignment_default_instance_

Definition at line 85 of file course_scheduling.pb.cc.

◆ _Teacher_default_instance_

OR_PROTO_DLL TeacherDefaultTypeInternal operations_research::_Teacher_default_instance_

Definition at line 56 of file course_scheduling.pb.cc.

◆ _WorkerInfo_default_instance_

OR_PROTO_DLL WorkerInfoDefaultTypeInternal operations_research::_WorkerInfo_default_instance_

Definition at line 55 of file assignment.pb.cc.

◆ AcceptanceStrategy_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::AcceptanceStrategy_class_data_
Initial value:

Definition at line 2766 of file routing_ils.pb.cc.

◆ AcceptanceStrategy_Value_internal_data_

OR_PROTO_DLL const uint32_t operations_research::AcceptanceStrategy_Value_internal_data_
Initial value:
= {
196608u, 0u, }

Definition at line 502 of file routing_ils.pb.cc.

◆ AcceptanceStrategy_Value_Value_ARRAYSIZE

int operations_research::AcceptanceStrategy_Value_Value_ARRAYSIZE = 2 + 1
inlineconstexpr

Definition at line 259 of file routing_ils.pb.h.

◆ AcceptanceStrategy_Value_Value_MAX

AcceptanceStrategy_Value operations_research::AcceptanceStrategy_Value_Value_MAX
inlineconstexpr
Initial value:

Definition at line 254 of file routing_ils.pb.h.

◆ AcceptanceStrategy_Value_Value_MIN

AcceptanceStrategy_Value operations_research::AcceptanceStrategy_Value_Value_MIN
inlineconstexpr
Initial value:
=
static_cast<AcceptanceStrategy_Value>(0)

Definition at line 252 of file routing_ils.pb.h.

◆ AssignmentProto_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::AssignmentProto_class_data_
Initial value:

Definition at line 2085 of file assignment.pb.cc.

◆ BronKerboschAlgorithm< NodeIndex >::kPushStateDeterministicTimeSecondsPerCandidate

template<typename NodeIndex>
const double operations_research::BronKerboschAlgorithm< NodeIndex >::kPushStateDeterministicTimeSecondsPerCandidate = 0.54663e-7

Definition at line 646 of file cliques.h.

◆ CapacityConstraintProto_CapacityTerm_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::CapacityConstraintProto_CapacityTerm_class_data_

◆ CapacityConstraintProto_CapacityTerm_ElementWeightPair_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::CapacityConstraintProto_CapacityTerm_ElementWeightPair_class_data_

◆ CapacityConstraintProto_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::CapacityConstraintProto_class_data_
Initial value:

Definition at line 882 of file capacity.pb.cc.

◆ ClassAssignment_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::ClassAssignment_class_data_
Initial value:

Definition at line 1460 of file course_scheduling.pb.cc.

◆ ConstraintRuns_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::ConstraintRuns_class_data_
Initial value:

Definition at line 669 of file demon_profiler.pb.cc.

◆ ConstraintSolverParameters_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::ConstraintSolverParameters_class_data_

◆ ConstraintSolverParameters_TrailCompression_internal_data_

OR_PROTO_DLL const uint32_t operations_research::ConstraintSolverParameters_TrailCompression_internal_data_
Initial value:
= {
131072u, 0u, }

Definition at line 209 of file solver_parameters.pb.cc.

◆ ConstraintSolverParameters_TrailCompression_TrailCompression_ARRAYSIZE

int operations_research::ConstraintSolverParameters_TrailCompression_TrailCompression_ARRAYSIZE = 1 + 1
inlineconstexpr

Definition at line 90 of file solver_parameters.pb.h.

◆ ConstraintSolverParameters_TrailCompression_TrailCompression_MAX

ConstraintSolverParameters_TrailCompression operations_research::ConstraintSolverParameters_TrailCompression_TrailCompression_MAX
inlineconstexpr
Initial value:

Definition at line 85 of file solver_parameters.pb.h.

◆ ConstraintSolverParameters_TrailCompression_TrailCompression_MIN

ConstraintSolverParameters_TrailCompression operations_research::ConstraintSolverParameters_TrailCompression_TrailCompression_MIN
inlineconstexpr
Initial value:

Definition at line 83 of file solver_parameters.pb.h.

◆ ConstraintSolverStatistics_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::ConstraintSolverStatistics_class_data_

◆ CoolingScheduleStrategy_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::CoolingScheduleStrategy_class_data_
Initial value:

Definition at line 2351 of file routing_ils.pb.cc.

◆ CoolingScheduleStrategy_Value_internal_data_

OR_PROTO_DLL const uint32_t operations_research::CoolingScheduleStrategy_Value_internal_data_
Initial value:
= {
196608u, 0u, }

Definition at line 496 of file routing_ils.pb.cc.

◆ CoolingScheduleStrategy_Value_Value_ARRAYSIZE

int operations_research::CoolingScheduleStrategy_Value_Value_ARRAYSIZE = 2 + 1
inlineconstexpr

Definition at line 222 of file routing_ils.pb.h.

◆ CoolingScheduleStrategy_Value_Value_MAX

CoolingScheduleStrategy_Value operations_research::CoolingScheduleStrategy_Value_Value_MAX
inlineconstexpr
Initial value:

Definition at line 217 of file routing_ils.pb.h.

◆ CoolingScheduleStrategy_Value_Value_MIN

CoolingScheduleStrategy_Value operations_research::CoolingScheduleStrategy_Value_Value_MIN
inlineconstexpr
Initial value:

Definition at line 215 of file routing_ils.pb.h.

◆ Course_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::Course_class_data_
Initial value:

Definition at line 2174 of file course_scheduling.pb.cc.

◆ CourseSchedulingModel_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::CourseSchedulingModel_class_data_

◆ CourseSchedulingResult_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::CourseSchedulingResult_class_data_

◆ CourseSchedulingResultStatus_ARRAYSIZE

int operations_research::CourseSchedulingResultStatus_ARRAYSIZE = 6 + 1
inlineconstexpr

Definition at line 123 of file course_scheduling.pb.h.

◆ CourseSchedulingResultStatus_internal_data_

OR_PROTO_DLL const uint32_t operations_research::CourseSchedulingResultStatus_internal_data_
Initial value:
= {
458752u, 0u, }

Definition at line 452 of file course_scheduling.pb.cc.

◆ CourseSchedulingResultStatus_MAX

CourseSchedulingResultStatus operations_research::CourseSchedulingResultStatus_MAX
inlineconstexpr
Initial value:

Definition at line 118 of file course_scheduling.pb.h.

◆ CourseSchedulingResultStatus_MIN

CourseSchedulingResultStatus operations_research::CourseSchedulingResultStatus_MIN
inlineconstexpr
Initial value:
=

Definition at line 116 of file course_scheduling.pb.h.

◆ DEBUG_MODE

const bool operations_research::DEBUG_MODE = true

Definition at line 266 of file radix_sort.h.

◆ DemonRuns_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::DemonRuns_class_data_
Initial value:

Definition at line 290 of file demon_profiler.pb.cc.

◆ FirstSolutionStrategy_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::FirstSolutionStrategy_class_data_
Initial value:

Definition at line 235 of file routing_enums.pb.cc.

◆ FirstSolutionStrategy_Value_internal_data_

OR_PROTO_DLL const uint32_t operations_research::FirstSolutionStrategy_Value_internal_data_
Initial value:
= {
1179648u, 0u, }

Definition at line 157 of file routing_enums.pb.cc.

◆ FirstSolutionStrategy_Value_Value_ARRAYSIZE

int operations_research::FirstSolutionStrategy_Value_Value_ARRAYSIZE = 17 + 1
inlineconstexpr

Definition at line 125 of file routing_enums.pb.h.

◆ FirstSolutionStrategy_Value_Value_MAX

FirstSolutionStrategy_Value operations_research::FirstSolutionStrategy_Value_Value_MAX
inlineconstexpr
Initial value:

Definition at line 120 of file routing_enums.pb.h.

◆ FirstSolutionStrategy_Value_Value_MIN

FirstSolutionStrategy_Value operations_research::FirstSolutionStrategy_Value_Value_MIN
inlineconstexpr
Initial value:
=

Definition at line 118 of file routing_enums.pb.h.

◆ FlowArcProto_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::FlowArcProto_class_data_
Initial value:

Definition at line 287 of file flow_problem.pb.cc.

◆ FlowModelProto_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::FlowModelProto_class_data_
Initial value:

Definition at line 898 of file flow_problem.pb.cc.

◆ FlowModelProto_ProblemType_internal_data_

OR_PROTO_DLL const uint32_t operations_research::FlowModelProto_ProblemType_internal_data_
Initial value:
= {
196608u, 0u, }

Definition at line 195 of file flow_problem.pb.cc.

◆ FlowModelProto_ProblemType_ProblemType_ARRAYSIZE

int operations_research::FlowModelProto_ProblemType_ProblemType_ARRAYSIZE = 2 + 1
inlineconstexpr

Definition at line 95 of file flow_problem.pb.h.

◆ FlowModelProto_ProblemType_ProblemType_MAX

FlowModelProto_ProblemType operations_research::FlowModelProto_ProblemType_ProblemType_MAX
inlineconstexpr
Initial value:

Definition at line 90 of file flow_problem.pb.h.

◆ FlowModelProto_ProblemType_ProblemType_MIN

FlowModelProto_ProblemType operations_research::FlowModelProto_ProblemType_ProblemType_MIN
inlineconstexpr
Initial value:
=

Definition at line 88 of file flow_problem.pb.h.

◆ FlowNodeProto_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::FlowNodeProto_class_data_
Initial value:

Definition at line 600 of file flow_problem.pb.cc.

◆ GRBaddconstr

std::function< int(GRBmodel *model, int numnz, int *cind, double *cval, char sense, double rhs, const char *constrname)> operations_research::GRBaddconstr = nullptr

Definition at line 141 of file environment.cc.

◆ GRBaddconstrs

std::function< int(GRBmodel *model, int numconstrs, int numnz, int *cbeg, int *cind, double *cval, char *sense, double *rhs, char **constrnames)> operations_research::GRBaddconstrs = nullptr

Definition at line 145 of file environment.cc.

◆ GRBaddgenconstrAbs

std::function< int(GRBmodel *model, const char *name, int resvar, int argvar)> operations_research::GRBaddgenconstrAbs = nullptr

Definition at line 159 of file environment.cc.

◆ GRBaddgenconstrAnd

std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars)> operations_research::GRBaddgenconstrAnd = nullptr

Definition at line 162 of file environment.cc.

◆ GRBaddgenconstrIndicator

std::function< int(GRBmodel *model, const char *name, int binvar, int binval, int nvars, const int *vars, const double *vals, char sense, double rhs)> operations_research::GRBaddgenconstrIndicator = nullptr

Definition at line 169 of file environment.cc.

◆ GRBaddgenconstrMax

std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars, double constant)> operations_research::GRBaddgenconstrMax = nullptr

Definition at line 154 of file environment.cc.

◆ GRBaddgenconstrMin

std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars, double constant)> operations_research::GRBaddgenconstrMin = nullptr

Definition at line 157 of file environment.cc.

◆ GRBaddgenconstrOr

std::function< int(GRBmodel *model, const char *name, int resvar, int nvars, const int *vars)> operations_research::GRBaddgenconstrOr = nullptr

Definition at line 165 of file environment.cc.

◆ GRBaddqconstr

std::function< int(GRBmodel *model, int numlnz, int *lind, double *lval, int numqnz, int *qrow, int *qcol, double *qval, char sense, double rhs, const char *QCname)> operations_research::GRBaddqconstr = nullptr

Definition at line 173 of file environment.cc.

◆ GRBaddqpterms

std::function< int(GRBmodel *model, int numqnz, int *qrow, int *qcol, double *qval)> operations_research::GRBaddqpterms = nullptr

Definition at line 176 of file environment.cc.

◆ GRBaddrangeconstr

std::function< int(GRBmodel *model, int numnz, int *cind, double *cval, double lower, double upper, const char *constrname)> operations_research::GRBaddrangeconstr = nullptr

Definition at line 148 of file environment.cc.

◆ GRBaddsos

std::function< int(GRBmodel *model, int numsos, int nummembers, int *types, int *beg, int *ind, double *weight)> operations_research::GRBaddsos = nullptr

Definition at line 151 of file environment.cc.

◆ GRBaddvar

std::function< int(GRBmodel *model, int numnz, int *vind, double *vval, double obj, double lb, double ub, char vtype, const char *varname)> operations_research::GRBaddvar = nullptr

Definition at line 134 of file environment.cc.

◆ GRBaddvars

std::function< int(GRBmodel *model, int numvars, int numnz, int *vbeg, int *vind, double *vval, double *obj, double *lb, double *ub, char *vtype, char **varnames)> operations_research::GRBaddvars = nullptr

Definition at line 138 of file environment.cc.

◆ GRBcbcut

std::function< int(void *cbdata, int cutlen, const int *cutind, const double *cutval, char cutsense, double cutrhs)> operations_research::GRBcbcut = nullptr

Definition at line 117 of file environment.cc.

◆ GRBcbget

std::function< int(void *cbdata, int where, int what, void *resultP)> operations_research::GRBcbget
Initial value:
=
nullptr

Definition at line 111 of file environment.cc.

◆ GRBcblazy

std::function< int(void *cbdata, int lazylen, const int *lazyind, const double *lazyval, char lazysense, double lazyrhs)> operations_research::GRBcblazy = nullptr

Definition at line 120 of file environment.cc.

◆ GRBcbsolution

std::function< int(void *cbdata, const double *solution, double *objvalP)> operations_research::GRBcbsolution = nullptr

Definition at line 114 of file environment.cc.

◆ GRBchgcoeffs

std::function< int(GRBmodel *model, int cnt, int *cind, int *vind, double *val)> operations_research::GRBchgcoeffs = nullptr

Definition at line 185 of file environment.cc.

◆ GRBcomputeIIS

std::function< int(GRBmodel *model)> operations_research::GRBcomputeIIS = nullptr

Definition at line 125 of file environment.cc.

◆ GRBcopyparams

std::function< int(GRBenv *dest, GRBenv *src)> operations_research::GRBcopyparams = nullptr

Definition at line 220 of file environment.cc.

◆ GRBdelconstrs

std::function< int(GRBmodel *model, int len, int *ind)> operations_research::GRBdelconstrs = nullptr

Definition at line 178 of file environment.cc.

◆ GRBdelgenconstrs

std::function< int(GRBmodel *model, int len, int *ind)> operations_research::GRBdelgenconstrs
Initial value:
=
nullptr

Definition at line 180 of file environment.cc.

◆ GRBdelq

std::function< int(GRBmodel *model)> operations_research::GRBdelq = nullptr

Definition at line 183 of file environment.cc.

◆ GRBdelqconstrs

std::function< int(GRBmodel *model, int len, int *ind)> operations_research::GRBdelqconstrs = nullptr

Definition at line 182 of file environment.cc.

◆ GRBdelsos

std::function< int(GRBmodel *model, int len, int *ind)> operations_research::GRBdelsos = nullptr

Definition at line 179 of file environment.cc.

◆ GRBdelvars

std::function< int(GRBmodel *model, int len, int *ind)> operations_research::GRBdelvars = nullptr

Definition at line 177 of file environment.cc.

◆ GRBdiscardmultiobjenvs

std::function< GRBenv *(GRBmodel *model)> operations_research::GRBdiscardmultiobjenvs = nullptr

Definition at line 227 of file environment.cc.

◆ GRBemptyenv

std::function< int(GRBenv **envP)> operations_research::GRBemptyenv = nullptr

Definition at line 222 of file environment.cc.

◆ GRBfreeenv

std::function< void(GRBenv *env)> operations_research::GRBfreeenv = nullptr

Definition at line 228 of file environment.cc.

◆ GRBfreemodel

std::function< int(GRBmodel *model)> operations_research::GRBfreemodel = nullptr

Definition at line 187 of file environment.cc.

◆ GRBgetcharattrarray

std::function< int(GRBmodel *model, const char *attrname, int first, int len, char *values)> operations_research::GRBgetcharattrarray = nullptr

Definition at line 78 of file environment.cc.

◆ GRBgetcharattrelement

std::function< int(GRBmodel *model, const char *attrname, int element, char *valueP)> operations_research::GRBgetcharattrelement = nullptr

Definition at line 72 of file environment.cc.

◆ GRBgetdblattr

std::function< int(GRBmodel *model, const char *attrname, double *valueP)> operations_research::GRBgetdblattr = nullptr

Definition at line 86 of file environment.cc.

◆ GRBgetdblattrarray

std::function< int(GRBmodel *model, const char *attrname, int first, int len, double *values)> operations_research::GRBgetdblattrarray = nullptr

Definition at line 97 of file environment.cc.

◆ GRBgetdblattrelement

std::function< int(GRBmodel *model, const char *attrname, int element, double *valueP)> operations_research::GRBgetdblattrelement = nullptr

Definition at line 91 of file environment.cc.

◆ GRBgetdblparam

std::function< int(GRBenv *env, const char *paramname, double *valueP)> operations_research::GRBgetdblparam = nullptr

Definition at line 196 of file environment.cc.

◆ GRBgetdblparaminfo

std::function< int(GRBenv *envP, const char *paramname, double *valueP, double *minP, double *maxP, double *defP)> operations_research::GRBgetdblparaminfo = nullptr

Definition at line 204 of file environment.cc.

◆ GRBgetenv

std::function< GRBenv *(GRBmodel *model)> operations_research::GRBgetenv = nullptr

Definition at line 225 of file environment.cc.

◆ GRBgeterrormsg

std::function< const char *(GRBenv *env)> operations_research::GRBgeterrormsg = nullptr

Definition at line 229 of file environment.cc.

◆ GRBgetintattr

std::function< int(GRBmodel *model, const char *attrname, int *valueP)> operations_research::GRBgetintattr = nullptr

Definition at line 52 of file environment.cc.

◆ GRBgetintattrarray

std::function< int(GRBmodel *model, const char *attrname, int first, int len, int *values)> operations_research::GRBgetintattrarray = nullptr

Definition at line 63 of file environment.cc.

◆ GRBgetintattrelement

std::function< int(GRBmodel *model, const char *attrname, int element, int *valueP)> operations_research::GRBgetintattrelement = nullptr

Definition at line 57 of file environment.cc.

◆ GRBgetintparam

std::function< int(GRBenv *env, const char *paramname, int *valueP)> operations_research::GRBgetintparam = nullptr

Definition at line 194 of file environment.cc.

◆ GRBgetintparaminfo

std::function< int(GRBenv *envP, const char *paramname, int *valueP, int *minP, int *maxP, int *defP)> operations_research::GRBgetintparaminfo = nullptr

Definition at line 201 of file environment.cc.

◆ GRBgetmultiobjenv

std::function< GRBenv *(GRBmodel *model, int num)> operations_research::GRBgetmultiobjenv = nullptr

Definition at line 226 of file environment.cc.

◆ GRBgetnumparams

std::function< int(GRBenv *envP)> operations_research::GRBgetnumparams = nullptr

Definition at line 221 of file environment.cc.

◆ GRBgetparamname

std::function< int(GRBenv *envP, int i, char **paramnameP)> operations_research::GRBgetparamname
Initial value:
=
nullptr

Definition at line 209 of file environment.cc.

◆ GRBgetparamtype

std::function< int(GRBenv *envP, const char *paramname)> operations_research::GRBgetparamtype
Initial value:
=
nullptr

Definition at line 207 of file environment.cc.

◆ GRBgetstrattr

std::function< int(GRBmodel *model, const char *attrname, char **valueP)> operations_research::GRBgetstrattr = nullptr

Definition at line 105 of file environment.cc.

◆ GRBgetstrparam

std::function< int(GRBenv *env, const char *paramname, char *valueP)> operations_research::GRBgetstrparam = nullptr

Definition at line 198 of file environment.cc.

◆ GRBgetstrparaminfo

std::function< int(GRBenv *envP, const char *paramname, char *valueP, char *defP)> operations_research::GRBgetstrparaminfo = nullptr

Definition at line 206 of file environment.cc.

◆ GRBgetvars

std::function< int(GRBmodel *model, int *numnzP, int *vbeg, int *vind, double *vval, int start, int len)> operations_research::GRBgetvars = nullptr

Definition at line 123 of file environment.cc.

◆ GRBisattravailable

std::function< int(GRBmodel *model, const char *attrname)> operations_research::GRBisattravailable
Initial value:
=
nullptr

This is the 'define' section.

This was generated with the parse_header.py script. See the comment at the top of the script.

Definition at line 49 of file environment.cc.

◆ GRBloadenv

std::function< int(GRBenv **envP, const char *logfilename)> operations_research::GRBloadenv = nullptr

Definition at line 223 of file environment.cc.

◆ GRBnewmodel

std::function< int(GRBenv *env, GRBmodel **modelP, const char *Pname, int numvars, double *obj, double *lb, double *ub, char *vtype, char **varnames)> operations_research::GRBnewmodel = nullptr

Definition at line 130 of file environment.cc.

◆ GRBoptimize

std::function< int(GRBmodel *model)> operations_research::GRBoptimize = nullptr

Definition at line 124 of file environment.cc.

◆ GRBplatform

std::function< char *(void)> operations_research::GRBplatform = nullptr

Definition at line 232 of file environment.cc.

◆ GRBresetparams

std::function< int(GRBenv *env)> operations_research::GRBresetparams = nullptr

Definition at line 219 of file environment.cc.

◆ GRBsetcallbackfunc

std::function< int(GRBmodel *model, int(GUROBI_STDCALL *cb)(CB_ARGS), void *usrdata)> operations_research::GRBsetcallbackfunc = nullptr

Definition at line 110 of file environment.cc.

◆ GRBsetcharattrarray

std::function< int(GRBmodel *model, const char *attrname, int first, int len, char *newvalues)> operations_research::GRBsetcharattrarray = nullptr

Definition at line 81 of file environment.cc.

◆ GRBsetcharattrelement

std::function< int(GRBmodel *model, const char *attrname, int element, char newvalue)> operations_research::GRBsetcharattrelement = nullptr

Definition at line 75 of file environment.cc.

◆ GRBsetcharattrlist

std::function< int(GRBmodel *model, const char *attrname, int len, int *ind, char *newvalues)> operations_research::GRBsetcharattrlist = nullptr

Definition at line 84 of file environment.cc.

◆ GRBsetdblattr

std::function< int(GRBmodel *model, const char *attrname, double newvalue)> operations_research::GRBsetdblattr = nullptr

Definition at line 88 of file environment.cc.

◆ GRBsetdblattrarray

std::function< int(GRBmodel *model, const char *attrname, int first, int len, double *newvalues)> operations_research::GRBsetdblattrarray = nullptr

Definition at line 100 of file environment.cc.

◆ GRBsetdblattrelement

std::function< int(GRBmodel *model, const char *attrname, int element, double newvalue)> operations_research::GRBsetdblattrelement = nullptr

Definition at line 94 of file environment.cc.

◆ GRBsetdblattrlist

std::function< int(GRBmodel *model, const char *attrname, int len, int *ind, double *newvalues)> operations_research::GRBsetdblattrlist = nullptr

Definition at line 103 of file environment.cc.

◆ GRBsetdblparam

std::function< int(GRBenv *env, const char *paramname, double value)> operations_research::GRBsetdblparam = nullptr

Definition at line 216 of file environment.cc.

◆ GRBsetintattr

std::function< int(GRBmodel *model, const char *attrname, int newvalue)> operations_research::GRBsetintattr = nullptr

Definition at line 54 of file environment.cc.

◆ GRBsetintattrarray

std::function< int(GRBmodel *model, const char *attrname, int first, int len, int *newvalues)> operations_research::GRBsetintattrarray = nullptr

Definition at line 66 of file environment.cc.

◆ GRBsetintattrelement

std::function< int(GRBmodel *model, const char *attrname, int element, int newvalue)> operations_research::GRBsetintattrelement = nullptr

Definition at line 60 of file environment.cc.

◆ GRBsetintattrlist

std::function< int(GRBmodel *model, const char *attrname, int len, int *ind, int *newvalues)> operations_research::GRBsetintattrlist = nullptr

Definition at line 69 of file environment.cc.

◆ GRBsetintparam

std::function< int(GRBenv *env, const char *paramname, int value)> operations_research::GRBsetintparam = nullptr

Definition at line 214 of file environment.cc.

◆ GRBsetobjectiven

std::function< int(GRBmodel *model, int index, int priority, double weight, double abstol, double reltol, const char *name, double constant, int lnz, int *lind, double *lval)> operations_research::GRBsetobjectiven = nullptr

Definition at line 192 of file environment.cc.

◆ GRBsetparam

std::function< int(GRBenv *env, const char *paramname, const char *value)> operations_research::GRBsetparam = nullptr

Definition at line 212 of file environment.cc.

◆ GRBsetstrattr

std::function< int(GRBmodel *model, const char *attrname, const char *newvalue)> operations_research::GRBsetstrattr = nullptr

Definition at line 107 of file environment.cc.

◆ GRBsetstrparam

std::function< int(GRBenv *env, const char *paramname, const char *value)> operations_research::GRBsetstrparam = nullptr

Definition at line 218 of file environment.cc.

◆ GRBstartenv

std::function< int(GRBenv *env)> operations_research::GRBstartenv = nullptr

Definition at line 224 of file environment.cc.

◆ GRBterminate

std::function< void(GRBmodel *model)> operations_research::GRBterminate = nullptr

Definition at line 188 of file environment.cc.

◆ GRBupdatemodel

std::function< int(GRBmodel *model)> operations_research::GRBupdatemodel = nullptr

Definition at line 186 of file environment.cc.

◆ GRBversion

std::function< void(int *majorP, int *minorP, int *technicalP)> operations_research::GRBversion
Initial value:
=
nullptr

Definition at line 230 of file environment.cc.

◆ GRBwrite

std::function< int(GRBmodel *model, const char *filename)> operations_research::GRBwrite = nullptr

Definition at line 126 of file environment.cc.

◆ GScipOutput_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::GScipOutput_class_data_
Initial value:

Definition at line 2666 of file gscip.pb.cc.

◆ GScipOutput_Status_internal_data_

OR_PROTO_DLL const uint32_t operations_research::GScipOutput_Status_internal_data_
Initial value:
= {
1114112u, 0u, }

Definition at line 493 of file gscip.pb.cc.

◆ GScipOutput_Status_Status_ARRAYSIZE

int operations_research::GScipOutput_Status_Status_ARRAYSIZE = 16 + 1
inlineconstexpr

Definition at line 233 of file gscip.pb.h.

◆ GScipOutput_Status_Status_MAX

GScipOutput_Status operations_research::GScipOutput_Status_Status_MAX
inlineconstexpr
Initial value:
=
static_cast<GScipOutput_Status>(16)

Definition at line 228 of file gscip.pb.h.

◆ GScipOutput_Status_Status_MIN

GScipOutput_Status operations_research::GScipOutput_Status_Status_MIN
inlineconstexpr
Initial value:
=
static_cast<GScipOutput_Status>(0)

Definition at line 226 of file gscip.pb.h.

◆ GScipParameters_BoolParamsEntry_DoNotUse_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::GScipParameters_BoolParamsEntry_DoNotUse_class_data_

◆ GScipParameters_CharParamsEntry_DoNotUse_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::GScipParameters_CharParamsEntry_DoNotUse_class_data_

◆ GScipParameters_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::GScipParameters_class_data_
Initial value:

Definition at line 1270 of file gscip.pb.cc.

◆ GScipParameters_Emphasis_Emphasis_ARRAYSIZE

int operations_research::GScipParameters_Emphasis_Emphasis_ARRAYSIZE = 9 + 1
inlineconstexpr

Definition at line 144 of file gscip.pb.h.

◆ GScipParameters_Emphasis_Emphasis_MAX

GScipParameters_Emphasis operations_research::GScipParameters_Emphasis_Emphasis_MAX
inlineconstexpr
Initial value:

Definition at line 139 of file gscip.pb.h.

◆ GScipParameters_Emphasis_Emphasis_MIN

GScipParameters_Emphasis operations_research::GScipParameters_Emphasis_Emphasis_MIN
inlineconstexpr
Initial value:
=
static_cast<GScipParameters_Emphasis>(0)

Definition at line 137 of file gscip.pb.h.

◆ GScipParameters_Emphasis_internal_data_

OR_PROTO_DLL const uint32_t operations_research::GScipParameters_Emphasis_internal_data_
Initial value:
= {
655360u, 0u, }

Definition at line 481 of file gscip.pb.cc.

◆ GScipParameters_IntParamsEntry_DoNotUse_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::GScipParameters_IntParamsEntry_DoNotUse_class_data_

◆ GScipParameters_LongParamsEntry_DoNotUse_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::GScipParameters_LongParamsEntry_DoNotUse_class_data_

◆ GScipParameters_MetaParamValue_internal_data_

OR_PROTO_DLL const uint32_t operations_research::GScipParameters_MetaParamValue_internal_data_
Initial value:
= {
262144u, 0u, }

Definition at line 487 of file gscip.pb.cc.

◆ GScipParameters_MetaParamValue_MetaParamValue_ARRAYSIZE

int operations_research::GScipParameters_MetaParamValue_MetaParamValue_ARRAYSIZE = 3 + 1
inlineconstexpr

Definition at line 182 of file gscip.pb.h.

◆ GScipParameters_MetaParamValue_MetaParamValue_MAX

GScipParameters_MetaParamValue operations_research::GScipParameters_MetaParamValue_MetaParamValue_MAX
inlineconstexpr
Initial value:

Definition at line 177 of file gscip.pb.h.

◆ GScipParameters_MetaParamValue_MetaParamValue_MIN

GScipParameters_MetaParamValue operations_research::GScipParameters_MetaParamValue_MetaParamValue_MIN
inlineconstexpr
Initial value:

Definition at line 175 of file gscip.pb.h.

◆ GScipParameters_RealParamsEntry_DoNotUse_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::GScipParameters_RealParamsEntry_DoNotUse_class_data_

◆ GScipParameters_StringParamsEntry_DoNotUse_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::GScipParameters_StringParamsEntry_DoNotUse_class_data_

◆ GScipSolvingStats_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::GScipSolvingStats_class_data_
Initial value:

Definition at line 2138 of file gscip.pb.cc.

◆ Int128_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::Int128_class_data_
Initial value:

Definition at line 192 of file int128.pb.cc.

◆ IntervalVarAssignment_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::IntervalVarAssignment_class_data_
Initial value:

Definition at line 805 of file assignment.pb.cc.

◆ IntVarAssignment_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::IntVarAssignment_class_data_
Initial value:

Definition at line 435 of file assignment.pb.cc.

◆ IteratedLocalSearchParameters_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::IteratedLocalSearchParameters_class_data_

◆ kAllBits32

const uint32_t operations_research::kAllBits32 = 0xFFFFFFFFU
static

Definition at line 38 of file bitset.h.

◆ kAllBits64

const uint64_t operations_research::kAllBits64 = uint64_t{0xFFFFFFFFFFFFFFFF}
static

Basic bit operations.

Useful constants: word and double word will all bits set.

Definition at line 36 of file bitset.h.

◆ kAllBitsButLsb64

const uint64_t operations_research::kAllBitsButLsb64 = uint64_t{0xFFFFFFFFFFFFFFFE}
static

Definition at line 37 of file bitset.h.

◆ kAnyXsanEnabled

bool operations_research::kAnyXsanEnabled
inlineconstexpr
Initial value:
=
constexpr bool kAsanEnabled
constexpr bool kTsanEnabled
constexpr bool kMsanEnabled

Definition at line 24 of file testing_utils.h.

◆ kAsanEnabled

bool operations_research::kAsanEnabled = false
inlineconstexpr

Definition at line 19 of file testing_utils.h.

◆ kBalasFiles

const char* const operations_research::kBalasFiles[]
static
Initial value:
= {
"aa03.txt", "aa04.txt", "aa05.txt", "aa06.txt", "aa11.txt", "aa12.txt",
"aa13.txt", "aa14.txt", "aa15.txt", "aa16.txt", "aa17.txt", "aa18.txt",
"aa19.txt", "aa20.txt", "bus1.txt", "bus2.txt",
}

Definition at line 480 of file set_cover_solve.cc.

◆ kDefaultPrimalTolerance

double operations_research::kDefaultPrimalTolerance = 1e-07
constexpr

Definition at line 175 of file linear_solver.h.

◆ kDisconnectedPathDistance

const PathDistance operations_research::kDisconnectedPathDistance
Initial value:
=
std::numeric_limits<uint32_t>::max()

Definition at line 92 of file shortest_paths.h.

◆ kFimiFiles

const char* const operations_research::kFimiFiles[]
static
Initial value:
= {
"accidents.dat", "chess.dat", "connect.dat", "kosarak.dat",
"mushroom.dat",
"retail.dat", "webdocs.dat",
}

Definition at line 486 of file set_cover_solve.cc.

◆ kInfinity

double operations_research::kInfinity = std::numeric_limits<float>::infinity()
staticconstexpr

Definition at line 41 of file set_cover_heuristics.cc.

◆ kMaxGLPKNameLen

std::size_t operations_research::kMaxGLPKNameLen = 255
inlineconstexpr

The maximum length of GLPK's names for the problem, the variables and the constraints.

Definition at line 36 of file glpk_formatters.h.

◆ kMaxPossibleCost

Cost operations_research::kMaxPossibleCost = std::numeric_limits<Cost>::max()
staticconstexpr

Definition at line 40 of file set_cover_heuristics.cc.

◆ kMsanEnabled

bool operations_research::kMsanEnabled = false
inlineconstexpr

Definition at line 20 of file testing_utils.h.

◆ kOptimizationProblemTypeNames

NamedOptimizationProblemType operations_research::kOptimizationProblemTypeNames[]
constexpr
Initial value:
= {
}
@ SCIP_MIXED_INTEGER_PROGRAMMING
Recommended default value for MIP problems.
@ KNAPSACK_MIXED_INTEGER_PROGRAMMING
Dedicated knapsack solvers.
@ GUROBI_LINEAR_PROGRAMMING
Commercial software (need license).

Definition at line 569 of file linear_solver.cc.

◆ kRailFiles

const char* const operations_research::kRailFiles[]
static
Initial value:
= {
"rail507.txt", "rail516.txt", "rail582.txt", "rail2536.txt",
"rail2586.txt", "rail4284.txt", "rail4872.txt",
}

List all the files from the literature.

Definition at line 435 of file set_cover_solve.cc.

◆ kRoundTripTestNumber

double operations_research::kRoundTripTestNumber = 0.10000000000000002
inlineconstexpr

Number that can be used in unit tests to validate that RoundTripDoubleFormat is actually used by the underlying code.

This value has a unique shortest base-10 representation which is "0.10000000000000002": 0.10000000000000001 and 0.10000000000000003 respectively round to the two adjacent doubles, which shortest representations are "0.1" and "0.10000000000000003".

When printed with the default formatting of floating point numbers, this will be printed as "0.1".

The kRoundTripTestNumberStr constant can be used to test the output.

Definition at line 33 of file fp_roundtrip_conv_testing.h.

◆ kRoundTripTestNumberStr

absl::string_view operations_research::kRoundTripTestNumberStr
inlineconstexpr
Initial value:
=
"0.10000000000000002"

Definition at line 34 of file fp_roundtrip_conv_testing.h.

◆ kScp4To6Files

const char* const operations_research::kScp4To6Files[]
static
Initial value:
= {
"scp41.txt", "scp42.txt", "scp43.txt", "scp44.txt", "scp45.txt",
"scp46.txt", "scp47.txt", "scp48.txt", "scp49.txt", "scp410.txt",
"scp51.txt", "scp52.txt", "scp53.txt", "scp54.txt", "scp55.txt",
"scp56.txt", "scp57.txt", "scp58.txt", "scp59.txt", "scp510.txt",
"scp61.txt", "scp62.txt", "scp63.txt", "scp64.txt", "scp65.txt",
}

Definition at line 440 of file set_cover_solve.cc.

◆ kScpAToEFiles

const char* const operations_research::kScpAToEFiles[]
static
Initial value:
= {
"scpa1.txt", "scpa2.txt", "scpa3.txt", "scpa4.txt", "scpa5.txt",
"scpb1.txt", "scpb2.txt", "scpb3.txt", "scpb4.txt", "scpb5.txt",
"scpc1.txt", "scpc2.txt", "scpc3.txt", "scpc4.txt", "scpc5.txt",
"scpd1.txt", "scpd2.txt", "scpd3.txt", "scpd4.txt", "scpd5.txt",
"scpe1.txt", "scpe2.txt", "scpe3.txt", "scpe4.txt", "scpe5.txt",
}

Definition at line 448 of file set_cover_solve.cc.

◆ kScpClrFiles

const char* const operations_research::kScpClrFiles[]
static
Initial value:
= {
"scpclr10.txt",
"scpclr11.txt",
"scpclr12.txt",
"scpclr13.txt",
}

Definition at line 463 of file set_cover_solve.cc.

◆ kScpCycFiles

const char* const operations_research::kScpCycFiles[]
static
Initial value:
= {
"scpcyc06.txt", "scpcyc07.txt", "scpcyc08.txt",
"scpcyc09.txt", "scpcyc10.txt", "scpcyc11.txt",
}

Definition at line 470 of file set_cover_solve.cc.

◆ kScpNrFiles

const char* const operations_research::kScpNrFiles[]
static
Initial value:
= {
"scpnre1.txt", "scpnre2.txt", "scpnre3.txt", "scpnre4.txt", "scpnre5.txt",
"scpnrf1.txt", "scpnrf2.txt", "scpnrf3.txt", "scpnrf4.txt", "scpnrf5.txt",
"scpnrg1.txt", "scpnrg2.txt", "scpnrg3.txt", "scpnrg4.txt", "scpnrg5.txt",
"scpnrh1.txt", "scpnrh2.txt", "scpnrh3.txt", "scpnrh4.txt", "scpnrh5.txt",
}

Definition at line 456 of file set_cover_solve.cc.

◆ kStdToCharsDoubleIsSupported

ABSL_CONST_INIT const bool operations_research::kStdToCharsDoubleIsSupported
Initial value:
=
std_to_chars_has_overload_v<double>

True if the platform supports double to std::to_chars().

std::to_chars() for double is not yet supported on Emscripten, Android and iOS; they only implement std::to_chars() for integers.

Definition at line 107 of file fp_roundtrip_conv.cc.

◆ kTsanEnabled

bool operations_research::kTsanEnabled = false
inlineconstexpr

Definition at line 21 of file testing_utils.h.

◆ kUnassigned

const int operations_research::kUnassigned = -1
static

--— Routing model --—

Definition at line 507 of file routing.cc.

◆ kWedelinFiles

const char* const operations_research::kWedelinFiles[]
static
Initial value:
= {
"a320_coc.txt", "a320.txt", "alitalia.txt",
"b727.txt", "sasd9imp2.txt", "sasjump.txt",
}

Definition at line 475 of file set_cover_solve.cc.

◆ LocalSearchMetaheuristic_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::LocalSearchMetaheuristic_class_data_

◆ LocalSearchMetaheuristic_Value_internal_data_

OR_PROTO_DLL const uint32_t operations_research::LocalSearchMetaheuristic_Value_internal_data_
Initial value:
= {
458752u, 0u, }

Definition at line 163 of file routing_enums.pb.cc.

◆ LocalSearchMetaheuristic_Value_Value_ARRAYSIZE

int operations_research::LocalSearchMetaheuristic_Value_Value_ARRAYSIZE = 6 + 1
inlineconstexpr

Definition at line 166 of file routing_enums.pb.h.

◆ LocalSearchMetaheuristic_Value_Value_MAX

LocalSearchMetaheuristic_Value operations_research::LocalSearchMetaheuristic_Value_Value_MAX
inlineconstexpr
Initial value:

Definition at line 161 of file routing_enums.pb.h.

◆ LocalSearchMetaheuristic_Value_Value_MIN

LocalSearchMetaheuristic_Value operations_research::LocalSearchMetaheuristic_Value_Value_MIN
inlineconstexpr
Initial value:

Definition at line 159 of file routing_enums.pb.h.

◆ LocalSearchStatistics_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::LocalSearchStatistics_class_data_
Initial value:

Definition at line 1683 of file search_stats.pb.cc.

◆ LocalSearchStatistics_FirstSolutionStatistics_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::LocalSearchStatistics_FirstSolutionStatistics_class_data_

◆ LocalSearchStatistics_LocalSearchFilterStatistics_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::LocalSearchStatistics_LocalSearchFilterStatistics_class_data_

◆ LocalSearchStatistics_LocalSearchOperatorStatistics_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::LocalSearchStatistics_LocalSearchOperatorStatistics_class_data_

◆ MPAbsConstraint_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPAbsConstraint_class_data_
Initial value:

Definition at line 3803 of file linear_solver.pb.cc.

◆ MPArrayConstraint_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPArrayConstraint_class_data_
Initial value:

Definition at line 4095 of file linear_solver.pb.cc.

◆ MPArrayWithConstantConstraint_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPArrayWithConstantConstraint_class_data_

◆ MPConstraintProto_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPConstraintProto_class_data_
Initial value:

Definition at line 1669 of file linear_solver.pb.cc.

◆ MPGeneralConstraintProto_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPGeneralConstraintProto_class_data_

◆ MPIndicatorConstraint_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPIndicatorConstraint_class_data_
Initial value:

Definition at line 2747 of file linear_solver.pb.cc.

◆ MPModelDeltaProto_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPModelDeltaProto_class_data_
Initial value:

Definition at line 7090 of file linear_solver.pb.cc.

◆ MPModelDeltaProto_ConstraintOverridesEntry_DoNotUse_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPModelDeltaProto_ConstraintOverridesEntry_DoNotUse_class_data_

◆ MPModelDeltaProto_VariableOverridesEntry_DoNotUse_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPModelDeltaProto_VariableOverridesEntry_DoNotUse_class_data_

◆ MPModelProto_Annotation_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPModelProto_Annotation_class_data_

◆ MPModelProto_Annotation_TargetType_internal_data_

OR_PROTO_DLL const uint32_t operations_research::MPModelProto_Annotation_TargetType_internal_data_
Initial value:
= {
196608u, 0u, }

Definition at line 1145 of file linear_solver.pb.cc.

◆ MPModelProto_Annotation_TargetType_TargetType_ARRAYSIZE

int operations_research::MPModelProto_Annotation_TargetType_TargetType_ARRAYSIZE = 2 + 1
inlineconstexpr

Definition at line 228 of file linear_solver.pb.h.

◆ MPModelProto_Annotation_TargetType_TargetType_MAX

MPModelProto_Annotation_TargetType operations_research::MPModelProto_Annotation_TargetType_TargetType_MAX
inlineconstexpr
Initial value:

Definition at line 223 of file linear_solver.pb.h.

◆ MPModelProto_Annotation_TargetType_TargetType_MIN

MPModelProto_Annotation_TargetType operations_research::MPModelProto_Annotation_TargetType_TargetType_MIN
inlineconstexpr
Initial value:

Definition at line 221 of file linear_solver.pb.h.

◆ MPModelProto_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPModelProto_class_data_
Initial value:

Definition at line 5725 of file linear_solver.pb.cc.

◆ MPModelRequest_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPModelRequest_class_data_
Initial value:

Definition at line 7453 of file linear_solver.pb.cc.

◆ MPModelRequest_SolverType_internal_data_

OR_PROTO_DLL const uint32_t operations_research::MPModelRequest_SolverType_internal_data_
Initial value:
= {
589824u, 96u, 254u, 0u, 805306368u, }

Definition at line 1157 of file linear_solver.pb.cc.

◆ MPModelRequest_SolverType_SolverType_ARRAYSIZE

int operations_research::MPModelRequest_SolverType_SolverType_ARRAYSIZE = 102 + 1
inlineconstexpr

Definition at line 310 of file linear_solver.pb.h.

◆ MPModelRequest_SolverType_SolverType_MAX

MPModelRequest_SolverType operations_research::MPModelRequest_SolverType_SolverType_MAX
inlineconstexpr
Initial value:

Definition at line 305 of file linear_solver.pb.h.

◆ MPModelRequest_SolverType_SolverType_MIN

MPModelRequest_SolverType operations_research::MPModelRequest_SolverType_SolverType_MIN
inlineconstexpr
Initial value:
=
static_cast<MPModelRequest_SolverType>(0)

Definition at line 303 of file linear_solver.pb.h.

◆ MPQuadraticConstraint_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPQuadraticConstraint_class_data_
Initial value:

Definition at line 3422 of file linear_solver.pb.cc.

◆ MPQuadraticObjective_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPQuadraticObjective_class_data_
Initial value:

Definition at line 4711 of file linear_solver.pb.cc.

◆ MPSolution_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPSolution_class_data_
Initial value:

Definition at line 7902 of file linear_solver.pb.cc.

◆ MPSolutionResponse_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPSolutionResponse_class_data_
Initial value:

Definition at line 8481 of file linear_solver.pb.cc.

◆ MPSolveInfo_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPSolveInfo_class_data_
Initial value:

Definition at line 8159 of file linear_solver.pb.cc.

◆ MPSolverCommonParameters_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPSolverCommonParameters_class_data_

◆ MPSolverCommonParameters_LPAlgorithmValues_internal_data_

OR_PROTO_DLL const uint32_t operations_research::MPSolverCommonParameters_LPAlgorithmValues_internal_data_
Initial value:
= {
262144u, 0u, }

Definition at line 1151 of file linear_solver.pb.cc.

◆ MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_ARRAYSIZE

int operations_research::MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_ARRAYSIZE = 3 + 1
inlineconstexpr

Definition at line 262 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MAX

MPSolverCommonParameters_LPAlgorithmValues operations_research::MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MAX
inlineconstexpr
Initial value:

Definition at line 257 of file linear_solver.pb.h.

◆ MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MIN

MPSolverCommonParameters_LPAlgorithmValues operations_research::MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MIN
inlineconstexpr
Initial value:

Definition at line 255 of file linear_solver.pb.h.

◆ MPSolverResponseStatus_ARRAYSIZE

int operations_research::MPSolverResponseStatus_ARRAYSIZE = 113 + 1
inlineconstexpr

Definition at line 349 of file linear_solver.pb.h.

◆ MPSolverResponseStatus_internal_data_

OR_PROTO_DLL const uint32_t operations_research::MPSolverResponseStatus_internal_data_
Initial value:
= {
524288u, 128u, 0u, 0u, 234893312u, 512u, }

Definition at line 1163 of file linear_solver.pb.cc.

◆ MPSolverResponseStatus_MAX

MPSolverResponseStatus operations_research::MPSolverResponseStatus_MAX
inlineconstexpr
Initial value:

Definition at line 344 of file linear_solver.pb.h.

◆ MPSolverResponseStatus_MIN

MPSolverResponseStatus operations_research::MPSolverResponseStatus_MIN
inlineconstexpr
Initial value:
=
static_cast<MPSolverResponseStatus>(0)

Definition at line 342 of file linear_solver.pb.h.

◆ MPSosConstraint_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPSosConstraint_class_data_
Initial value:

Definition at line 3079 of file linear_solver.pb.cc.

◆ MPSosConstraint_Type_internal_data_

OR_PROTO_DLL const uint32_t operations_research::MPSosConstraint_Type_internal_data_
Initial value:
= {
131072u, 0u, }

Definition at line 1139 of file linear_solver.pb.cc.

◆ MPSosConstraint_Type_Type_ARRAYSIZE

int operations_research::MPSosConstraint_Type_Type_ARRAYSIZE = 1 + 1
inlineconstexpr

Definition at line 195 of file linear_solver.pb.h.

◆ MPSosConstraint_Type_Type_MAX

MPSosConstraint_Type operations_research::MPSosConstraint_Type_Type_MAX
inlineconstexpr
Initial value:

Definition at line 190 of file linear_solver.pb.h.

◆ MPSosConstraint_Type_Type_MIN

MPSosConstraint_Type operations_research::MPSosConstraint_Type_Type_MIN
inlineconstexpr
Initial value:
=
static_cast<MPSosConstraint_Type>(0)

Definition at line 188 of file linear_solver.pb.h.

◆ MPVariableProto_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::MPVariableProto_class_data_
Initial value:

Definition at line 1278 of file linear_solver.pb.cc.

◆ num_free_elements_

operations_research::num_free_elements_[subset]

} } for (const SubsetIndex subset : model_->SubsetRange()) { for (const ElementIndex element : columns[subset]) { if (coverage_[element] <= 1) { ++num_non_overcovered_elements_[subset]; } if (coverage_[element] >= 1) {

Definition at line 196 of file set_cover_invariant.cc.

◆ num_uncovered_elements_

operations_research::num_uncovered_elements_

NOTE(user): This piece of code is for reference because it seems to be faster to update the invariant. const BaseInt num_subsets = model_->num_subsets(); is_redundant_.assign(num_subsets, false); num_non_overcovered_elements_.assign(num_subsets, 0); const SparseColumnView& columns = model_->columns(); for (const ElementIndex element : model_->ElementRange()) { if (coverage_[element] >= 1) {

Definition at line 187 of file set_cover_invariant.cc.

◆ OptionalBoolean_ARRAYSIZE

int operations_research::OptionalBoolean_ARRAYSIZE = 3 + 1
inlineconstexpr

Definition at line 84 of file optional_boolean.pb.h.

◆ OptionalBoolean_internal_data_

OR_PROTO_DLL const uint32_t operations_research::OptionalBoolean_internal_data_
Initial value:
= {
65536u, 32u, 6u, }

Definition at line 67 of file optional_boolean.pb.cc.

◆ OptionalBoolean_MAX

OptionalBoolean operations_research::OptionalBoolean_MAX
inlineconstexpr
Initial value:

Definition at line 79 of file optional_boolean.pb.h.

◆ OptionalBoolean_MIN

OptionalBoolean operations_research::OptionalBoolean_MIN
inlineconstexpr
Initial value:
=
static_cast<OptionalBoolean>(0)

Definition at line 77 of file optional_boolean.pb.h.

◆ OptionalDouble_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::OptionalDouble_class_data_
Initial value:

Definition at line 6204 of file linear_solver.pb.cc.

◆ PartialVariableAssignment_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::PartialVariableAssignment_class_data_

◆ PerturbationStrategy_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::PerturbationStrategy_class_data_
Initial value:

Definition at line 2241 of file routing_ils.pb.cc.

◆ PerturbationStrategy_Value_internal_data_

OR_PROTO_DLL const uint32_t operations_research::PerturbationStrategy_Value_internal_data_
Initial value:
= {
131072u, 0u, }

Definition at line 490 of file routing_ils.pb.cc.

◆ PerturbationStrategy_Value_Value_ARRAYSIZE

int operations_research::PerturbationStrategy_Value_Value_ARRAYSIZE = 1 + 1
inlineconstexpr

Definition at line 185 of file routing_ils.pb.h.

◆ PerturbationStrategy_Value_Value_MAX

PerturbationStrategy_Value operations_research::PerturbationStrategy_Value_Value_MAX
inlineconstexpr
Initial value:

Definition at line 180 of file routing_ils.pb.h.

◆ PerturbationStrategy_Value_Value_MIN

PerturbationStrategy_Value operations_research::PerturbationStrategy_Value_Value_MIN
inlineconstexpr
Initial value:
=

Definition at line 178 of file routing_ils.pb.h.

◆ RandomWalkRuinStrategy_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::RandomWalkRuinStrategy_class_data_
Initial value:

Definition at line 819 of file routing_ils.pb.cc.

◆ RegularLimitParameters_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::RegularLimitParameters_class_data_
Initial value:

Definition at line 208 of file search_limit.pb.cc.

◆ Room_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::Room_class_data_
Initial value:

Definition at line 3252 of file course_scheduling.pb.cc.

◆ RoutingModelParameters_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::RoutingModelParameters_class_data_

◆ RoutingSearchParameters_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::RoutingSearchParameters_class_data_

◆ RoutingSearchParameters_ImprovementSearchLimitParameters_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::RoutingSearchParameters_ImprovementSearchLimitParameters_class_data_

◆ RoutingSearchParameters_InsertionSortingProperty_InsertionSortingProperty_ARRAYSIZE

int operations_research::RoutingSearchParameters_InsertionSortingProperty_InsertionSortingProperty_ARRAYSIZE = 8 + 1
inlineconstexpr

Definition at line 163 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_InsertionSortingProperty_InsertionSortingProperty_MAX

RoutingSearchParameters_InsertionSortingProperty operations_research::RoutingSearchParameters_InsertionSortingProperty_InsertionSortingProperty_MAX
inlineconstexpr
Initial value:

Definition at line 158 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_InsertionSortingProperty_InsertionSortingProperty_MIN

RoutingSearchParameters_InsertionSortingProperty operations_research::RoutingSearchParameters_InsertionSortingProperty_InsertionSortingProperty_MIN
inlineconstexpr
Initial value:

Definition at line 156 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_InsertionSortingProperty_internal_data_

OR_PROTO_DLL const uint32_t operations_research::RoutingSearchParameters_InsertionSortingProperty_internal_data_
Initial value:
= {
589824u, 0u, }

Definition at line 702 of file routing_parameters.pb.cc.

◆ RoutingSearchParameters_LocalSearchNeighborhoodOperators_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::RoutingSearchParameters_LocalSearchNeighborhoodOperators_class_data_

◆ RoutingSearchParameters_PairInsertionStrategy_internal_data_

OR_PROTO_DLL const uint32_t operations_research::RoutingSearchParameters_PairInsertionStrategy_internal_data_
Initial value:
= {
262144u, 0u, }

Definition at line 696 of file routing_parameters.pb.cc.

◆ RoutingSearchParameters_PairInsertionStrategy_PairInsertionStrategy_ARRAYSIZE

int operations_research::RoutingSearchParameters_PairInsertionStrategy_PairInsertionStrategy_ARRAYSIZE = 3 + 1
inlineconstexpr

Definition at line 120 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_PairInsertionStrategy_PairInsertionStrategy_MAX

RoutingSearchParameters_PairInsertionStrategy operations_research::RoutingSearchParameters_PairInsertionStrategy_PairInsertionStrategy_MAX
inlineconstexpr
Initial value:

Definition at line 115 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_PairInsertionStrategy_PairInsertionStrategy_MIN

RoutingSearchParameters_PairInsertionStrategy operations_research::RoutingSearchParameters_PairInsertionStrategy_PairInsertionStrategy_MIN
inlineconstexpr
Initial value:

Definition at line 113 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_SchedulingSolver_internal_data_

OR_PROTO_DLL const uint32_t operations_research::RoutingSearchParameters_SchedulingSolver_internal_data_
Initial value:
= {
196608u, 0u, }

Definition at line 708 of file routing_parameters.pb.cc.

◆ RoutingSearchParameters_SchedulingSolver_SchedulingSolver_ARRAYSIZE

int operations_research::RoutingSearchParameters_SchedulingSolver_SchedulingSolver_ARRAYSIZE = 2 + 1
inlineconstexpr

Definition at line 200 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_SchedulingSolver_SchedulingSolver_MAX

RoutingSearchParameters_SchedulingSolver operations_research::RoutingSearchParameters_SchedulingSolver_SchedulingSolver_MAX
inlineconstexpr
Initial value:

Definition at line 195 of file routing_parameters.pb.h.

◆ RoutingSearchParameters_SchedulingSolver_SchedulingSolver_MIN

RoutingSearchParameters_SchedulingSolver operations_research::RoutingSearchParameters_SchedulingSolver_SchedulingSolver_MIN
inlineconstexpr
Initial value:

Definition at line 193 of file routing_parameters.pb.h.

◆ RoutingSearchStatus_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::RoutingSearchStatus_class_data_
Initial value:

Definition at line 455 of file routing_enums.pb.cc.

◆ RoutingSearchStatus_Value_internal_data_

OR_PROTO_DLL const uint32_t operations_research::RoutingSearchStatus_Value_internal_data_
Initial value:
= {
524288u, 0u, }

Definition at line 169 of file routing_enums.pb.cc.

◆ RoutingSearchStatus_Value_Value_ARRAYSIZE

int operations_research::RoutingSearchStatus_Value_Value_ARRAYSIZE = 7 + 1
inlineconstexpr

Definition at line 208 of file routing_enums.pb.h.

◆ RoutingSearchStatus_Value_Value_MAX

RoutingSearchStatus_Value operations_research::RoutingSearchStatus_Value_Value_MAX
inlineconstexpr
Initial value:

Definition at line 203 of file routing_enums.pb.h.

◆ RoutingSearchStatus_Value_Value_MIN

RoutingSearchStatus_Value operations_research::RoutingSearchStatus_Value_Value_MIN
inlineconstexpr
Initial value:
=
static_cast<RoutingSearchStatus_Value>(0)

Definition at line 201 of file routing_enums.pb.h.

◆ RuinCompositionStrategy_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::RuinCompositionStrategy_class_data_
Initial value:

Definition at line 1723 of file routing_ils.pb.cc.

◆ RuinCompositionStrategy_Value_internal_data_

OR_PROTO_DLL const uint32_t operations_research::RuinCompositionStrategy_Value_internal_data_
Initial value:
= {
262144u, 0u, }

Definition at line 484 of file routing_ils.pb.cc.

◆ RuinCompositionStrategy_Value_Value_ARRAYSIZE

int operations_research::RuinCompositionStrategy_Value_Value_ARRAYSIZE = 3 + 1
inlineconstexpr

Definition at line 149 of file routing_ils.pb.h.

◆ RuinCompositionStrategy_Value_Value_MAX

RuinCompositionStrategy_Value operations_research::RuinCompositionStrategy_Value_Value_MAX
inlineconstexpr
Initial value:

Definition at line 144 of file routing_ils.pb.h.

◆ RuinCompositionStrategy_Value_Value_MIN

RuinCompositionStrategy_Value operations_research::RuinCompositionStrategy_Value_Value_MIN
inlineconstexpr
Initial value:

Definition at line 142 of file routing_ils.pb.h.

◆ RuinRecreateParameters_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::RuinRecreateParameters_class_data_
Initial value:

Definition at line 1891 of file routing_ils.pb.cc.

◆ RuinStrategy_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::RuinStrategy_class_data_
Initial value:

Definition at line 1441 of file routing_ils.pb.cc.

◆ SearchStatistics_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::SearchStatistics_class_data_
Initial value:

Definition at line 2468 of file search_stats.pb.cc.

◆ SequenceVarAssignment_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::SequenceVarAssignment_class_data_
Initial value:

Definition at line 1373 of file assignment.pb.cc.

◆ SetCoverProto_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::SetCoverProto_class_data_
Initial value:

Definition at line 628 of file set_cover.pb.cc.

◆ SetCoverProto_Subset_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::SetCoverProto_Subset_class_data_
Initial value:

Definition at line 336 of file set_cover.pb.cc.

◆ SetCoverSolutionResponse_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::SetCoverSolutionResponse_class_data_
Initial value:

Definition at line 998 of file set_cover.pb.cc.

◆ SetCoverSolutionResponse_Status_internal_data_

OR_PROTO_DLL const uint32_t operations_research::SetCoverSolutionResponse_Status_internal_data_
Initial value:
= {
327680u, 0u, }

Definition at line 221 of file set_cover.pb.cc.

◆ SetCoverSolutionResponse_Status_Status_ARRAYSIZE

int operations_research::SetCoverSolutionResponse_Status_Status_ARRAYSIZE = 4 + 1
inlineconstexpr

Definition at line 102 of file set_cover.pb.h.

◆ SetCoverSolutionResponse_Status_Status_MAX

SetCoverSolutionResponse_Status operations_research::SetCoverSolutionResponse_Status_Status_MAX
inlineconstexpr
Initial value:

Definition at line 97 of file set_cover.pb.h.

◆ SetCoverSolutionResponse_Status_Status_MIN

SetCoverSolutionResponse_Status operations_research::SetCoverSolutionResponse_Status_Status_MIN
inlineconstexpr
Initial value:

Definition at line 95 of file set_cover.pb.h.

◆ SimulatedAnnealingParameters_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::SimulatedAnnealingParameters_class_data_

◆ SISRRuinStrategy_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::SISRRuinStrategy_class_data_
Initial value:

Definition at line 1055 of file routing_ils.pb.cc.

◆ SpatiallyCloseRoutesRuinStrategy_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::SpatiallyCloseRoutesRuinStrategy_class_data_

◆ Student_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::Student_class_data_
Initial value:

Definition at line 2959 of file course_scheduling.pb.cc.

◆ StudentAssignment_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::StudentAssignment_class_data_
Initial value:

Definition at line 1825 of file course_scheduling.pb.cc.

◆ Teacher_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::Teacher_class_data_
Initial value:

Definition at line 2652 of file course_scheduling.pb.cc.

◆ WorkerInfo_class_data_

OR_PROTO_DLLconst::google::protobuf::internal::ClassDataFull operations_research::WorkerInfo_class_data_
Initial value:

Definition at line 1749 of file assignment.pb.cc.

◆ XPRSaddcbintsol

std::function< int(XPRSprob prob, void(XPRS_CC *f_intsol)(XPRSprob cbprob, void *cbdata), void *p, int priority)> operations_research::XPRSaddcbintsol = nullptr

Definition at line 107 of file environment.cc.

◆ XPRSaddcbmessage

std::function< int(XPRSprob prob, void(XPRS_CC *f_message)(XPRSprob cbprob, void *cbdata, const char *msg, int msglen, int msgtype), void *p, int priority)> operations_research::XPRSaddcbmessage = nullptr

Definition at line 109 of file environment.cc.

◆ XPRSaddcols

std::function< int(XPRSprob prob, int ncols, int ncoefs, const double objcoef[], const int start[], const int rowind[], const double rowcoef[], const double lb[], const double ub[])> operations_research::XPRSaddcols = nullptr

Definition at line 81 of file environment.cc.

◆ XPRSaddmipsol

std::function< int(XPRSprob prob, int length, const double solval[], const int colind[], const char *name)> operations_research::XPRSaddmipsol = nullptr

Definition at line 95 of file environment.cc.

◆ XPRSaddnames

std::function< int(XPRSprob prob, int type, const char names[], int first, int last)> operations_research::XPRSaddnames = nullptr

Definition at line 82 of file environment.cc.

◆ XPRSaddrows

std::function< int(XPRSprob prob, int nrows, int ncoefs, const char rowtype[], const double rhs[], const double rng[], const int start[], const int colind[], const double rowcoef[])> operations_research::XPRSaddrows = nullptr

Definition at line 79 of file environment.cc.

◆ XPRSchgbounds

std::function< int(XPRSprob prob, int nbounds, const int colind[], const char bndtype[], const double bndval[])> operations_research::XPRSchgbounds = nullptr

Definition at line 94 of file environment.cc.

◆ XPRSchgcoef

std::function< int(XPRSprob prob, int row, int col, double coef)> operations_research::XPRSchgcoef = nullptr

Definition at line 99 of file environment.cc.

◆ XPRSchgcoltype

std::function< int(XPRSprob prob, int ncols, const int colind[], const char coltype[])> operations_research::XPRSchgcoltype = nullptr

Definition at line 85 of file environment.cc.

◆ XPRSchgmcoef

std::function< int(XPRSprob prob, int ncoefs, const int rowind[], const int colind[], const double rowcoef[])> operations_research::XPRSchgmcoef = nullptr

Definition at line 100 of file environment.cc.

◆ XPRSchgmcoef64

std::function< int(XPRSprob prob, XPRSint64 ncoefs, const int rowind[], const int colind[], const double rowcoef[])> operations_research::XPRSchgmcoef64 = nullptr

Definition at line 101 of file environment.cc.

◆ XPRSchgmqobj

std::function< int(XPRSprob prob, int ncoefs, const int objqcol1[], const int objqcol2[], const double objqcoef[])> operations_research::XPRSchgmqobj = nullptr

Definition at line 102 of file environment.cc.

◆ XPRSchgobj

std::function< int(XPRSprob prob, int ncols, const int colind[], const double objcoef[])> operations_research::XPRSchgobj = nullptr

Definition at line 98 of file environment.cc.

◆ XPRSchgobjsense

std::function< int(XPRSprob prob, int objsense)> operations_research::XPRSchgobjsense = nullptr

Definition at line 88 of file environment.cc.

◆ XPRSchgrhs

std::function< int(XPRSprob prob, int nrows, const int rowind[], const double rhs[])> operations_research::XPRSchgrhs = nullptr

Definition at line 103 of file environment.cc.

◆ XPRSchgrhsrange

std::function< int(XPRSprob prob, int nrows, const int rowind[], const double rng[])> operations_research::XPRSchgrhsrange = nullptr

Definition at line 104 of file environment.cc.

◆ XPRSchgrowtype

std::function< int(XPRSprob prob, int nrows, const int rowind[], const char rowtype[])> operations_research::XPRSchgrowtype = nullptr

Definition at line 105 of file environment.cc.

◆ XPRScreateprob

std::function< int(XPRSprob *p_prob)> operations_research::XPRScreateprob = nullptr

Let's not reformat for rest of the file. This was generated with the parse_header_xpress.py script. See the comment at the top of the script. This is the 'define' section. NOLINTBEGIN(whitespace/line_length) NOLINTBEGIN(google3-runtime-global-variables) clang-format off

Let's not reformat for rest of the file. NOLINTBEGIN(whitespace/line_length) clang-format off

Definition at line 48 of file environment.cc.

◆ XPRSdelcols

std::function< int(XPRSprob prob, int ncols, const int colind[])> operations_research::XPRSdelcols = nullptr

Definition at line 84 of file environment.cc.

◆ XPRSdelobj

std::function< int(XPRSprob prob, int objidx)> operations_research::XPRSdelobj = nullptr

Definition at line 106 of file environment.cc.

◆ XPRSdelrows

std::function< int(XPRSprob prob, int nrows, const int rowind[])> operations_research::XPRSdelrows = nullptr

Definition at line 80 of file environment.cc.

◆ XPRSdestroyprob

std::function< int(XPRSprob prob)> operations_research::XPRSdestroyprob = nullptr

Definition at line 49 of file environment.cc.

◆ XPRSfree

std::function< int(void)> operations_research::XPRSfree = nullptr

Definition at line 51 of file environment.cc.

◆ XPRSgetbanner

std::function< int(char *banner)> operations_research::XPRSgetbanner = nullptr

Definition at line 54 of file environment.cc.

◆ XPRSgetbasis

std::function< int(XPRSprob prob, int rowstat[], int colstat[])> operations_research::XPRSgetbasis = nullptr

Definition at line 90 of file environment.cc.

◆ XPRSgetcoef

OR_DLL std::function< int(XPRSprob prob, int row, int col, double *p_coef)> operations_research::XPRSgetcoef = nullptr

Definition at line 76 of file environment.cc.

◆ XPRSgetcoltype

OR_DLL std::function< int(XPRSprob prob, char coltype[], int first, int last)> operations_research::XPRSgetcoltype = nullptr

Definition at line 93 of file environment.cc.

◆ XPRSgetcontrolinfo

std::function< int(XPRSprob prob, const char *name, int *p_id, int *p_type)> operations_research::XPRSgetcontrolinfo = nullptr

Definition at line 70 of file environment.cc.

◆ XPRSgetdblattrib

OR_DLL std::function< int(XPRSprob prob, int attrib, double *p_value)> operations_research::XPRSgetdblattrib = nullptr

Definition at line 69 of file environment.cc.

◆ XPRSgetdblcontrol

OR_DLL std::function< int(XPRSprob prob, int control, double *p_value)> operations_research::XPRSgetdblcontrol = nullptr

Definition at line 65 of file environment.cc.

◆ XPRSgetduals

std::function< int(XPRSprob prob, int *status, double duals[], int first, int last)> operations_research::XPRSgetduals = nullptr

Definition at line 77 of file environment.cc.

◆ XPRSgetintattrib

OR_DLL std::function< int(XPRSprob prob, int attrib, int *p_value)> operations_research::XPRSgetintattrib = nullptr

Definition at line 67 of file environment.cc.

◆ XPRSgetintcontrol

OR_DLL std::function< int(XPRSprob prob, int control, int *p_value)> operations_research::XPRSgetintcontrol = nullptr

Definition at line 63 of file environment.cc.

◆ XPRSgetintcontrol64

OR_DLL std::function< int(XPRSprob prob, int control, XPRSint64 *p_value)> operations_research::XPRSgetintcontrol64 = nullptr

Definition at line 64 of file environment.cc.

◆ XPRSgetlasterror

std::function< int(XPRSprob prob, char *errmsg)> operations_research::XPRSgetlasterror = nullptr

Definition at line 89 of file environment.cc.

◆ XPRSgetlb

OR_DLL std::function< int(XPRSprob prob, double lb[], int first, int last)> operations_research::XPRSgetlb = nullptr

Definition at line 74 of file environment.cc.

◆ XPRSgetlicerrmsg

std::function< int(char *buffer, int maxbytes)> operations_research::XPRSgetlicerrmsg = nullptr

Definition at line 52 of file environment.cc.

◆ XPRSgetlpsol

std::function< int(XPRSprob prob, double x[], double slack[], double duals[], double djs[])> operations_research::XPRSgetlpsol = nullptr

Definition at line 96 of file environment.cc.

◆ XPRSgetmipsol

std::function< int(XPRSprob prob, double x[], double slack[])> operations_research::XPRSgetmipsol = nullptr

Definition at line 97 of file environment.cc.

◆ XPRSgetnames

std::function< int(XPRSprob prob, int type, char names[], int first, int last)> operations_research::XPRSgetnames = nullptr

Definition at line 83 of file environment.cc.

◆ XPRSgetobj

OR_DLL std::function< int(XPRSprob prob, double objcoef[], int first, int last)> operations_research::XPRSgetobj = nullptr

Definition at line 71 of file environment.cc.

◆ XPRSgetredcosts

std::function< int(XPRSprob prob, int *status, double djs[], int first, int last)> operations_research::XPRSgetredcosts = nullptr

Definition at line 78 of file environment.cc.

◆ XPRSgetrhs

OR_DLL std::function< int(XPRSprob prob, double rhs[], int first, int last)> operations_research::XPRSgetrhs = nullptr

Definition at line 72 of file environment.cc.

◆ XPRSgetrhsrange

OR_DLL std::function< int(XPRSprob prob, double rng[], int first, int last)> operations_research::XPRSgetrhsrange = nullptr

Definition at line 73 of file environment.cc.

◆ XPRSgetrowtype

OR_DLL std::function< int(XPRSprob prob, char rowtype[], int first, int last)> operations_research::XPRSgetrowtype = nullptr

Definition at line 92 of file environment.cc.

◆ XPRSgetstringattrib

OR_DLL std::function< int(XPRSprob prob, int attrib, char *value, int maxbytes, int *p_nbytes)> operations_research::XPRSgetstringattrib = nullptr

Definition at line 68 of file environment.cc.

◆ XPRSgetstringcontrol

OR_DLL std::function< int(XPRSprob prob, int control, char *value, int maxbytes, int *p_nbytes)> operations_research::XPRSgetstringcontrol = nullptr

Definition at line 66 of file environment.cc.

◆ XPRSgetub

OR_DLL std::function< int(XPRSprob prob, double ub[], int first, int last)> operations_research::XPRSgetub = nullptr

Definition at line 75 of file environment.cc.

◆ XPRSgetversion

std::function< int(char *version)> operations_research::XPRSgetversion = nullptr

Definition at line 55 of file environment.cc.

◆ XPRSinit

std::function< int(const char *path)> operations_research::XPRSinit = nullptr

Definition at line 50 of file environment.cc.

◆ XPRSinterrupt

std::function< int(XPRSprob prob, int reason)> operations_research::XPRSinterrupt = nullptr

Definition at line 58 of file environment.cc.

◆ XPRSlicense

std::function< int(int *p_i, char *p_c)> operations_research::XPRSlicense = nullptr

Definition at line 53 of file environment.cc.

◆ XPRSloadbasis

std::function< int(XPRSprob prob, const int rowstat[], const int colstat[])> operations_research::XPRSloadbasis = nullptr

Definition at line 86 of file environment.cc.

◆ XPRSlpoptimize

std::function< int(XPRSprob prob, const char *flags)> operations_research::XPRSlpoptimize = nullptr

Definition at line 110 of file environment.cc.

◆ XPRSmipoptimize

std::function< int(XPRSprob prob, const char *flags)> operations_research::XPRSmipoptimize = nullptr

Definition at line 111 of file environment.cc.

◆ XPRSoptimize

std::function< int(XPRSprob prob, const char *flags, int *solvestatus, int *solstatus)> operations_research::XPRSoptimize = nullptr

Definition at line 112 of file environment.cc.

◆ XPRSpostsolve

std::function< int(XPRSprob prob)> operations_research::XPRSpostsolve = nullptr

Definition at line 87 of file environment.cc.

◆ XPRSremovecbintsol

std::function< int(XPRSprob prob, void(XPRS_CC *f_intsol)(XPRSprob cbprob, void *cbdata), void *p)> operations_research::XPRSremovecbintsol = nullptr

Definition at line 108 of file environment.cc.

◆ XPRSsetdblcontrol

std::function< int(XPRSprob prob, int control, double value)> operations_research::XPRSsetdblcontrol = nullptr

Definition at line 61 of file environment.cc.

◆ XPRSsetdefaultcontrol

std::function< int(XPRSprob prob, int control)> operations_research::XPRSsetdefaultcontrol = nullptr

Definition at line 57 of file environment.cc.

◆ XPRSsetintcontrol

std::function< int(XPRSprob prob, int control, int value)> operations_research::XPRSsetintcontrol = nullptr

Definition at line 59 of file environment.cc.

◆ XPRSsetintcontrol64

std::function< int(XPRSprob prob, int control, XPRSint64 value)> operations_research::XPRSsetintcontrol64 = nullptr

Definition at line 60 of file environment.cc.

◆ XPRSsetprobname

std::function< int(XPRSprob prob, const char *probname)> operations_research::XPRSsetprobname = nullptr

Definition at line 56 of file environment.cc.

◆ XPRSsetstrcontrol

std::function< int(XPRSprob prob, int control, const char *value)> operations_research::XPRSsetstrcontrol = nullptr

Definition at line 62 of file environment.cc.

◆ XPRSwriteprob

std::function< int(XPRSprob prob, const char *filename, const char *flags)> operations_research::XPRSwriteprob = nullptr

Definition at line 91 of file environment.cc.