Tag Info

What is the purpose of libraries like Pyomo and Google OR tools?

Pyomo is an algebraic modeling language and allows users to easily represent optimization problems at a high-level (by defining variables, constraints, objective, etc.). Pyomo then provides interfaces ...

What is the purpose of libraries like Pyomo and Google OR tools?

OR-Tools is a set of solver: A very popular Routing Library built on top of a traditional constraint programming solver An award winning ...
• 1,884
Accepted

Warm start CPLEX using google or-tools

See answer on https://github.com/google/or-tools/issues/1444 This is not implemented. I welcome pull requests. You can have a look at the code in the Gurobi or Scip interface files.
• 1,884

Google - OR tools for workforce scheduling problems

In addition to the answer from @Mehdi... I've recently started to work with OR-tools and find it very nice for prototyping. The Python interface allowed me to produce a first version of my model ...
• 2,697
Accepted

Maximize assigned tasks to each worker

Why quadratic? just use a larger (linear) weight for tasks assigned to worker 1.
• 1,884
Accepted

How to measure model quality in OR-Tools?

Time to solve (to proven optimality) is certainly a good choice. I don't know that I would be excited about number of conflicts. You could look at the ratio of objective value on that problem ...
• 32k
Accepted

Travelling salesman problem with given number of locations to visit

Thanks to @Laurent Perron for their answer - I've tried modifying the code as follows, and it appears to work fine: ...
Accepted

• 1,384

TSP problem: traveller does not visit all nodes - Google OR-tools

(already answered on S.O. ) You should have a look at Jobshop scheduling example with transitions In particular, it maintains a graph of direct successor between tasks on the same machine.
• 1,884
Accepted

Cumulative Constraint OR-Tools

If you look at OR-Tools: CumulativeConstraint, AddCumulative takes a variable as argument, so if it is constant, create a variable with a fixed domain. It returns ...
• 1,884
Accepted

CP-SAT ortools - Is there any complete list of possible/available StringParameters for the CpSolver?

As many things in Google, OR-Tools uses Protocol Buffers to serialize data. Here's a list of all .proto files in OR-Tools: https://github.com/google/or-tools/...
• 1,384

find suboptimal solution, if no optimal solution exists?

If your linear program does not have an optimal solution one of three things might be the case: The solver didn't find the optimal solution, even though it exists. This might be due to runtime or ...
• 2,405

How exactly does OptionalIntervalVar work in OR-Tools?

In the Python API there is a pretty good docstring of what an OptionalIntervalVar is: An optional interval variable is a constraint, that is itself used in other constraints like NoOverlap. This ...
• 1,384

Incorrect solution for Vehicle Routing Problem in or-tools

I notice you are using FirstSolutionStrategy.Value.PATH_CHEAPEST_ARC. If this name does what it suggests, then it's probably a greedy strategy that chooses between ...
• 295
Accepted

CP-SAT over CBC for MIP, is it worthwhile?

CP-SAT is a full fledged (non-mixed) integer programming solver (linear relaxation, presolve, cuts, branching heuristics). It is geared towards optimization, and is actually not very good at ...
• 1,884

Adding a hard and soft upper bound constraint of number of locations to visit (VRP)

Crossposted from: Stack Overflow The idea is to create another dimension ('visit') that is incremented by 1 on each visit. Then use SetCumulVarSoftUpperBound on ...
• 1,884

Priority List Constraint

If I understand your problem correctly, you have a standard CVRP and a second (soft) objective. You are therefore in the wonderful world of multi-objective optimization. Typically what you do is ...
• 2,405

How to balance the workload of teachers in OR-Tools (maximization of the minimum)

min, max, functions do not work in OR-Tools, you should use AddMinEquality instead: ...
• 1,384
Accepted

OR-Tools: Partial Solution ignored due to "unknown rate is too large"

Try: SetSolverSpecificParametersAsString("heuristics/completesol/maxunknownrate = 0.9") References: SCIP params SetSolverSpecificParametersAsString ...
• 1,384
Accepted

Is Google's OR-tools for professional work? Specially VRP module

Vehicle routing problems in the real world often require custom scenarios, and no VRP solver does everything, so this is a good question. The VRP solver in OR-Tools is open source (you could fork it ...

Maximize assigned tasks to each worker

There are some linear possibilities, depending on exactly what your goal is. They all require adding some binary variables to what is already a discrete optimization problem. One is to maximize the ...
• 32k
Accepted

assigning values to IntVar if and only if BoolVar, else zero [or-tools]

To create an intermediate boolean that is true iff s[j] == t you just have to create 2 constraints: ...
• 1,384