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
1
vote
0 answers

Integer Programming: Simplify Constraint in Optimisation

I have four variables x1,x2,x3,x4 which takes binary values i.e. (0,1) and 4 sets as-. s1 = (x1,x2) s2 = (x1,x3) s3 = (x4,x2) s4 = (x4,x3) I want to select minimise number of variables selected such that either one of the set is…
1
vote
0 answers

iteratively finding the best k solutions to linear/binary programming problems

I am solving a maximization binary programming problem (binary programming is the same as integer programming but the solution is a vector of 0's and 1's). I would like to find the best 10 solutions. I don't mean the best 10 solutions where all 10…
1
vote
1 answer

Why does CPlex solve this mixed integer linear program so incredibly fast?

I am working on an optimization problem where I want to find resource-activity assignment based on skill restrictions (not all resources have all skills for the demands d), resource restrictions (resources have a limited presence p) and an…
1
vote
1 answer

GAMS indexing query

Hi I am trying to optimize a function involving the components of a variable s(L) indexing by the set L /1*10/; I created a subset Leven of the set L involving the even numbers (Leven /2,4,6,8,10/) I want to write down an equation which sets the…
user401988
  • 19
  • 2
1
vote
1 answer

Is mixed integer linear programming used to implement optimization algorithms (e.g., genetic or particle swarm)

I am learning about optimization algorithms for automatic grouping of users. However, I am completely new to these algorithms and I have heard about them as I reviewed the related literature. And, differently, in one of the articles, the authors…
1
vote
1 answer

adding constraint under pyomo environment

I am working under pyomo.environ package. I tried to adding a constraint something like this https://i.stack.imgur.com/r1Smc.jpg. i and j are the index of nodes. The node_set contains N0 to N5, six nodes in total. Arc_set is a set that store the…
1
vote
1 answer

Mixed Integer Program with Varying Interest Rates

I'm currently stuck with a MIP program where the interest rate, i, is based on the number of units produced for Housing Plan A. If the number of plan A houses sold is the highest among all four types then i=1. If the number of plan A houses sold is…
1
vote
1 answer

R lpSolve package does not find optimal solution

I'm trying to solve the following optimization problem with R lpSolve package: 1.007825*x1 +12.000000*x2 +15.99492*x3 +14.00307*x4 +31.97207*x5 +30.97376*x6 >= 10 1.007825*x1 +12.000000*x2 +15.99492*x3 +14.00307*x4 +31.97207*x5 +30.97376*x6 <= 15 …
Kirill
  • 133
  • 8
1
vote
1 answer

Assignment optimization / Set covering

I have the following task and didn't find any working solution. I need to find a optimal solution for network node placement. The objective is to minimize the digging cost for connecting cables. Some digging costs depending on each other. E.g.…
1
vote
0 answers

Gurobi with python : how to construct conditional function in objective expression?

I'm solving an integer programming problem using Gurobi in python, in which the objective expression includes some conditional functions. Explicitly, the problem is modeled as follow: max [sum(f(x_i, a_i)) + sum(g(x_i - x_[i-1]))] f(x, a) = 0 if x…
Pang
  • 21
  • 4
1
vote
1 answer

How to create two dimensional set objects under pyomo.environ module

I tried to create a LP model by using pyomo.environ. However, I'm having a hard time on creating sets. For my problem, I have to create two sets. One set is from a bunch of nodes, and the other one is from several arcs between nodes. I create a…
1
vote
0 answers

Sets in LINGO Programming

I need help on Lingo programming.I have a mixed integer programming to solve it using sets in Lingo.One of the constraints is: S(i,k,w) >= m(i,j) * X(i,t), for i=1,...,I; j=1,...,J; t=1,..,T; k=t+K(j,w)-1,..,t+K(j,w)+S(j)-2; w=1,..,W. Here m(i,j),…
1
vote
1 answer

Creating a tridimensional IloIntVarArray in Cplex with c++

I'm using some integers variables in cplex with c++, like: alpha = IloIntVarArray (env, numArcs,0 ,N); alpha is unidimensional array with range 0 - N... But my problem is, I'd like to create a x[N][M][K], that would be my integer decisions…
1
vote
1 answer

CPLEX in C++: Converting a LP to MIP

I am a beginner in using CPLEX in c++. I know how to solve a simple LP using CPLEX. I am wondering if setting variables as integer (as follows), causes CPLEX use the branch and bound method to solve the MIP or it just solves a LP and at the end…
Sarah
  • 133
  • 11
1
vote
1 answer

Is it possible to solve a NP-hard p‌r‌o‌b‌l‌e‌m using both heuristic and mathematical programming?

I have a Genetic Algorithm and mixed-integer programming model of a parallel machine scheduling problem. But mathematical model takes too much time to solve the problem and unlikely genetic algorithm takes less time but doesn't show the optimal…
Ali Tor
  • 2,772
  • 2
  • 27
  • 58