322 questions
2 votes
3 answers
125 views
Problem with a Lineup Optimizer due to players having multiple Positions
i have a list of Hitters in python with their name,projection and Positions juan-soto 30.3773 ['OF'] kyle-tucker 44.0626 ['OF'] ... yordan-alvarez 32.510200000000005 ['CI', 'OF'] william-contreras 26....
1 vote
1 answer
202 views
Working with large parameters in an integer linear program using pulp
In pulp's documentation https://coin-or.github.io/pulp/guides/how_to_debug.html, it says that Check the precision of the numbers. If you have very big numbers (with a high precision), this generally ...
0 votes
1 answer
144 views
Limit Coin-OR CLP variables to integers
I've created a small program using the java clp implementation https://github.com/quantego/clp-java. Sometimes the solution returns decimals, which I don't want as the variables that I'm using are ...
3 votes
1 answer
81 views
Find nonnegative integer weights of integer inputs array for integer output, minimizing sum of weights
Problem: Given an array of integers inputs and an integer output, return an array of non-negative integers weights such that the sum of the element-wise product of inputs and weights equals output and ...
-1 votes
2 answers
71 views
PuLP: Constrain the number of distinct people that can work on a task
I have a LP/IP problem that I'm trying to solve using PuLP. It is the division of work amongst employees. The thing that I can't figure out is how to limit the engine to only plan 1 employee on an ...
0 votes
0 answers
92 views
About MATLAB intlinprog
I have a problem with MATLAB intlinprog. I have a problem about assigning worker types to jobs. Each job must assigned to one type of worker. The same type of worker can be assigned to different jobs. ...
0 votes
1 answer
111 views
Binary and Integer Program in Python
I have a binary/integer program that I am trying to solve using milp in Python. Below the image and below is the code I have so far. When I run it, I get `bounds.lb` and `bounds.ub` must contain ...
0 votes
1 answer
580 views
Use min/max operator inside integer linear programming constraint
I have for example the following integer variables x1, x2, x3 and y1, y2, y3. Is there a way to constrain them in the following ways? For example: min(x1, x2, x3) + min(y1, y2, y3) <= 100 or max(...
1 vote
1 answer
96 views
Stuck formulating an adjacency constraint with pyomo
I'm trying to assign attributes into a 3 x 3 matrix based on an adjacency constraint, but I'm stuck formulating the adjacency constraint. I keep thinking I've got the answer, then when I try it the ...
1 vote
0 answers
88 views
Formulating a constraint with pyomo
I'm trying to array genes (elements) in a matrix (matrix_a) based on the restriction sites they have (attributes). Restriction sites are recognized by enzymes that cut the DNA at a specific site. This ...
2 votes
1 answer
120 views
Does the Order of Modeling Affect Computational Speed in Pulp for Integer Programming Problems?
I am currently solving an integer programming problem using Pulp. I am aware that the order of statements in Pulp modeling can affect the outcome of the computations. However, I am curious to know if ...
2 votes
2 answers
91 views
Gekko not solving Integer Programming Problem
I'm trying to use the integer programming option to find a magic square. The algorithm finds a solution if I remove the requirement the entries are unique. I can add up to six requirements for entries ...
0 votes
1 answer
143 views
PAO.Pyomo model sets two variables x and y to be unique
The background is I am trying to implement a bilevel optimization program using Python-based package for Adversarial Optimization (PAO), which is based on Pyomo. I am new to Pyomo, though I have used ...
0 votes
0 answers
344 views
How to implement non-zero count constraint for cvxpy in integer programming
I want to implement the constraint that the number of non-zero elements per row in x is less than 2. constraint2 = cp.sum( x >= 0, 1) <= 2 but get the error TypeError: float() argument must be ...
0 votes
1 answer
138 views
Keeping count of variable occurence in google OR Tools
I'm playing around with OR Tools, just wondering if there is any way to hold the number of times a certain constraint is satisfied? In this case, I'd like to keep track of the number of times my 'diff'...