All Questions
Tagged with linear-programming constraint-programming
43 questions
2
votes
1
answer
60
views
Suggestion needed for enhancing problem formulation for constraint programming
I'm trying to formulize a constraint programming solution for item allocation on shelf. The goal is simple items belonging to same brand should be kept as close as possible and should maintain a ...
2
votes
1
answer
153
views
Getting Infeasibility while solving constraint programming for shelf space allocation problem
I'm trying to allocate shelf space to items on planogram using constraint programming. It is a big problem and I'm trying to implement piece by piece. At first we're just trying to place items on ...
1
vote
1
answer
120
views
How to find the best possible team lineup (in swimming)
I currently have a fairly simple algorithm that tries to build the best possible team-lineup given some constrains:
There is a finite list of events which needs to be filled with swimmers
Event 1: 50 ...
0
votes
1
answer
169
views
MIP (mixed integer problem) Build Constraint with OR
I have an MIP where I want to assign at least two variables (binary) from the same location.
How to implement the or in this case. I want something like this:
x1 + x2 + x3 + x4 >= 2 or
x5 + x6 + x7 ...
1
vote
1
answer
530
views
OR-Tools bin packing: Ensuring items with the same supplier are in the same bin while considering capacity constraints
I am working on a bin packing problem using OR-Tools and the SCIP solver. I have followed the guide provided by Google on bin packing (Google OR-Tools Bin Packing Guide).
I have successfully ...
0
votes
1
answer
525
views
Minizinc if-else statement with multiple expressions
The syntaxis of if-else statement in minizinc is
if 〈boolexp〉 then 〈exp1〉 else 〈exp2〉 endif
But i need to use more than just one exp
for example
var int: a;
var int: b;
if 5==abs(5) then a = 5, b >...
2
votes
0
answers
902
views
Google OR-Tools, accessing value of the variables that the solver tries. Dynamic coefficients for variables
I am using google or tools, to find the spend allocation for maximum revenue. In below example, (say) mon, tues are variables for spend allocation for monday tuesday out of total alloaction.
To be ...
0
votes
1
answer
159
views
maximize internal L1 distance between multiple points
I am trying to maximize the internal distance between multiple 2D points while simultaneously minimizing their distance to a center point. I am using L1 distance for calculation and based on one of my ...
1
vote
1
answer
686
views
Overlapping constraint in linear programming
I am trying to implement a constraint for non overlapping rectangles. I found this link:
http://yetanothermathprogrammingconsultant.blogspot.com/2017/07/rectangles-no-overlap-constraints.html
But I ...
1
vote
2
answers
475
views
Can I include continuous variable when optimising with CPMpy?
I need to run a model, where I optimise a diet within a set of constraints and call all integer solutions in the end. I have found a diet example matching almost what I need here: hakank.org. However, ...
0
votes
2
answers
162
views
Modeling XNOR in Pyomo
I am writing a nurse patient matching algorithm, and I want to incorporate something into the objective function that measures how well the new patient-nurse assignments match the patient-nurse ...
3
votes
2
answers
2k
views
Set the amount of possible unique values for variables in ORTOOLS CP-SAT
Looking to set/limit the amount of unique variables generated by ortools cp-sat.
I currently have a list of 13 variables i.e. x1, x2, x3...
I want to be able to ensure that out of these 13 variables ...
-1
votes
1
answer
602
views
Demand optimization planning using PULP
Need help in solving a demand-optimiztion planning for factories.
Factories have Machines which can make one or more Products in it.
Each Product takes time to make 1 unit which is known as 'Cycle-...
1
vote
1
answer
689
views
ortools / linear programming - minimise cost of shopping basket across vendors
Being new to constraint programming and ORTools generally, i'm not sure how to take the next step in solving this problem..
Its the classic "minimise the cost of a shopping cart between multiple ...
3
votes
0
answers
53
views
How solver deciding source and end point based on distance matrix
If I am giving distance matrix to the solver with the below code, getting solver route 3->2->1.
data['distance_matrix'] = [[1000., 1000., 571.36, 1000.],
[1000., ...