Questions tagged [mixed-integer-programming]
491 questions
-1
votes
1 answer
Sort array using Mixed integer constraints
Assume that I have
X = X_1....x_n Variables
and I want to build variables Y = Y_1...Y_n using constraints
such that the elements of Y are the sorted elements of X.
For example when
n = 2
Y_1 = min(X_1,X_2)
Y_2 = max(X_1,X_2)
this can be achieved…

ido kahana
- 165
- 2
- 8
-1
votes
1 answer
Calculate ratio of two parameters using Pyomo, Python
I have 2 parameters such as Demand and Capacity:
I have modeled these as follows:
model.Dmem=Param(model.nf,within=NonNegativeIntegers, initialize=1)
model.Cmem=Param(model.ns, within=NonNegativeIntegers, initialize=5)
I want to calculate the ratio…

Waqas Swati
- 1
- 4
-1
votes
1 answer
How to limit the count of nonzero variables in GAMS mixed-integer nonlinear programming?
The background of the problem:
There are 25 candidates on Neo blockchain that receive votes. Every voter except me has voted.
The candidates ranked 1st to 7th each will give 200 dollars, proportionally to people who vote for them. And the 8th to…

2474101468
- 328
- 2
- 9
-1
votes
1 answer
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-Time'. So, to make 10 units of product/component on…

Shankar Pandey
- 451
- 1
- 4
- 22
-1
votes
1 answer
Linear problem for chemical composition of a formulation
Dears,
I´m writing a Linear Program for optimization.
One of my goals is to recommend to my supplier which raw material mix to use in its product formulation in order to optimally fulfill my nutrient needs in several locations.…

Bruno
- 87
- 5
-1
votes
1 answer
How to formulate constraints in linear programming so that a set of consecutive variables are forced to be equal?
Let's say we are optimizing over 2 variables, each a vector of 6. That is, Y=[y0,y1,...y5], and X=[x0, x1, ..., x5]. How do I formulate a constraint in linear programming so that it forces the following solutions: x0=x1=x2=x3 & x4=x5. Or is it…

Tina
- 11
- 1
-1
votes
1 answer
How to add integer cut to MILP constraints to find alternative optimal solutions?
I am solving an MILP optimization with binary variables in MATLAB in which I want to find more than one optimal solution by excluding previous solutions. Therefore, I know I must include the following integer cut as a constraint in my model:
sum…

Jorge B.
- 1
-2
votes
0 answers
How to solve Mixed Integer Linear Programming Problem using MicroPython
I'm trying to solve a MILP problem using MicroPython but I'm not sure, if man can solve this in MicroPython . Can I have an example (code) of how to solve a simple MILP problem please ?
Thank you in advance
I dont have any Idee
-2
votes
1 answer
Minimize number of shoppers used while buying all items
We have N shoppers with 100$ each and a list of M items that each cost [0-50$] (integer only) .
We need to buy all the items with the following requirements -
Minimize the number of shoppers used
If we need to use more than 1 shopper, minimize the…

Adit Sanghvi
- 142
- 1
- 2
- 12
-2
votes
2 answers
Using Gurobi to run a MIQP: how can I improve time performance?
I am using Gurobi to run a MIQP (Mixed Integer Quadratic Programming) with linear constraints in Matlab. The solver is very slow and I would like your help to understand whether I can do something about it.
These are the lines which I use to launch…

TEX
- 2,249
- 20
- 43
-3
votes
1 answer
Solving Minimization with Integar programming
I am asked to solve the following problem:
The problem:
You were asked to repair a farm house with sheets of plywood.
You were given thirty sheets of plywood. (each size = 10ft x 10ft)
The house requires 20 circles (radius = 2.5ft ) and 15…

ttd
- 9