Questions tagged [mixed-integer-programming]
491 questions
0
votes
0 answers
How to modify variable attributes in JuMP?
I'm using Julia+JuMP and Gurobi to solve a MIP. Is it possible to modify variable attributes like BranchingPriority?
So far, I only found methods in the documentation to modify model parameters. The only variable related modifications that seem to…

muellerd
- 1
- 1
- 2
0
votes
1 answer
Extracting an hour by hour shadow price in an MIP using Gurobi
I am trying to extract the shadow price for a particular constraint within my MIP model - and am using Gurobi as the solver.
When I am establishing the constraint, I use the following code -
# Balance Constraint
for hour in hours:
…

tm553
- 97
- 4
- 15
0
votes
1 answer
Use of max command inside quicksum - gurobi with python
I am trying to include a python "max" command inside a quicksum command using gurobi with python. There is obviously an error with doing so, under LinExpr limitations as it is not accepted.
shutdowncost = quicksum(quicksum(shutdown_cost[i] *…

tm553
- 97
- 4
- 15
0
votes
2 answers
CPLEX dvar as condition
I have this problem while trying to find a solution for a resource constraint scheduling problem. Whenever I put dvar as a condition in a forall loop or if condition I have the error that states "Decision variable (or expression) "S" not allowed".…

Riste Golchev
- 1
- 1
0
votes
1 answer
Optimizing A Loan Portfolio On Weighted Average Criteria
EDIT: I realised that my previous attempt at a way to describe the problem wasn't very helpful and indeed didnt actually model what I'm currently doing at the moment very well, so I've rewritten the post. I've included my working code. The data in…

Totes187
- 11
- 2
0
votes
1 answer
Start the CPLEX with given Initial Solution on C# (Concert technology)
I want to solve the MILP problem with CPLEX-C#. The size of my problem is large and in order to improve the CPU time I want to use initial solution. I want to add this solution into cplex and start to solve the problem with this given initial…

Hesam E
- 105
- 8
0
votes
2 answers
Are there any reliable open source non-linear mixed integer optimization solvers?
I've been struggling to find some open source non-linear integer optimization solvers! I am trying to solve a 16 variable problem where 8 values are integers, subjected to two nonlinear objective functions and 5 nonlinear constraint functions. Is…

ddm-j
- 403
- 1
- 3
- 18
0
votes
1 answer
How to read parentheses or brackets using CPLEX
I am trying to read a .lp file using CPLEX, and it is giving me an error 1615, which is not being able to read "(" or even "[". I am not happy with it because what I have needs to be read must have parentheses in it. Here is what I have:
[num1 +…

DD1
- 33
- 4
0
votes
1 answer
How to write the following objective function in Gurobi?
The following is the objective function:
I have the following Java code:
// Create list of variables
List varList = new ArrayList<>();
// Set objective: maximize log(p) * x
GRBLinExpr expr = new GRBLinExpr();
int counter =…

Andrei
- 7,509
- 7
- 32
- 63
0
votes
3 answers
Mixed Integer Program in Python
I have a MIP Problem that I need to output in Python. See the following attempt so far. I just need few suggestions that would point me in the right direction.
digits = [("00"+str(x))[-3:] for x in range(1, 10)]
var_1 = 2
var_2 = 1
var_3 = 3
LHS =…

DD1
- 33
- 4
0
votes
1 answer
Mixed integer programming looping
I have a mixed integer program with 25 constraints with three subscript variables. There are two types of variables one are integer and one are binary.
Integer variables are called Axyz and binary are called Bxyz. Here is my formulation:
objective…

Ted111
- 37
- 1
- 5
0
votes
1 answer
Linprog Python - Implementing binary numbers
I have multiple constraints and they are straight forward to enter in linprog, but I have two constraints that has a binary component in them. Following is the one:
1 or 0 is Nabc
Mabc - 11(1) <= 0 <-- M111 - 11(1)
or
Mabc - 11(0) <= 0 <--…

DD1
- 19
- 1
- 9
0
votes
2 answers
Mixed Integer Programming IF-THEN with Logical AND operation
I have the following constraint I'm trying to model in Mixed Integer Programming with Python's PuLP module:
Given linear programming variables: x1,x2,y1,y2 where x1, x2, y1, y2 eventually solve to integer values
if (x1<=y2 and y1<=x2) then a=1 else…

SashaZd
- 3,315
- 1
- 26
- 48
-1
votes
0 answers
what is network optimization in the research field of linear programming
As shown in NEOS's Optimization problem classification diagram.
In addition, I have seen in other people's answers that network optimization has a strong polynomial algorithm, are there any relevant papers?
The specific explanation of "network…

李剑青
- 1
- 1
-1
votes
2 answers
Scheduling : How to enforce consecutiveness of shifts for an employee
I have a scheduling problem where an employee can work maximum of say, 4 hours out of total allowable 8 hours in a day. For these 4 hours, I want them to be consecutive.
For example, decision variables (binary) are whether an employee will work in a…

bobby
- 45
- 4