Laurent Perron
  • Member for 2 years, 6 months
  • Last seen this week
  • Paris, France
What is the purpose of libraries like Pyomo and Google OR tools?
16 votes

OR-Tools is a set of solver: A very popular Routing Library built on top of a traditional constraint programming solver An award winning CP-SAT solver that combines Constraint Programming techniques, ...

View answer
Warm start CPLEX using google or-tools
Accepted answer
12 votes

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.

View answer
Maximize assigned tasks to each worker
Accepted answer
9 votes

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

View answer
Cumulative Constraint OR-Tools
Accepted answer
7 votes

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 a CumulativeConstraint with a method ...

View answer
Google - OR tools for workforce scheduling problems
7 votes

Workforce scheduling describes many different problems. The best technology for those is IMO CP-SAT (see the introduction, the reference manual in the CP-SAT sections and a set of recipes). A ...

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

Crossposted from: Stack Overflow The idea is to create another dimension ('visit') that is incremented by 1 on each visit. Then use SetCumulVarSoftUpperBound on the cumul variable of that dimension ...

View answer
TSP problem: traveller does not visit all nodes - Google OR-tools
6 votes

(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.

View answer
Using OR-Tools with .NET and GUROBI
Accepted answer
5 votes

the library needs to find the gurobi shared library before you can create the solver. You can set GUROBI_HOME to help. you can have callbacks, but only in c++. Look for or-tools/linear_solver/...

View answer
Extracting CNF representation of my problem from SAT solver
5 votes

CP-SAT uses a SAT backend. But at any moment, just like with SMT solvers, the full model is never fully represented using clauses and Boolean literals. I recommend looking at the CPAIOR 2020 ...

View answer
OR-Tools, How to avoid dividing by zero
Accepted answer
5 votes

I assume fab_rate is variable, otherwise you can just test it. You can use temporary variables: non_zero_fab_rate = model.NewIntVar(1, ..) fab_rate_is_zero = model.NewBoolVar(..) model.Add(...

View answer
CP-SAT over CBC for MIP, is it worthwhile?
Accepted answer
5 votes

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 ...

View answer
Best model for precedence constraints within scheduling problem
5 votes

May I suggest CP-SAT modeling. See this incomplete section. And a few examples: Complex jobshop in C++ Single Machine Weighted tardiness in C++ RCPSP in Python Gate scheduling in Python Single ...

View answer
Set value based on if other variable is in specific range
Accepted answer
4 votes

Please read https://github.com/google/or-tools/blob/stable/ortools/sat/doc/channeling.md OnlyEnforceIf() only accept one or more Boolean literals. So for the first constraint (assuming there is an ...

View answer
Problem with setting up gurobi with OR-tools
Accepted answer
4 votes

You need to install the binary package locally, with a correct license. It should pick it up at this point.

View answer
OR-TOOLS : is it possible to partially fulfill a demand?
4 votes

You can split the demand in two visits. You will need to duplicate the node in two, and add a disjunction on each visit.

View answer
maximum number of BoolVar 's before or-tools is no longer feasible to use
4 votes

There are no good answers to that question. It depends on the model, on the complexity of the problem. My gut reaction is that OR-Tools routinely solves to optimality bigger problems, but some much ...

View answer
Is it possible to solve VRP using OR-Tools CpModel, instead of RoutingModel?
4 votes

The answer is yes. Is it worthwhile ? it depends. If you just want to have two persons visit the same virtual place (2 duplicated nodes) at the same time, you can force the time cumul var to be equal ...

View answer
Custom lazy callback constraints using Google OR-Tools linear solver?
3 votes

So the routing library does not use a MIP solver to solve TSP/VRP... problems. So the assumptions of lazy callbacks is just false. The question of goal programming is not that clear. You should look ...

View answer
TSP with constraints in OR Tools
Accepted answer
3 votes

So, this is a bit complex. You cannot use the routing library out of the box. If the problem is not too big, you can use the CP-SAT solver with the circuit constraint. A good start is this example. ...

View answer
A specific case of a resource constrained project scheduling problem with partially renewable resources (RCPSP/$\pi$) - OR-Tools
Accepted answer
2 votes

To have resources being released at given time points, you have two options. Have one optional interval per time interval. This interval always ends at the end of the interval. For a given demand, ...

View answer
Google OR returning different values depending on language
2 votes

Running the C# version with or-tools master "/usr/local/share/dotnet/dotnet" run --no-build --project examples/tests/wrong_solution_flex_sat.csproj [[[[3, (0, 1)],[1, (1, 2)],[5, (2, 3)]],[[...

View answer
How to stop the vehicle from reaching the depot in between the trip
1 votes

I do not understand the question. Each vehicle does only one trip from depot to depot. And each node can only be visited once. So if a vehicle goes to the depot at one point in time, it cannot start ...

View answer
Circuit constraint respecting the order of the next n jobs / jobs on each machine starting at 0
Accepted answer
1 votes

for 1) Look at this literal in the jobshop with setup times. You just need to add: model.Add(start_of_job == 0).OnlyEnforceIf(start_lit) For 2) For each color, add for each job a variable ranging ...

View answer
Scheduling when task duration longer than working interval
1 votes

You should look at this example: https://github.com/google/or-tools/blob/stable/ortools/sat/doc/scheduling.md#intervals-spanning-over-breaks-in-the-calendar

View answer
Print Intermediate Solutions of Scheduling Problem and tackling FLAGS in jupyter notebook
1 votes

The large instance is very hard to solve. I need to spend some time on it, but I lack ideas and time. The flags part is problematic with jupyter notebook. We will fix those. To print intermediate ...

View answer
OR-Tools: Partial Solution ignored due to "unknown rate is too large"
1 votes

I believe the warning comes from SCIP. So check the documentation there.

View answer
Flexible Job Shop Problem with several resources per alternative - Ortools
1 votes

The sum(bool_vars) tells you each job has only one way to be executed. It does not tell you what is 'a' way. You can reuse the bool_var from each alternative in multiple resources.

View answer