Questions tagged [integer-programming]

Solving systems of linear equations where variables are integers.

An integer program is a problem where, in addition to the linear inequalities constraints, the variables are also constraint to be integers only.

While can be solved in polynomail time, integer-programming is NP-hard.

A good solver for such optimization problems is lp_solve. See also GLPK (http://www.gnu.org/software/glpk/) and CBC (https://projects.coin-or.org/Cbc)

However, for large or hard instances you may need a commercial solver such as CPLEX or Gurobi.

For more information see wikipedia.

307 questions
0
votes
1 answer

Constraint violation for Linear Integer Programming in Python Gurobi

I am trying to implement LIP in Gurobi but somehow the constraints related to single edge into the node and single edge out of the node is being violated. The following are the equations (I am not copying the equations exactly interms of the…
gfdsal
  • 651
  • 1
  • 8
  • 25
0
votes
0 answers

Should I factor in time as a parameter or a variable in a scheduling problem with MILP?

I am trying to formulate a problem that will spit out an optimal schedule for my tasks to be completed. To keep the information confidential, I will refer to my tasks as papers that need to be written. Here is the premise of my problem. There are…
0
votes
1 answer

How can I make a variation limits, do not exceed a specific value

Now I am facing a problem that making a variation does not exceed a specific value. I will describe in details below. using CP; int a = 4; int b = 3; int c = 5; range arange = 1..a; range brange = 1..b; range crange = 1..c; dvar boolean…
0
votes
1 answer

How to solve this error when I use CP in Cplex

Now, I am facing with an error. 'Decision variables of type dvar float not supported by this algorithm.' Here is the code that I made. I will write it simply. Firstly, I got in trouble with error that "'q1' is not convex." So, now i am trying to…
0
votes
1 answer

OR Tools setting a variable with multiple indices in Java

I am trying to form a variable that has a number of indices, e.g. $x_{i,j}$ Until now I have found in the documentation simple setting of variables like the following: MPVariable x = solver.makeIntVar(0.0, infinity, "x"); Is there any documentation…
Georgios
  • 861
  • 2
  • 12
  • 30
0
votes
2 answers

How to set stop criteria for integer programming optimization in yalmip/matlab with xpress solver

I have an integer programming optimization problem, that I solve in matlab using yalmip and xpress as the solver. For the solver I want to set two stopping criteria - a time limit and an optimal gap limit. I have tried to use the xpress functions…
0
votes
2 answers

Python - Closest Minimum

I've 2 matrices both with Nx2 elements. Any value is a float with 8-10 decimals and they represent respectively 'x' and 'y' of a point. For any element couple (x, y) (x is in the first column, while y is in the second one) in the first array, I'd…
JackLametta
  • 400
  • 1
  • 2
  • 21
0
votes
0 answers

GUSEK/GLPK - Run a IP Faster

I am running an IP problem with around 120 decision variables. I would expect this to take some time but it's taking >8 hours. I am using GUSEK and wondering if there is anyway to use more CPUs or run in parallel to speed on the solution. Or any…
Yolo_chicken
  • 1,221
  • 2
  • 12
  • 24
0
votes
2 answers

Does IloCplex::Param::MIP::Display parameter restrict information displayed related to repairing singularity and Markowitz Tolerance?

The warnings that I henceforth refer to are as follows; repairing basis singularity, added to 1 column super-basic list and Markowitz threshold set to 0.3. Will toggling the IloCplex::Param::MIP::Display parameter value between 2 (default) and 5…
0
votes
1 answer

cvxpy mixed integer programming returns "inf"

I am trying to solve a MIP problem with cvxpy as follows : the problem: subject to: and the code (without the data): # declaring variables x_ijk = {} for i in stores: for j in models: for k in sizes.index: x_ijk[(i,j,k)] =…
afek
  • 21
  • 3
0
votes
1 answer

Setup Objective function in PuLP with four dimensions

I am trying to build a scheduling optimization for employees working in different roles, days and shifts. I want to optimize the preference score given a schedule (the assignment matrix). However, I am having trouble with defining my objective…
0
votes
0 answers

How are customized heuristics implemented to optimization problems (in IDE) and solvers?

I have read up on several papers that described the use of heuristics in various routing problems that results in a faster run time for the solvers used (e.g. Gecode, CBC). For e.g., in the CPLEX/MiniZinc IDE, we have a constraint problem for the…
Stoner
  • 846
  • 1
  • 10
  • 30
0
votes
1 answer

Stopping MATLAB's intlinprog early

How can I exit intlinprog at the "Branch and Bound" stage when fval and/or the relative gap no longer improve? I have tried numerous options but so far without success. For the example below, I know the optimal value is 6834. How do I implement an…
0
votes
1 answer

How to write constraints to check whether a variable is bounded between two values

Does anyone know what is a good way to indicate whether a model variable is bounded between certain values? For example, indicator1 = 1 when 0<= variable x <=200 else 0, indicator2 = 1 when 200<= variable x <= 300. One use case of this is to…
0
votes
1 answer

prioritizing variables in an integer linear program

I like to have your ideas how I can prioritize variables in integer programming using a constraint (not changing the objective function). Consider following proble Min x1+x2+x3+x4+5*x5+6*x6 subject to x1+x2+x3+x4+x5+x6>=2 xi is {0,1} The solution…