All Questions
Tagged with mixed-integer-programming or-tools
49 questions
-1
votes
3
answers
223
views
Python ortools CP-SAT solution for group optimization - code too clunky?
I have a group of people that I need to split up into subgroups. The subgroups do not all have to be the same size, but can be no smaller than 5 and no larger than 10. I have created a matrix (in ...
0
votes
0
answers
80
views
Optimize load balancing using a constraint solver
I'm trying to solve a load balancing problem with a constraint solver. I have a list of partitions, each one is associated with a load, and I want to assign these partitions to a fixed number of ...
0
votes
1
answer
88
views
VRP in CP-SAT (or tools) using all available vehicles, when a smaller number could have sufficed
I am solving a simple capacitated VRP with CP-SAT solver with 6 vehicles and 17 nodes. The issue that is happening is that the solution ends up using all 6 vehicles, when clearly a smaller number of ...
1
vote
2
answers
283
views
Use more than 1 core when solving with mathopt (or tools) - HiGHS solver
I am interested in leveraging more number of physical cores when solving a MIP problem with mathopt.
Parallelization was easy with CP-SAT by setting the number of search workers
solver.parameters....
2
votes
1
answer
256
views
How to pickel (save model object) a Google or-tool's mathopt model object
I am building a model using mathopt library of or tools, and I want to save the model object as a pickle file (or any other suitable alternative). The use case for doing this is - underlying data ...
0
votes
2
answers
182
views
minimum of decision variables not including zero. OR-Tools CP-SAT solver
I have a problem where I need to take the minimum of decision variables, but want to exclude variables which take a value of zero. For e.g. if variable values are : 0,0,2,5,7 then I want the minimum ...
1
vote
1
answer
63
views
How to ensure that a value is a member of a set of decision variables in ortools
I want to implement constraints which ensures that a value is part of a set of decision variables. So for e.g. let dv[i] be a set of decision variables indexed by i. Say, the domain is restricted ...
1
vote
2
answers
278
views
how to implement alldifferent constraint except 0 in ortools
I am using ortools, CP-SAT solver, and I am struggling to write a constraint that will allow for a solution which can have multiple zero's but the remaining decision variable values have to be unique. ...
1
vote
1
answer
323
views
Support for HiGHS solver in MathOpt [Google OR-Tools], python API
When will the support for HiGHS solver be implemented in MathOpt (ortools) ? I am using MathOpt using python API. I am using ortools==9.9.3963.
So for the below sample code, I get the following error :...
3
votes
2
answers
825
views
OR-Tools CP-SAT python example terminates after creating solver
I am new to Google OR-Tools and trying to start by running a basic example from OR-Tools example library found here
https://github.com/google/or-tools/blob/stable/ortools/sat/samples/cp_sat_example.py....
1
vote
1
answer
233
views
How to add indicator and SOS constraints in mathopt [Google OR-Tools]
I am struggling to add indicator and SOS constraints using mathopt library in or-tools. In the web-page it is mentioned that mathopt supports these specialised constraints, but I am not able to use ...
0
votes
2
answers
290
views
How to express that 2 binary variable are different in MIP solver
I have an assignment problem where I want to allocate a number of balls to different containers. Every ball has a certain size - small, medium and large. I want to add a constraint that balls with 2 ...
1
vote
1
answer
73
views
How to make a variable to act as a upper bound on a summation constraint
I have an integer variable, M which can take a value from 1, 2, .. 10. Now, I want to use this variable as upper bound on a summation. For example, if during the solve the value of M resolves to 5, ...
1
vote
1
answer
536
views
Bin packing problem : Bins are selected non-sequentially
I am working on a simple bin-packing problem, what I realize is that the solver is choosing the optimal number of bins to pack items, however, the bins are not contiguous.
Below is my program:
from ...
1
vote
0
answers
117
views
MPSolver callback misordered
I set callback of MPSolver<SCIP> but when debugging variables are out of bounds. I reduced test case and it seems variables are disordered, but it's still correct when output.
Problem is that it'...